Skip to content
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

Upgrade to specific version #2175

Open
jasondentler opened this issue Oct 1, 2024 · 4 comments
Open

Upgrade to specific version #2175

jasondentler opened this issue Oct 1, 2024 · 4 comments

Comments

@jasondentler
Copy link

In our CI server, we pin the version of sentry-cli for repeatability. Currently, our build script has to do the following:

  1. Check if sentry-cli is installed at all.
  2. Move package.json if it exists (because of Can't uninstall or upgrade Sentry CLI if install folder contains package.json, even if not managed by npm/yarn #2174)
  3. Check the version number of that installed version.
  4. Compare the installed version number to the desired version number
  5. Uninstall if we have the wrong version
  6. Install the desired version
  7. Move package.json back

Adding a --version option to sentry-cli update would allow us to simply update to the desired version.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Oct 1, 2024
@szokeasaurusrex
Copy link
Member

Thanks for the feature suggestion @jasondentler.

However, I think this feature might not be super useful; if your CI has a version of sentry-cli which was released before we add the --version option, you would still need to fall back to your current workflow of uninstalling the current version before installing the desired version. Having the --version option would just make your logic more complex, since you would need to do different things based on whether your Sentry CLI version supports the --version argument.

That being said, we can still add this, I am just a bit skeptical of whether it actually will improve things for you.

@jasondentler
Copy link
Author

Thanks @szokeasaurusrex Once this is supported, I plan to uninstall sentry-cli by hand from all our build agents. It'll install the correct new version on the next run.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Oct 2, 2024
@szokeasaurusrex
Copy link
Member

Got it – if you're able to ensure that all of your runners have a new-enough Sentry CLI version, then this would work

@szokeasaurusrex
Copy link
Member

I am gonna place this on our backlog, and it might take us some time to get around to it. But, please feel free to submit a PR if you would like to see this resolved sooner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants