Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
kubeadm: add final fallback to constants.CurrentKubernetesVersion #72454
What this PR does / why we need it:
It may happen that both the git version and the remote version
To overcome this situation fall back to the constant CurrentKubernetesVersion.
The alternative could be os.Exit(1).
Also this change fixes bazel-based unit tests in air-gapped environment.
What type of PR is this?
Does this PR introduce a user-facing change?:
Hi @rojkov. Thanks for your PR.
I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with
Once the patch is verified, the new status will be reflected by the
I understand the commands that are listed here.
fabriziopandini left a comment
@rojkov first of all sorry for the delay in reviewing this PR.
As per slack discussion, I understood that adding a third fallback rule for version discovery is a necessary evil in for following us cases:
The proposed fallback method is not perfect, because it will always point at the .0 patch of each minor, but I think it is acceptable for the above use cases (running unit tests).
However, in my humble opinion, this function is already too complicated and I think that we cannot insert additional complexity without cleaning up some technical debt.
The expected benefit of the above proposal is to spilt the fallback logic from the label resolving/recursive logic, thus hopefully improving code readability/maintenabily/testability.
Basically it implements your suggestion already. I wanted to rebase it on top of this PR, but I can do the other way around.
[APPROVALNOTIFIER] This PR is APPROVED
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