gifted-lamp-23825
09/18/2024, 7:05 AMError: The pull request comment was generated successfully but could not be posted:
Error getting comments: 404
I checked standard post request to bitbucket
and it's working
curl --request POST \
> --url 'https://{url}/rest/api/1.0/projects/{key}/repos/{pullid}/pull-requests/40/comments' \
> --header 'Authorization: Bearer {Token}' \
> --header 'Accept: application/json' \
> --header 'Content-Type: application/json' \
> --data '{"text": "testing one comment"}'
{"properties":{"repositoryId":3295},"id":112406,"version":0,"text":"testing one comment","author":{"name":"access-token-user/2/3295","active":true,"displayName":"Access Token User - ","emailAddress":null,"id":10853,"slug":"access-token-user_2_3295","type":"SERVICE","links":{"self":[{"href":"{}"}]}},"createdDate":1726644979341,"updatedDate":1726644979341,"comments":[],"threadResolved":false,"severity":"NORMAL","state":"OPEN","permittedOperations":{"editable":true,"transitionable":true,"deletable":true}}[61606170@jumphost-dev ~]$ ^C
[61606170@jumphost-dev ~]$
Generating Infracost diff
[Pipeline] sh
+ cd /tmp/repo
+ git checkout main
Already on 'main'
Your branch is up to date with 'origin/main'.
[Pipeline] sh
+ infracost diff '--path=/tmp/repo' '--format=json' '--compare-to=/tmp/infracost-base.json' '--out-file=/tmp/infracost.json' '--log-level=warn' '--terraform-var-file=.dev.eu-central-1.tfvars'
2024-09-18T06:48:50Z WARN Input values were not provided for following Terraform variables: "variable.ami_id", "variable.instance_type", "variable.key_name", "variable.aws_db_subnet_group_name", "variable.aws_security_group_name", "variable.allocated_storage", "variable.max_allocated_storage", "variable.ingers_from_port", "variable.ingers_to_port", "variable.db_name", "variable.fos_tt_allocated_storage", "variable.fos_tt_max_allocated_storage", "variable.fos_tt_ingers_from_port", "variable.fos_tt_ingers_to_port", "variable.fos_tt_db_name", "variable.apm_allocated_storage", "variable.apm_max_allocated_storage", "variable.apm_ingers_from_port", "variable.apm_ingers_to_port", "variable.apm_db_name", "variable.apm_gls_simulator_allocated_storage", "variable.apm_gls_simulator_max_allocated_storage", "variable.apm_gls_simulator_ingers_from_port", "variable.apm_gls_simulator_ingers_to_port", "variable.apm_gls_simulator_db_name". Use --terraform-var-file or --terraform-var to specify them.
[Pipeline] echo
Generating Infracost comment
[Pipeline] sh
+ infracost '--log-level=debug' comment bitbucket '--path=/tmp/infracost.json' '--repo=/projects/gpd/repos/gls-aws-apps' '--pull-request=40' '--bitbucket-server-url=<https://bitbucket.gls-group.eu/rest/api/latest>' '--bitbucket-token=****' '--behavior=update' '--format=json' --exclude-cli-output
+ true
[Pipeline] readFile
[Pipeline] echo
2024-09-18T06:48:53Z DEBUG IsCloudEnabled inferred from Config.EnabledDashboard is_cloud_enabled=false
2024-09-18T06:48:53Z DEBUG 'POST' request to '/graphql' using trace_id: '61a9f1c0-8521-4966-b792-bdf8de1b484e'
2024-09-18T06:48:53Z DEBUG performing request method POST url <https://dashboard.api.infracost.io/graphql> library=retryablehttp
2024-09-18T06:48:53Z DEBUG Successfully loaded settings from Infracost Cloud result="{CloudEnabled:true ActualCostsEnabled:false UsageAPIEnabled:true TagsAPIEnabled:true PoliciesAPIEnabled:true}"
2024-09-18T06:48:53Z DEBUG Enabled usage API
2024-09-18T06:48:53Z DEBUG Using default policies V2 endpoint
2024-09-18T06:48:53Z DEBUG Enabled policies V2
2024-09-18T06:48:53Z DEBUG Enabled tag policies
2024-09-18T06:48:53Z DEBUG 'POST' request to '/graphql' using trace_id: '61a9f1c0-8521-4966-b792-bdf8de1b484e'
2024-09-18T06:48:53Z DEBUG performing request method POST url <https://pricing.api.infracost.io/graphql> library=retryablehttp
2024-09-18T06:48:53Z DEBUG IsCloudEnabled is true with org level setting enabled.
2024-09-18T06:48:53Z DEBUG 'POST' request to '/graphql' using trace_id: '61a9f1c0-8521-4966-b792-bdf8de1b484e'
2024-09-18T06:48:53Z DEBUG performing request method POST url <https://dashboard.api.infracost.io/graphql> library=retryablehttp
2024-09-18T06:48:55Z INFO Estimate uploaded to organization 'karol.kuberacki' in Infracost Cloud
2024-09-18T06:48:55Z INFO 1 tag policy checked
2024-09-18T06:48:55Z INFO 11 finops policies checked
2024-09-18T06:48:55Z INFO finops policy check failed: EBS - consider upgrading gp2 volumes to gp3
2024-09-18T06:48:55Z INFO Finding matching comments for tag generated by Infracost
2024-09-18T06:48:55Z DEBUG received an error trying to post comment pausing 1 seconds then will retry error="The pull request comment was generated successfully but could not be posted:\nError getting comments: 404 \n\nSee <https://infracost.io/docs/troubleshooting/#5-posting-comments> for help."
2024-09-18T06:48:56Z INFO Finding matching comments for tag generated by Infracost
2024-09-18T06:48:56Z DEBUG received an error trying to post comment pausing 2 seconds then will retry error="The pull request comment was generated successfully but could not be posted:\nError getting comments: 404 \n\nSee <https://infracost.io/docs/troubleshooting/#5-posting-comments> for help."
2024-09-18T06:48:58Z INFO Finding matching comments for tag generated by Infracost
2024-09-18T06:48:58Z DEBUG received an error trying to post comment pausing 4 seconds then will retry error="The pull request comment was generated successfully but could not be posted:\nError getting comments: 404 \n\nSee <https://infracost.io/docs/troubleshooting/#5-posting-comments> for help."
2024-09-18T06:49:02Z INFO Finding matching comments for tag generated by Infracost
2024-09-18T06:49:02Z DEBUG received an error trying to post comment pausing 8 seconds then will retry error="The pull request comment was generated successfully but could not be posted:\nError getting comments: 404 \n\nSee <https://infracost.io/docs/troubleshooting/#5-posting-comments> for help."
2024-09-18T06:49:10Z INFO Finding matching comments for tag generated by Infracost
Error: The pull request comment was generated successfully but could not be posted:
Error getting comments: 404
See <https://infracost.io/docs/troubleshooting/#5-posting-comments> for help.
2024-09-18T06:49:10Z DEBUG 'POST' request to '/event' using trace_id: '61a9f1c0-8521-4966-b792-bdf8de1b484e'
2024-09-18T06:49:10Z DEBUG performing request method POST url <https://pricing.api.infracost.io/event> library=retryablehttp
[Pipeline] readJSON