-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
The plugin documentation suggests that the sha256 value is the checksum of the downloaded file. However, it fails when correct checksum is provided.
Checklist:
- I've included steps to reproduce the bug.
- I've included the version of argo rollouts.
Describe the bug
As per the function checkShaOfPlugin in downloader.go, the hasher.Sum() method appends the checksum to the bytes. Hence, the resulting value is not checksum but hexof(binary + checksum). This is inconsistent with the documentation. However, it is difficult to specific such big value in the configuration file.
To Reproduce
Sample config
- name: "argoproj-labs/gatewayAPI"
location: "https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/releases/download/v0.2.0/gateway-api-plugin-linux-amd64"
sha256: "7c76658725182703f3acdc6b1cf1ee02bdbac42a64ffc3f5f5eccb45c852dacb"Add the above configuration to your argorollout configuration.
Expected behavior
No errors should be thrown.
Version
I tested it with version v1.6.6. However, i see code in master also is the same.
Logs
# Paste the logs from the rollout controller
time="2024-04-10T07:00:50Z" level=info msg="expected sha256: 7c76658725182703f3acdc6b1cf1ee02bdbac42a64ffc3f5f5eccb45c852dacb, actual sha256: 7f454c4602010100000000000000000002003e000100000020934600000000004000000000000000c80100000000000000000000400038000700400017000300060000000400000040000000000000004000400000000000400040000000000088010000000000008801000000000000001000000000000004000000040000009c0f0000000000009c0f4000000000009c0f40000000000064000000000000006400000000000000040000000000000001000000050000000000000000000000000040000000000000004000000000006b063c01000000006b063c01000000000010000000000000010000000400000000103c010000000000107c010000000000107c0100000000007237010000000000723701000000000010000000000000010000000600000000907302000000000090b302000000000090b30200000000c00609000000000010100e0000000000001000000000000051e574640600000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000080150465002a00000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000010000000600000000000000001040000000000000100000000000006bf63b01000000000000000000000000200000000000000000000000000000005d00000001000000020000000000000000107c010000000000103c0100000000b714720000000000000000000000000020000000000000000000000000000000630100000300000000000000000000000000000000000000c024ae01000000006d01000000000000000000000000000001000000000000000000000000000000650000000100000002000000000000004026ee01000000004026ae010000000048f80000000000000000000000000000200000000000000000000000000000006f000000010000000200000000000000a01eef0100000000a01eaf0100000000985a000000000000000000000000000020000000000000000000000000000000790000000100000002000000000000003879ef01000000003879af01000000000000000000000000000000000000000001000000000000000000000000000000830000000100000002000000000000004079ef01000000004079af0100000000c008c40000000000000000000000000020000000000000000000000000000000350000000100000003000000000000000090b302000000000090730200000000e01500000000000000000000000000001000000000000000000000000000000007000000010000000300000000000000e0a5b30200000000e0a5730200000000186c070000000000000000000000000020000000000000000000000000000000120000000100000003000000000000000012bb020000000000127b0200000000b08401000000000000000000000000002000000000000000000000000000000018000000080000000300000000000000c096bc… [message truncated due to size]
# Logs for the entire controller:
kubectl logs -n argo-rollouts deployment/argo-rollouts
# Logs for a specific rollout:
kubectl logs -n argo-rollouts deployment/argo-rollouts | grep rollout=<ROLLOUTNAME
NA
Message from the maintainers:
Impacted by this bug? Give it a 👍. We prioritize the issues with the most 👍.