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

add stable.txt #16453

Merged
merged 1 commit into from Jun 15, 2021
Merged

add stable.txt #16453

merged 1 commit into from Jun 15, 2021

Conversation

rolinh
Copy link
Member

@rolinh rolinh commented Jun 7, 2021

Add stable.txt, a file in the master branch that always points to the
latest stable release of Cilium. This file can be used as a reference by
tools such as the Cilium CLI to get the latest stable release version.
This pattern and file is already applied to the Hubble CLI repository.

Ultimately, this new file will allow the Cilium CLI to always install
the latest version of Cilium, as initially planned, instead of the
version hardcoded in the CLI binary.

@rolinh rolinh requested review from kaworu, nbusseneau and aanm June 7, 2021 08:33
@rolinh rolinh requested review from a team as code owners June 7, 2021 08:33
@rolinh rolinh requested a review from qmonnet June 7, 2021 08:33
@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 Jun 7, 2021
@rolinh rolinh added the release-note/misc This PR makes changes that have no direct user impact. label Jun 7, 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 Jun 7, 2021
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.

The current version for the master branch is in VERSION, should the new file be named STABLE for consistency?

Copy link
Member

@nbusseneau nbusseneau left a comment

Choose a reason for hiding this comment

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

LGTM, not sure if we want to leave it as a manual step in the release process or automate but in either case this will help cilium/cilium-cli#272.

@aanm While we're at it, should we also update step 15 so that quay.io stable tag do not get forgotten on next release?

@qmonnet qmonnet added the dont-merge/needs-rebase This PR needs to be rebased because it has merge conflicts. label Jun 9, 2021
Copy link
Member

@aanm aanm left a comment

Choose a reason for hiding this comment

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

Sorry for taking too much time reviewing the PR. There was a discussion on slack where I've proposed the following:

having a stable.txt will kind of not work well when we branch off, i.e., is one more thing that we need to take care of when doing releases. Can't we use the versions available in our helm repositories and use them instead? For example if I type, helm search repo cilium/cilium --versions it shows me all versions available.

I meant that stable.txt will also be available in stable branches.

Would that be reasonable?

@aanm
Copy link
Member

aanm commented Jun 11, 2021

Also adding @joestringer take a look as well

@joestringer
Copy link
Member

I like the helm proposal at first glance, for what it's worth. Seems like less work on the release management side, but I guess maybe requires more processing on the external component to understand what the stable version is since they would have to query Helm and process its output.

Another option would actually be to just add the stable.txt into the github.com/cilium/charts repo, then we don't have the question of how to deal with Cilium branching.

@rolinh
Copy link
Member Author

rolinh commented Jun 14, 2021

I meant that stable.txt will also be available in stable branches.

I don't think this is required and thus unnecessary. Only the stable.txt in the master branch needs to be updated (and the file could be deleted when branching out a minor version (e.g. v1.11)).

Another option would actually be to just add the stable.txt into the github.com/cilium/charts repo, then we don't have the question of how to deal with Cilium branching.

I don't think we have this question here either. The only requirement is to be able to retrieve the very latest stable release version, not every supported stable release versions.

@joestringer
Copy link
Member

joestringer commented Jun 14, 2021

and the file could be deleted when branching out a minor version (e.g. v1.11).

This seems reasonable, if that's the case can we add the step to Documentation/contributing/release/feature.rst in this PR? That's where we track the tasks for a feature/minor version release.

I'd also love for the step for new stable/micro release to be integrated into contrib/release/bump-readme.sh rather than just added as a step in the docs, since that script currently handles 100% of the master changes for any given release, and is ready to be integrated into automation workflows; adding another step in the docs moves us back away from that. If that change seems straightforward to you, please propose it in this PR; I'll review & we can test it out next time we do a release. If it seems more complicated then I guess I'll figure it out next release.

@rolinh
Copy link
Member Author

rolinh commented Jun 14, 2021

I'd also love for the step for new stable/micro release to be integrated into contrib/release/bump-readme.sh rather than just added as a step in the docs

Makes sense. How does one know about the latest stable release though? Should it be a parameter to pass to the script?

@joestringer
Copy link
Member

Makes sense. How does one know about the latest stable release though? Should it be a parameter to pass to the script?

I guess depends on how robust we want to make it. The script currently just greps for General Announcement in the README.rst and then iterates through each of the release series, then uses git describe --tags for the minor version to figure out the most recent micro release.

Seems like for the first match of General Announcement we can also echo the discovered micro release version to the stable.txt. It's unlikely we'll change the ordering of the releases to put the most recent minor release lower in the list. Nice thing about this would be that we still don't need to provide any parameters, you just run the script and it figures everything out by itself.

@rolinh rolinh removed the dont-merge/needs-rebase This PR needs to be rebased because it has merge conflicts. label Jun 14, 2021
@rolinh
Copy link
Member Author

rolinh commented Jun 15, 2021

Seems like for the first match of General Announcement we can also echo the discovered micro release version to the stable.txt. It's unlikely we'll change the ordering of the releases to put the most recent minor release lower in the list.

I implemented this suggested approach. PTAL.

@rolinh rolinh requested a review from aanm June 15, 2021 15:53
Add `stable.txt`, a file in the master branch that always points to the
latest stable release of Cilium. This file can be used as a reference by
tools such as the Cilium CLI to get the latest stable release version.
This pattern and file is already applied to the Hubble CLI repository.

Ultimately, this new file will allow the Cilium CLI to always install
the latest version of Cilium, as initially planned[0], instead of the
version hardcoded in the CLI binary.

[0]: cilium/cilium-cli#121 (comment)

Co-authored-by: Joe Stringer <joe@cilium.io>
Signed-off-by: Robin Hahling <robin.hahling@gw-computing.net>
Signed-off-by: Joe Stringer <joe@cilium.io>
Copy link
Member

@joestringer joestringer left a comment

Choose a reason for hiding this comment

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

Thanks for fixing up the script, LGTM.

@joestringer joestringer merged commit 5501387 into master Jun 15, 2021
@joestringer joestringer deleted the pr/rolinh/stable.txt branch June 15, 2021 18:17
tklauser added a commit to cilium/cilium-cli that referenced this pull request Jul 8, 2021
As of cilium/cilium#16453 cilium provides a
stable.txt file in the master branch pointing to the latest stable
version. Use it to report that latest stable version in `cilium
version`.

Suggested-by: Robin Hahling <robin.hahling@gw-computing.net>
Signed-off-by: Tobias Klauser <tobias@cilium.io>
tklauser added a commit to cilium/cilium-cli that referenced this pull request Jul 12, 2021
As of cilium/cilium#16453 cilium provides a
stable.txt file in the master branch pointing to the latest stable
version. Use it to report that latest stable version in `cilium
version`.

Suggested-by: Robin Hahling <robin.hahling@gw-computing.net>
Signed-off-by: Tobias Klauser <tobias@cilium.io>
tklauser added a commit to cilium/cilium-cli that referenced this pull request Jul 12, 2021
As of cilium/cilium#16453 cilium provides a
stable.txt file in the master branch pointing to the latest stable
version. Use it to report that latest stable version in `cilium
version`.

Suggested-by: Robin Hahling <robin.hahling@gw-computing.net>
Signed-off-by: Tobias Klauser <tobias@cilium.io>
aditighag pushed a commit to aditighag/cilium-cli that referenced this pull request Apr 21, 2023
As of cilium/cilium#16453 cilium provides a
stable.txt file in the master branch pointing to the latest stable
version. Use it to report that latest stable version in `cilium
version`.

Suggested-by: Robin Hahling <robin.hahling@gw-computing.net>
Signed-off-by: Tobias Klauser <tobias@cilium.io>
michi-covalent pushed a commit to michi-covalent/cilium that referenced this pull request May 30, 2023
As of cilium#16453 cilium provides a
stable.txt file in the master branch pointing to the latest stable
version. Use it to report that latest stable version in `cilium
version`.

Suggested-by: Robin Hahling <robin.hahling@gw-computing.net>
Signed-off-by: Tobias Klauser <tobias@cilium.io>
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

7 participants