helm-upload sha check is not effective plus incorrect logic
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Medium
|
Igor Pires Soares |
Bug Description
Brief Description
-----------------
There are a couple issues with the changes made below.
1. The change will compare an sha of a chart to be uploaded vs one already in the repo. These are just tarballs being compared, not the files inside. The more important thing to check is that the files inside are the same, not the tarball, as the sha will be different for the same exact chart contents every time a "helm package" is run to produce a tarball (2 tarballs can have identical contents with different shas). In effect, this will erroneously prevent an application-update with helm charts of the same version and same exact helm chart contents, though different helm chart sha, from proceeding correctly.
2. The Try/Except block in function _upload_helm_charts on line 912 is done over a loop of uploading all application helm charts. If the first helm chart being upload hits the ""Chart X already exists in the Y repository. Skipping upload." case for example, the application-update will proceed on its merry way without having loaded all the helm charts. If this one particular error/warning is survivable it should to be checked inside the "for chart in charts" loop.
https:/
https:/
Severity
--------
Major: System/Feature is usable but degraded
Steps to Reproduce
------------------
Application-update to a tarball with the same helm chart versions but different shas (same contents) Application-update will fail.
Expected Behavior
------------------
Application-update passes
Actual Behavior
----------------
Application-update fails
Reproducibility
---------------
100%
System Configuration
-------
All
Branch/Pull Time/Commit
-------
See commits mentioned.
Last Pass
---------
Did this test scenario pass previously? If so, please indicate the load/pull time info of the last pass.
Use this section to also indicate if this is a new test scenario.
Timestamp/Logs
--------------
N/A
Test Activity
-------------
Developer Testing
Workaround
----------
Upversion all helm charts of an application for every application-update, though this will lengthen the time taken for the application-update to complete as some helm releases will be upgraded needlessly.
Changed in starlingx: | |
status: | New → In Progress |
Changed in starlingx: | |
importance: | Undecided → Medium |
assignee: | nobody → Igor Pires Soares (ipiresso) |
tags: | added: stx.10.0 stx.containers |
I guess this is a known issue wrt helm package: https:/ /github. com/helm/ helm/issues/ 3612 Still an issue. Until this is solved, we can't rely on shas to determine whether 2 helm tarballs are the same.