fix: align archive-url with tarball naming (PRI-356)#165
Open
privilegedescalation-engineer[bot] wants to merge 1 commit intomainfrom
Open
fix: align archive-url with tarball naming (PRI-356)#165privilegedescalation-engineer[bot] wants to merge 1 commit intomainfrom
privilegedescalation-engineer[bot] wants to merge 1 commit intomainfrom
Conversation
Read package name from artifacthub-pkg.yml (artifacthub-pkg.yml-first) to determine both the tarball name and the archive-url committed to artifacthub-pkg.yml. Previously, both steps derived PKG_NAME from package.json, which produces a different naming convention than headlamp-plugin uses for actual tarballs (stripping @org/ prefix but not replacing / with -), causing archive-url to point to a non-existent asset for 6 of 7 plugins. Fixes PRI-356.
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.
Summary
Fixes two related bugs in
plugin-release.yamlthat caused ArtifactHubarchive-urlto point to a non-existent release asset for 6 of 7 plugins.Bug 1:
Update artifacthub-pkg.yml— wrong PKG_NAME sourceThe
Update artifacthub-pkg.ymlstep was derivingPKG_NAMEfrompackage.jsonusingsed 's|^@||' | tr '/' '-', which producesprivilegedescalation-headlamp-argocd-pluginfor scoped packages. But headlamp-plugin names tarballs using thenamefield fromartifacthub-pkg.yml, which isheadlamp-argocd-plugin(noprivilegedescalation-prefix). This mismatch madearchive-urlincorrect for 6 of 7 plugins.Bug 2:
Prepare release tarball— same PKG_NAME derivation bugThe same incorrect normalization was used in
Prepare release tarball. While the tarball rename logic (for f in *.tar.gz; do [ "$f" != "$TARBALL" ] && mv "$f" "$TARBALL") would correct most mismatches after the fact, the root cause was still the wrong naming convention.Fix
Both steps now use an
artifacthub-pkg.yml-first approach: readnamedirectly fromartifacthub-pkg.ymlif present, falling back to the corrected package.json normalization (sed 's|^@[^/]*/||'— strips@org/prefix but does not replace/with-).@priv.../headlamp-argocd-plugin-{v}.tar.gzheadlamp-argocd-{v}.tar.gzheadlamp-argocd-{v}.tar.gzkube-vip-{v}.tar.gzheadlamp-kube-vip-{v}.tar.gzheadlamp-kube-vip-{v}.tar.gztns-csi-{v}.tar.gzheadlamp-tns-csi-plugin-{v}.tar.gzheadlamp-tns-csi-plugin-{v}.tar.gzrook-{v}.tar.gzheadlamp-rook-plugin-{v}.tar.gzheadlamp-rook-plugin-{v}.tar.gzsealed-secrets-{v}.tar.gzheadlamp-sealed-secrets-{v}.tar.gzheadlamp-sealed-secrets-{v}.tar.gzintel-gpu-{v}.tar.gzheadlamp-intel-gpu-{v}.tar.gzheadlamp-intel-gpu-{v}.tar.gzReview chain
Regina (QA) → Patty (UAT) → Nancy (CTO) → CEO merge