-
-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sentry CLI: Deploy in project A creates deploy in project B (shared release) #1927
Comments
Assigning to @getsentry/support for routing ⏲️ |
Hi @jeengbe, just to confirm, are you performing these steps using the Sentry CLI? If yes, could you please provide the exact commands that you ran, so I can assist you better? Thank you! |
Hi! The script is essentially: Build: sentry-cli releases new $RELEASE
# Sometimes the Sentry API fails, but that shouldn't stop the build process (https://github.com/getsentry/sentry-cli/issues/1928)
sentry-cli releases set-commits $RELEASE --auto --ignore-missing || true
docker build
sentry-cli sourcemaps inject /app/dist
sentry-cli sourcemaps upload --release $RELEASE /app/dist
sentry-cli releases finalize $RELEASE Deploy: sentry-cli releases deploys $RELEASE new -e $ENVIRONMENT -t $(($end - $start)) |
Thank you for the quick reply @jeengbe. One more thing that would be helpful: if your repo is public, would you be able to share a link to it, so I can better replicate your setup? If it is private, that is also okay; I can try to create a similar setup. |
I unfortunately can't share it. |
@jeengbe Are you running this build script once (i.e. to create the release for both projects simultaneously) or twice (i.e. within each project individually to create the release separately for each project)? |
I run the build script twice in parallel (both projects have a separate project in Sentry so that's the only way I found to create the release for both Sentry projects) |
The |
This commit fixes the `deploys new` command to use the `--project` argument. Previously, the `--project` argument was ignored; now, any projects specified with the `--project` argument are sent to Sentry in the request that creates the deploy. ref #1927
This commit fixes the deploys new command to use the --project argument. Previously, the --project argument was ignored; now, any projects specified with the --project argument are sent to Sentry in the request that creates the deploy (relevant API docs). ref #1927
@jeengbe After looking into this issue some more, I now believe that there are three things simultaneously preventing your deploy from being associated specifically with Project A. These can each be corrected as follows, and all of them need to be corrected in order for the problem to be resolved:
Thank you again for reporting the issue, and I hope we can get this sorted out soon! |
@szokeasaurusrex Thanks for the extensive response. where version is separate from package. Is that how you're supposed to handle several services deployed from the same monorepo commit? I feel like this whole are could be a bit better explained. I've checked the docs several times now, and I still only have a vague idea of how releases relate to commits, packages/services, projects, deploys, source maps. I'd be happy to assist with further feedback. |
Thanks for this feedback – in fact, I agree with you completely. I have also needed to reference the docs while investigating this issue, and I found it difficult to find the necessary information in the docs. So, I have created an issue for us to improve these docs. Regarding your specific question about packages and versions, the documentation states that the |
@jeengbe Just wanted to let you know that we have an internal ticket to get point (3) in my previous comment fixed! I will update you once I have more information. |
Hey @jeengbe, we now have a public issue on the getsentry/sentry repo to address point (3) from above. Once that issue is fixed, everything should work as expected! Since I have already fixed point (2) in the Sentry CLI, I am going to close this issue. If, once getsentry/sentry#64793 is completed, you are still experiencing the same problem, please reopen this issue and I will investigate further! |
We will wait on implementing a fix here until getsentry/sentry#64793 is completed, so we can more easily test the changes |
Thsi should now be resolved via getsentry/sentry#65587 Please reopen if youre still seeing an issue 🙏 |
Reopening, we still need to implement the fix in the Sentry CLI – see my comment above |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Environment
SaaS (https://sentry.io/)
Steps to Reproduce
Expected Result
A could be a service (that runs in all environments) and B a cronjob (that only runs in prod). Both A and B come from the same monorepo and when A is deployed to staging, a staging deployment for B is also created.
Instead, when deploying A to staging, the deploy should be only created for A and has nothing to do with B. They share the same release, but not deploys.
Actual Result
I run the manual CI job "deploy A to staging" and I get (both mail and in Slack):
and the Sentry dashboard shows the same.
Product Area
Releases
Link
No response
DSN
No response
Version
No response
The text was updated successfully, but these errors were encountered: