getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
39.1k stars 4.2k forks source link

CircleCI workflow `releases set-commits` fails with object not found #66600

Closed toote closed 7 months ago

toote commented 8 months ago

Environment

Running in CircleCI image cimg/python:3.8 using latest CLI (verified with 2.28.6 and 2.30.0):

Steps to Reproduce

Expected Result

Release is created as normal

Actual Result

When running sentry-cli releases set-commits $VERSION --auto --ignore-missing the following error occurs:

error: object not found - cannot read header for (<SHA that is not the commit ID>); class=Odb (9); code=NotFound (-3)

The job had been working without issues and no changes 10 days ago.

Logs

sentry.log

alimony commented 8 months ago

I wonder if something changed in Sentry, because I started seeing errors like these in workflows just a few hours ago:

Sentry CLI Plugin: Command failed: /home/runner/work/project/project/frontend/node_modules/@sentry/cli/sentry-cli releases set-commits project@1.0.5 --commit org/project@17d4cb0f1d7d089ad123e31007f3abc188bc123
error: API request failed
  caused by: sentry reported an error: You do not have permission to perform this action. (http status: 403)

I'm using the same organization auth token as always, which has the org:ci scope.

szokeasaurusrex commented 8 months ago

@toote, does downgrading to an older Sentry CLI version solve your problem? If not, I would strongly suspect that the problem is originating in Sentry, rather than the CLI, as @alimony suggested.

toote commented 8 months ago

@toote, does downgrading to an older Sentry CLI version solve your problem?

Nope, it happens both with 2.30.0 and 2.28.6, the latter which was working a week ago or so.

If not, I would strongly suspect that the problem is originating in Sentry, rather than the CLI, as @alimony suggested.

That was my guess as well, but sentry support asked me to open the report here in the case I created with them 🤷‍♂️ (115620 if anyone is interested)

szokeasaurusrex commented 8 months ago

@toote Thank you for the clarification.

That was my guess as well, but sentry support asked me to open the report here in the case I created with them 🤷‍♂️ (115620 if anyone is interested)

If you are certain that the command was working a week ago on version 2.28.6 but the command has stopped working in the same version now, I think the only plausible explanations are either a change in the inputs (configuration or input files) to the CI script, or a change in Sentry. Since you claim that you made no changes since the last time the script worked, the only remaining plausible explanation is a change in Sentry. Therefore, I am going to transfer this issue to the Sentry repository, so you can get help from the team responsible for maintaining the Sentry codebase.

getsantry[bot] commented 8 months ago

Assigning to @getsentry/support for routing ⏲️

getsantry[bot] commented 8 months ago

Routing to @getsentry/product-owners-releases for triage ⏲️

toote commented 8 months ago

Working on this with support it looks like the issue is a change done on CircleCI's side to speed up checkout steps: https://discuss.circleci.com/t/product-update-speeding-up-code-checkout/50317

The error is probably the internal implementation trying to read information out of the git repository assuming it has a normal repository. While this is obviously an issue on CircleCI's side, it may be a good idea to have this as an enhancement to the sentry-cli tool so that the error reported is not so cryptic

alimony commented 8 months ago

I don't use CircleCI and have not changed anything about my workflows, so would love any other hints on what the issue might be.

schew2381 commented 7 months ago

Closing as this appears to be rolled back on CircleCI's side