fix(catalog): Validate() no longer flags a private image bound in a local overlay - #38
Merged
Merged
Conversation
…ocal overlay Validate() checked List() (embedded + overlay merged) for the shipped-catalog-must-be-public rule (#392), so a machine with a ~/.spawn/catalog.yaml rebinding an app to a private ECR image — the overlay's whole purpose — failed as if the SHIPPED catalog were broken. Only the local (correctly private) overlay binding was private; the embedded catalog.yaml was fine. This broke `go test`/`make check` for any contributor with such an overlay, and spawn's TestCatalogValid calls Validate() directly, so it broke spawn's CI-equivalent too (spawn#489) — confirmed via a real ~/.spawn/catalog.yaml on this machine binding paraview/chimerax to a private registry. The public-image check now runs against the embedded catalog.yaml only (new embeddedApps() helper), not the overlay-merged List(). Added a regression test that reproduces the exact failure via withOverlay, verified it fails without the fix and passes with it. Fixes spawn#489.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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
catalog.Validate()'s public-image check (#392) ran againstList()— the embedded catalog merged with a user's local overlay — so any machine with a~/.spawn/catalog.yamlrebinding an app to a private ECR image (the overlay's entire purpose) failedValidate()as if the shipped catalog itself were broken.paraview/chimeraxrebound to a private registry) and confirmed it's what broke spawn#489'sTestCatalogValid, which callscatalog.Validate()directly.embeddedApps()(parsescatalog.yamldirectly, no overlay merge), notList().Fixes spawn#489.
Test plan
TestValidate_IgnoresOverlayPrivateImagereproduces the exact failure via the existingwithOverlaytest helper — confirmed it FAILS without the fix (sed'd the fix out, re-ran, restored) and PASSES with itgo test ./...— full suite green, no existing test changed behaviorgo build ./...,go vet ./...,gofmt -lcleangolangci-lint run ./catalog/...— 6 pre-existing issues in untouched files (main_test.go,resolve.go,resolve_test.go), confirmed identical with this change stashed out