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

Automatically derive defaults versions from checksums #11906

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

VannTen
Copy link
Contributor

@VannTen VannTen commented Jan 21, 2025

What type of PR is this?
/kind feature

What this PR does / why we need it:
Currently, when updating checksums, we manually update the default versions.
However, AFAICT, for all components where we have checksums, we're using the newest version out of those checksums.

Codify this in the _version defaults variables definition to make the process automatic and reduce manual steps (as well as the diff size during reviews).
With this and:

we should have a pretty good story for automatic versions upgrades, hands-off. Just need to find how to run the updater + pre-commit and make a PR out of that.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:
/label ci-extended
(as we're touching versions of several stuff)

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. ci-extended Run additional tests cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 21, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: VannTen

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 21, 2025
@VannTen
Copy link
Contributor Author

VannTen commented Jan 21, 2025

(I've put this as draft because I don't think it can pass tests without #11890 merged)

@VannTen VannTen force-pushed the feat/automatic_default_version_upgrade branch from 7ae4dde to ced302a Compare January 23, 2025 17:15
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 24, 2025
Currently, when updating checksums, we manually update the default
versions.
However, AFAICT, for all components where we have checksums, we're using
the newest version out of those checksums.

Codify this in the `_version` defaults variables definition to make the
process automatic and reduce manual steps (as well as  the diff size
during reviews).

We assume the versions are sorted, with newest first. This should be
guaranteed by the pre-commit hooks.
The pre-commit hook introduced a142f40 (Update versions in README.md
with pre-commit, 2025-01-21) allow to update our README with new
versions.
It turns out other "static" files (== which don't interpret Ansible
variables) also use the default version (in that case, our Dockefiles,
but there might be others)
The Dockerfile breaks if the variable they use (`kube_version`) is a
Jinja template.

For helping with automatic version upgrade, generalize the hook to deal
with other static files, and make a template out of the Dockerfile.
All the ansible/python tooling for version is for version strings. YAML
unhelpfully consider some stuff as number, so enforce this.
@VannTen VannTen force-pushed the feat/automatic_default_version_upgrade branch from ced302a to 191ec7b Compare January 24, 2025 15:59
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 24, 2025
@VannTen VannTen marked this pull request as ready for review January 24, 2025 16:34
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 24, 2025
@VannTen
Copy link
Contributor Author

VannTen commented Jan 24, 2025

I expect a conflict with #11890 (since I stringified the versions here) but I'll fix it in whatever PR does not merge first.

@VannTen
Copy link
Contributor Author

VannTen commented Jan 24, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. ci-extended Run additional tests cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants