-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Do not choke if the download_file
task is invoked without a checksum
#12282
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
Do not choke if the download_file
task is invoked without a checksum
#12282
Conversation
Previously (before 800c84d), `download_file` tasks were invoked with a `sha256` (not a `checksum` parameter) and if not provided, downloads were done without verifying checksums. That patch changed things (`sha256` -> `checksums`), but it seems like unintentionally also made `checksum` required (no more `omit` fallbacks). At least some invocations of `download_file` do not provide a `checksum`, as reported here (for the ArgoCD addon): kubernetes-sigs#12223 The failure behavior is also appaling, because the download task (which references `checksum`) has `no_log` enabled by default (via the `unsafe_show_logs` variable, defaulting to `false`), so users would see a failing download, but could not easily figure out that it's actually an "undefined variable" error. While checksum support for ArgoCD is being added in kubernetes-sigs#12266 it's probably better to restore the ability to invoke `download_file` without `checksum`, so that: - any other current no-`checksum` callers (like ArgoCD) would be instantly made to work again - any future calls without `checksum` would work, and not choke silently (due to `no_log`)
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: spantaleev The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @spantaleev. Thanks for your PR. I'm waiting for a kubernetes-sigs 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. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Sorry, this was not an unintentional change. Silently accepting lack of hash is not an option if we ever want to have an acceptable story on supply chain security. An explicit opt-in to disable the hash check might be merged, but that'd need to be carefully done and probably needs some discussion. |
I understand that it's better to have checksums for everything. That said, neither the 800c84d commit, nor the #11890 pull request and comments comment on this being an explicit breaking change. The fact that at least one service (ArgoCD) and possibly others were broken and that the |
We certainly could have communicated this better, I'll give you that. Unfortunately, there is not enough time and too much technical debt in Kubespray to foresee everything, particulary for kubernetes-apps (which mostly consists of things better deployed by something else). |
Previously (before 800c84d),
download_file
tasks were invoked with asha256
(not achecksum
parameter) and if not provided, downloads were done without verifying checksums.That patch changed things (
sha256
->checksums
), but it seems like unintentionally also madechecksum
required (no moreomit
fallbacks). At least some invocations ofdownload_file
do not provide achecksum
, as reported here (for the ArgoCD addon): #12223The failure behavior is also appaling, because the download task (which references
checksum
) hasno_log
enabled by default (via theunsafe_show_logs
variable, defaulting tofalse
), so users would see a failing download, but could not easily figure out that it's actually an "undefined variable" error.While checksum support for ArgoCD is being added in #12266 it's probably better to restore the ability to invoke
download_file
withoutchecksum
, so that:checksum
callers (like ArgoCD) would be instantly made to work againchecksum
would work, and not choke silently (due tono_log
)What type of PR is this?
Which issue(s) this PR fixes:
Fixes #12223
Special notes for your reviewer:
None
Does this PR introduce a user-facing change?: