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

contrib: Support prereleases in release prep scripts #17502

Merged
merged 5 commits into from Oct 6, 2021

Conversation

joestringer
Copy link
Member

Add support for vX.Y.0-rcN and vX.Y.0-snapshotN prereleases into the
start-release.sh and submit-release.sh scripts.

@joestringer joestringer requested a review from a team as a code owner September 30, 2021 01:44
@joestringer joestringer added the release-note/misc This PR makes changes that have no direct user impact. label Sep 30, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Sep 30, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Sep 30, 2021
@joestringer joestringer marked this pull request as draft September 30, 2021 01:51
@joestringer
Copy link
Member Author

I've been testing these out to generate #17501 with a standard Cilium release process by just specifying the RC tag version. Will leave at draft until we go through the full process to see if there are missing pieces.

@joestringer
Copy link
Member Author

These changes will currently support preparing a vX.Y.0-rc0 release, but if we run it for vX.Y.0-rc1 then it will perform a diff between the latest vX.Y-1 series release rather than putting together a changelog for the vX.Y.0-rc0..vX.Y.0-rc1 changes.

@joestringer joestringer requested a review from aanm October 4, 2021 23:10
@joestringer joestringer removed the request for review from aditighag October 4, 2021 23:11
@joestringer joestringer marked this pull request as ready for review October 4, 2021 23:11
@joestringer joestringer requested a review from a team as a code owner October 4, 2021 23:39
@joestringer
Copy link
Member Author

I tested the first commit using instructions similar to those now updated in the .github issue template commit, and prepared v1.11.0-rc0 using those changes. The middle patches I just put together and I've done some initial testing locally to see whether they do roughly the correct thing, but we'll need to go through the -rc1 process to make sure that they work as intended all the way through. The issue template / docs updates, I've just assembled after the process so I think they capture everything that is needed but for those we would also need to follow the release process once more based on these instructions to iron out any bugs or missing steps.

Copy link
Member

@qmonnet qmonnet left a comment

Choose a reason for hiding this comment

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

Looks good as far as I can tell, with two minor comments you may feel free to ignore.

The git-foo and regexp magic in these files, plus my lack of experience on the release process, make any change rather hard to follow. I didn't see anything concerning, but in the end I'm mostly relying on your tests and experiments. (Nice to have some of the regexp handling factored under common.sh though.)

contrib/release/start-release.sh Outdated Show resolved Hide resolved
contrib/release/start-release.sh Outdated Show resolved Hide resolved
tail -n+4 $CHANGELOG >> $SUMMARY
if [ "$BRANCH" = "master" ]; then
echo "" >> $SUMMARY
echo "See the included CHANGELOG.md for a full list of changes." >> $SUMMARY
Copy link
Member Author

Choose a reason for hiding this comment

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

FWIW I set this like this because RCs almost always have a changelog too big for the GH issue template. It'd be nice to have a more robust way to detect this for the .0 release as well since we'll include full changelog there as well I think, but 🤷 this is good enough for now.

Add support for vX.Y.0-rcN and vX.Y.0-snapshotN prereleases into the
start-release.sh, submit-release.sh and tag-release.sh scripts.

Signed-off-by: Joe Stringer <joe@cilium.io>
Move all of the version regex handling for releases into the common
library script and reuse them from the release scripts.

Signed-off-by: Joe Stringer <joe@cilium.io>
Previously, we would try to fetch the most recent branch in the tree and
then use the version number in the most recent branch to understand
which was the most recent micro release. When preparing -rc0 for the new
release series, this would work correctly - for instance picking out
1.10 branch and finding the most recent 1.10.4 release from that branch.
But it did not work for -rc1.

Fix this by relying on the version-sorted list of tags from the upstream
remote repository and picking out the semantically most recent one.

If we're preparing a snapshot, it'll just try to pick up the most
semantically recent tagged version. If we're preparing an RC, then start
from either the most recent proper micro release or the most recent RC.

Signed-off-by: Joe Stringer <joe@cilium.io>
The instructions for release candidate releases are slightly adjusted
from a regular release. Add them into the main template that we use for
most releases, now that the scripts have been updated to support this
release type.

These steps also largely apply the same way for a release with the
format "vX.Y.Z-snapshotN".

Signed-off-by: Joe Stringer <joe@cilium.io>
These instructions are updated based on the latest changes to the
scripts to support release candidates, as well as the improvements to
Helm chart sanity checking that we now have via GH workflows on the
charts repository.

Signed-off-by: Joe Stringer <joe@cilium.io>
@joestringer
Copy link
Member Author

Travis failed due to ratelimit, but it wasn't testing anything in this PR. There's only contrib/ and docs changes, and docs tests passed. Good to merge.

@joestringer joestringer merged commit 446633e into cilium:master Oct 6, 2021
@joestringer joestringer deleted the submit/prerelease-scripts branch October 6, 2021 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants