Skip to content

rke2: switch to minor release versions#379844

Merged
zimbatm merged 8 commits intoNixOS:masterfrom
rorosen:rke2-numbered-releases
Feb 24, 2025
Merged

rke2: switch to minor release versions#379844
zimbatm merged 8 commits intoNixOS:masterfrom
rorosen:rke2-numbered-releases

Conversation

@rorosen
Copy link
Contributor

@rorosen rorosen commented Feb 6, 2025

The basic idea of this contribution is to follow minor release versions of RKE2, instead of named release channels. However, the changes also include fixes in update and build scripts that I noticed along the way.

Here is roughly what I did:

  • Set the old version, which was somehow set to an unbound variable, in the update script output
  • Make the update script expect a minor version instead of a release channel
  • Remove unused variables from the update script
  • Set aliases for rke2_stable and rke2_latest releases in the update script
  • Fix the used package in version tests, previously all version test used the same rke2 package (so the test failed for all other packages)
  • Remove rke2_testing as the release channel doesn't serve releases
  • Init all currently active RKE2 releases (e.g. rke2_1_32)
  • Update the RKE2 docs on how to handle new releases and EOL packages (some of it copied from k3s)

Closes #379547

@zimbatm @stefan-bordei @mogeko @frederictobiasc

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Feb 6, 2025
Get the old version and use it in the update script, instead of using an
unbound variable.
Things done:

- Make the update script expect a minor version instead of a release
channel
- Remove unused variables from update script
- Set aliases for stable and latest releases in update script
- Use yq to create update script output
- Update version documentation
Use the right rke2 package in testVersion, instead of using the rke2
package, which points to rke2_stable, for all tests.
The RKE2 testing channel no longer serves releases.
https://github.com/rancher/rke2/releases/tag/v1.31.5%2Brke2r1

Additionally, rke2_stable now is an alias to rke_1_31 as both are the
same package.
https://github.com/rancher/rke2/releases/tag/v1.32.1%2Brke2r1

Additionally, rke2_latest now is an alias to rke2_1_32, as both are the
same package.
@rorosen rorosen force-pushed the rke2-numbered-releases branch from a1896d8 to 36cb383 Compare February 8, 2025 10:33
Copy link
Member

@zimbatm zimbatm left a comment

Choose a reason for hiding this comment

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

just noticed this review was left open. sorry for the wait.

overall the change makes sense to me.

Copy link
Member

Choose a reason for hiding this comment

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

I guess buildGoModule doesn't support the (final: { ... }) style argument? This could avoid the let and rec bindings.

This is more of a styling issue, so not a blocker.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great idea but I think this isn't supported, at least I can't get it to work

@zimbatm zimbatm merged commit fbd134f into NixOS:master Feb 24, 2025
27 checks passed
@rorosen rorosen deleted the rke2-numbered-releases branch February 24, 2025 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rke2: package all upstream releases and mirror versions transparently

2 participants