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
release(upgradetest): confirm postrelease version is newer than the latest sourcegraph version #62463
Conversation
if latestFullVer == nil || tag.GreaterThan(latestFullVer) { | ||
latestFullVer = tag | ||
if latestFullVer == nil || v.GreaterThan(latestFullVer) { | ||
latestFullVer = v | ||
} | ||
latestMinorVer, err = semver.NewVersion(fmt.Sprintf("%d.%d.0", latestFullVer.Major(), latestFullVer.Minor())) | ||
if err != nil { | ||
return nil, nil, nil, nil, nil, nil, err | ||
} | ||
} |
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.
@DaedalusG I took the liberty of tweaking the logic here as I don't think we need the second loop here. Moving this logic after appending to validTags
will achieve the same result albeit faster.
Let me know if you have concerns
} | ||
latestMinorVer, err = semver.NewVersion(fmt.Sprintf("%d.%d.0", latestFullVer.Major(), latestFullVer.Minor())) | ||
if err != nil { | ||
return nil, nil, nil, nil, nil, nil, err | ||
} | ||
} | ||
|
||
semverPostRelease := semver.MustParse(postRelease) |
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 probably wrap this in a check to make sure the postRelease flag is set. There are ways to run this test without specifying postRelease targets
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.
Oh I see. Added an if
check to only do this is the postRelease
flag is set.
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.
@DaedalusG Can you re-review when you have some time?
… newer than the latest sourcegraph version (#62651) release(upgradetest): confirm postrelease version is newer than the latest sourcegraph version (#62463) * check for post release version * check if postRelease is provided (cherry picked from commit c1e29f0) Co-authored-by: Bolaji Olajide <25608335+BolajiOlajide@users.noreply.github.com>
Last week, I ran into an obscure error where an internal release build had it's release tests failing.
Context
This led to an hypothesis where we believe the version I was trying to release
5.3.666
was assumed by the tests to be behind the latest version5.3.12303
. I added this check to ensure this doesn't repeat itself.Test plan
Will test during the release testing later.