Skip to content

Sentry CLI: Deploy in project A creates deploy in project B (shared release) #1927

Closed

Description

@jeengbe

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

  1. Create a release X for projects A and B (monorepo, thus A and B share the same commit hash)
  2. Deploy project A to environment E
  3. Observe that a deployment for project B in environment E was also created

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):

image

and the Sentry dashboard shows the same.

Product Area

Releases

Link

No response

DSN

No response

Version

No response

Activity

  1. getsantry commented on Feb 5, 2024

    @getsantry

    Assigning to @getsentry/support for routing ⏲️

  2. jeengbe commented on Feb 5, 2024

    @jeengbe
    Author

    The release also has both deploys attached to it on the release overview page.

    image

  3. transferred this issue fromgetsentry/sentryon Feb 5, 2024
  4. moved this from Waiting for: Support to Waiting for: Product Owner in GitHub Issues with 👀 2on Feb 5, 2024
  5. szokeasaurusrex commented on Feb 6, 2024

    @szokeasaurusrex
    Member

    Steps to Reproduce

    1. Create a release X for projects A and B (monorepo, thus A and B share the same commit hash)
    2. Deploy project A to environment E
    3. Observe that a deployment for project B in environment E was also created

    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!

  6. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 2on Feb 6, 2024
  7. moved this to Waiting for: Community in GitHub Issues with 👀 2on Feb 6, 2024
  8. jeengbe commented on Feb 6, 2024

    @jeengbe
    Author

    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))
  9. moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 2on Feb 6, 2024
  10. szokeasaurusrex commented on Feb 6, 2024

    @szokeasaurusrex
    Member

    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.

  11. 34 remaining items

  12. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 2on Feb 6, 2024
  13. szokeasaurusrex commented on Feb 7, 2024

    @szokeasaurusrex
    Member

    @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.

  14. szokeasaurusrex commented on Feb 7, 2024

    @szokeasaurusrex
    Member

    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!

  15. szokeasaurusrex commented on Feb 13, 2024

    @szokeasaurusrex
    Member

    Reopening this issue, because we had to revert #1930 to provide a temporary fix for #1939. Will try to figure out how we can introduce the functionality provided by #1930 in a non-breaking manner

  16. szokeasaurusrex commented on Feb 21, 2024

    @szokeasaurusrex
    Member

    We will wait on implementing a fix here until getsentry/sentry#64793 is completed, so we can more easily test the changes

  17. nhsiehgit commented on Mar 4, 2024

    @nhsiehgit

    Thsi should now be resolved via getsentry/sentry#65587

    Please reopen if youre still seeing an issue 🙏

  18. szokeasaurusrex commented on Mar 4, 2024

    @szokeasaurusrex
    Member

    Reopening, we still need to implement the fix in the Sentry CLI – see my comment above

  19. github-actions commented on Mar 26, 2024

    @github-actions
    Contributor

    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 Status: Backlog or Status: In Progress, I will leave it alone ... forever!


    "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions