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

feat: Download CLI if preinstalled version is known bad #956

Merged
merged 1 commit into from
Jun 4, 2023

Conversation

justinvp
Copy link
Member

@justinvp justinvp commented Jun 2, 2023

Sometimes a release of the CLI contains a bug that is bad enough that we'd prefer users avoid using that version, to avoid the issue. For example, a bug that could cause stack corruption. We'd like to have a holistic way to "taint" a bad release, but in the meantime, one tactical change is to have the action prefer downloading a more recent version of the CLI if the version that is preinstalled has known issues. For now, the list is hardcoded, but in the future it could be stored in a centralized location that the action could check.

Fixes #955

@justinvp
Copy link
Member Author

justinvp commented Jun 2, 2023

We should be able to see the results with the existing tests that run in a workflow.

Edit: Actually, all the existing tests remove the pre-installed version before running. Added a new test that doesn't do that.

It works!

https://github.com/pulumi/actions/actions/runs/5160580403/jobs/9296769043?pr=956#step:4:41

2023-06-02T23:33:04.1614409Z [command]/usr/local/bin/pulumi version
2023-06-02T23:33:06.6492582Z v3.67.1
2023-06-02T23:33:06.9482533Z warning: A new version of Pulumi is available. To upgrade from version '3.67.1' to '3.69.0', visit https://pulumi.com/docs/reference/install/ for manual instructions and release notes.
2023-06-02T23:33:06.9540255Z Pulumi version 3.67.1 has a known issue. Proceeding to download
2023-06-02T23:33:07.0658228Z Matched version: v3.69.0
2023-06-02T23:33:07.0663858Z Install destination is /home/runner/.pulumi
2023-06-02T23:33:07.0681314Z Successfully deleted pre-existing /home/runner/.pulumi/bin

Sometimes a release of the CLI contains a bug that is bad enough that we'd prefer users avoid using that version, to avoid the issue. For example, a bug that could cause stack corruption. We'd like to have a holistic way to "taint" a bad release, but in the meantime, one tactical change is to have the action prefer downloading a more recent version of the CLI if the version that is preinstalled has known issues. For now, the list is hardcoded, but in the future it could be stored in a centralized location that the action could check.
@justinvp justinvp merged commit 668a21e into master Jun 4, 2023
@justinvp justinvp deleted the justin/knownbad branch June 4, 2023 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prefer downloading the CLI if the version preinstalled on the runner is known bad
3 participants