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

k3s: source k3s version.sh in update script to get component versions #392397

Merged
merged 1 commit into from
Mar 25, 2025

Conversation

rorosen
Copy link
Contributor

@rorosen rorosen commented Mar 23, 2025

The containerd versions were wrong for k3s_1_31 and k3s_1_32. These use containerd v2 and thus the update script failed to get the correct version. Sourcing version.sh fixes this, should adapt better to similar upstream changes and eliminates a lot of custom logic for version parsing. Additionally, the update script gets rid of several curls of single files, by using them directly from the prefetched k3s repo.

@NixOS/k3s

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.

Sourcing the upstream version script is easier and more reliable than
grepping for component versions. This also fixes the containerd version
used for 1_31 and 1_32, the update script set them wrongly previously.
@github-actions github-actions bot added 6.topic: k3s Kubernates distribution (https://k3s.io/) 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Mar 23, 2025
@marcusramberg
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 392397


aarch64-linux

✅ 2 packages built:
  • k3s (k3s_1_32)
  • k3s_1_31

Copy link
Contributor

@marcusramberg marcusramberg left a comment

Choose a reason for hiding this comment

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

lgtm!

@wegank wegank added 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package 12.approvals: 1 This PR was reviewed and approved by one reputable person labels Mar 24, 2025
Copy link
Member

@wrmilling wrmilling left a comment

Choose a reason for hiding this comment

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

LGTM

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 392397


x86_64-linux

✅ 2 packages built:
  • k3s
  • k3s_1_31

@wrmilling wrmilling added 12.approvals: 2 This PR was reviewed and approved by two reputable people and removed 12.approvals: 1 This PR was reviewed and approved by one reputable person labels Mar 25, 2025
@Mic92 Mic92 merged commit e353cef into NixOS:master Mar 25, 2025
46 checks passed
@rorosen rorosen deleted the source-k3s-version-script branch March 25, 2025 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: k3s Kubernates distribution (https://k3s.io/) 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 12.approvals: 2 This PR was reviewed and approved by two reputable people 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants