We're running a self-hosted Sentry and I've been following the docs to set up release tracking. I've got to the part where we're creating the release and associating commits. We aren't using the sentry integrations, and it seems like this causes set-commits --auto to short-circuit prematurely. The docs suggest that it's fine to not set up integrations, but the code snippet below stops the command from proceeding. Am I missing something?
I checked out the repo locally, dropped the code block below, built it and ran it to see if it would work. I ended up hitting a validation error on the author email for one of the commits, but that seems to be a separate issue. After dropping out enough commits to drop the "invalid" email address, the release was logged correctly.
@samuelhwilliams Hi! So I think you are right! I just tested it out on a fresh install and if you don't have any repos connected/created the command will bail. Obviously this doesn't make sense if you want to only push local commit metadata.
Thank you for bringing this up!! I'll start working on a patch for this.
Also, I'm curious about the "invalid" author emails. Can you elaborate on this issue?
Hey @NisanthanNanthakumar - thanks for the reply! Sounds good - will keep an eye out for the patch and release. :)
I think the email issue I mentioned is not actually a problem. It seems to be a configurable option here, so might be that we've just configured it to be too restrictive and I'm checking with our team internally. Since you asked, the email it's rejecting are dependabot's automated ones (e.g. 123456789+dependabot[bot]@users.noreply.github.com). But as I say - on further inspection I don't think this is a problem on Sentry's end. :)
@samuelhwilliams PR is pending and should be merged and released soon. In the meantime, however, would you be able to give it a try locally?
# This step can be skipped if you already have rust locally
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
git clone https://github.com/getsentry/sentry-cli.git && cd $_
git checkout API-1165
cargo build
./target/debug/sentry-cli releases set-commits --auto <your-release>
Hey @kamilogorek - looks like it works! Quick turn around. Thanks both :)
Awesome, thanks for confirmation, will release patch version on Monday :)
i think this issue is still open, when not having a linked repo running with --local or --auto yeld
error: Could not find the SHA of the previous release in the git history. Increase your git clone depth.
Most helpful comment
Awesome, thanks for confirmation, will release patch version on Monday :)