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

Unblocks Agones release PR by waiting for either the Agones dev version or release version #4078

Merged
merged 2 commits into from
Jan 3, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions test/upgrade/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,14 +354,18 @@ func checkHelmStatus(agonesVersion string) string {
log.Fatal("Could not Unmarshal", err)
}

// Remove the commit sha from the DevVersion i.e. from 1.46.0-dev-7168dd3 to 1.46.0-dev
// Remove the commit sha from the DevVersion i.e. from 1.46.0-dev-7168dd3 to 1.46.0-dev or 1.46.0
// for the case of this test running during a new Agones version release PR.
agonesRelease := ""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(non blocking) in the future, may want to use a library like https://github.com/blang/semver (which we use in a few util scripts) to work with semantic versions, rather than regex things.

if agonesVersion == DevVersion {
r := regexp.MustCompile(`1\.\d+\.\d+-dev`)
agonesVersion = r.FindString(DevVersion)
r = regexp.MustCompile(`1\.\d+\.\d`)
agonesRelease = r.FindString(agonesVersion)
}

for _, status := range helmStatus {
if status.AppVersion == agonesVersion {
if (status.AppVersion == agonesVersion) || (status.AppVersion == agonesRelease) {
return status.Status
}
}
Expand Down
Loading