fix(publish charm): deduplicate charm artifacts in publish workflow#974
Open
fix(publish charm): deduplicate charm artifacts in publish workflow#974
Conversation
Multiple integration test jobs can build identical charms that get uploaded as separate artifacts. Without deduplication, the publish workflow would attempt to process all duplicate charm files. Use SHA-256 hashing combined with basename to deduplicate charm files that have both the same filename and identical content, while preserving legitimately different charms (e.g., different architectures).
3 tasks
seb4stien
approved these changes
Mar 18, 2026
srbouffard
approved these changes
Mar 18, 2026
Contributor
Test results for commit 8b8788eTest coverage for 8b8788e Static code analysis report |
Contributor
Test results for commit 8b8788eTest coverage for 8b8788e Static code analysis report |
Contributor
Test results for commit 8b8788eTest coverage for 8b8788e Static code analysis report |
Contributor
Test results for commit 8b8788eTest coverage for 8b8788e Static code analysis report |
Contributor
Test results for commit 8b8788eTest coverage for 8b8788e Static code analysis report |
Contributor
Test results for commit 8b8788eTest coverage for 8b8788e Static code analysis report |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Multiple integration test jobs can build identical charms that get uploaded as separate artifacts. The publish workflow downloads all these artifacts and processes them without deduplication, potentially causing issues with duplicate charm files.
For example, in run 23226829927, there are 4 identical charm artifacts from parallel test jobs that would all be processed.
Solution
Implemented content-based deduplication using SHA-256 hashing combined with basename. This ensures:
github-runner_amd64.charmandgithub-runner_arm64.charm) are preservedChanges
cryptoimport for SHA-256 hashinggetCharms()method that:basename + hashTesting
npm run package)npm run lint)