-
Notifications
You must be signed in to change notification settings - Fork 1
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
Ignore beta releases #226
Ignore beta releases #226
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nit, but otherwise LGTM.
@@ -511,18 +511,25 @@ var getExpectedTargetLatest = stepv2.Func21E("From Upstream Releases", func(ctx | |||
name, upstreamOrg string) (*UpstreamUpgradeTarget, error) { | |||
latest := stepv2.Cmd(ctx, "gh", "release", "list", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use --json
when possible. Tracking issue is cli/cli#4572.
@@ -292,3 +290,50 @@ func TestGetExpectedTargetFromTarget(t *testing.T) { | |||
"GHIssues": null | |||
}`)) | |||
} | |||
|
|||
func TestFromUpstreamReleasesBetaIgnored(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding a test here!
Co-authored-by: Ian Wahbe <ian@wahbe.com>
…provider into vvm/ignore_beta_releases
…rgetLatest (#220) See #218 for details. Uses the full json repo info payload to determine the latest upstream release. See pulumi/pulumi-minio#251 for the fix applying to pulumi-minio specifically. Fixes #218. Fixes pulumi/pulumi-f5bigip#345 Fixes pulumi/pulumi-venafi#244 ~**Reviewer Note**: This functionality overrides the changes in #226. Note that we're returning an empty UpgradeTargetVersion in the case of a non-stable release, so that the nil check on `Plan Provider Upgrade` reports that we are up to date. A `latest` version with a beta tag should not fail the upgrade process; we should ignore it.~
Fixes pulumi/ci-mgmt#749
When looking up the latest version of an upstream provider, we should skip beta releases.
This PR achieves this by getting the list of the latest 30 releases and then iterating over them until it finds a non-beta release when looking up latest.