fix: sanitize colon in container name for tag+digest package refs#1
Closed
cahillsf wants to merge 26 commits into
Closed
fix: sanitize colon in container name for tag+digest package refs#1cahillsf wants to merge 26 commits into
cahillsf wants to merge 26 commits into
Conversation
* fix: factor stdout/stderr into Options insteaad of passing as args Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> * fix: factor stdout/stderr into Options insteaad of passing as args Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> * fix: Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> * fix: add test coverage for empty output format Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> * chore: ignore compiled Go test binaries Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> --------- Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ntrib#293) Signed-off-by: Stephen Cahill <stephen.cahill@datadoghq.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ntrib#284) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…lane-contrib#286) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ssplane-contrib#287) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ane-contrib#288) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…rity] (crossplane-contrib#292) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ity] (crossplane-contrib#297) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…e-contrib#298) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…to v2.2.1 (crossplane-contrib#301) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…rossplane-contrib#299) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…plane-contrib#300) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
crossplane-contrib#302) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…splane-contrib#303) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…splane-contrib#304) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ne-contrib#294) * fix(diff): assign placeholder UID to owner refs for new XRs When diffing a new XR against a cluster where composed resources already exist (e.g. after `kubectl delete xr --cascade=orphan`), every composed resource's dry-run apply failed with: metadata.ownerReferences.uid: Invalid value: "": must not be empty The render pipeline emits empty UIDs on owner refs when the XR has no cluster UID. UpdateOwnerRefs generates placeholder UIDs but was a no-op because it was called with composite=nil. Pass the input XR as the composite parent when xrDiff.Current is nil so UpdateOwnerRefs runs. Skipped for generateName-only XRs whose synthetic display name isn't a valid label selector value. Adds a regression test that uses a dry-run apply mock mirroring the apiserver's owner-ref UID validation. Signed-off-by: Erlend Fonnes <erlend.fonnes@gmail.com> * docs: correct generateName display-name example in comment The comment showed "foo-(generated)" but the code appends "(generated)" verbatim without an extra dash, producing names like "foo(generated)". Aligns the example with the actual format. Signed-off-by: Erlend Fonnes <erlend.fonnes@gmail.com> * fix: regenerate e2e expectations Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> * test: replace mock-based UT with envtest IT for new XR + existing composed The UT in diff_calculator_test.go encoded assumptions about the Crossplane render pipeline (empty-UID ownerRefs) and the apiserver's validation of them by mocking DryRunApply to mirror apiserver behavior. Replace it with an integration test in diff_integration_test.go that exercises the real envtest apiserver and the real render pipeline end-to-end, so the bug and its fix are covered without encoding behavior of out-of-unit components. Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> --------- Signed-off-by: Erlend Fonnes <erlend.fonnes@gmail.com> Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> Co-authored-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com>
…ntrib#295) * feat: support ExtraResources in function-go-templating, fix render error handling, update golang Signed-off-by: Jason Witkowski <jwitkowski@zscaler.com> * fix: remove prefetching; add new IT cases for extra resources in fn-gotpl as the 2nd+ element in a pipeline Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> --------- Signed-off-by: Jason Witkowski <jwitkowski@zscaler.com> Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> Co-authored-by: Jason Witkowski <jwitkowski@zscaler.com> Co-authored-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com>
…-contrib#305) * fix: version call to server should use kubeconfig context Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> * fix: update readme for documenting kubecfg precedence Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> * fix: go mod update Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> * fix: adversarial review Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> --------- Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com>
…b#283) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
….21.5 (crossplane-contrib#306) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…plane-contrib#307) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…e-contrib#308) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…-contrib#310) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
39d745b to
0efc56b
Compare
…-contrib#312) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…st package refs When a function package ref has both a tag and a digest (e.g., func:v0.6.1-0@sha256:751a...), the SHA256 branch of generateContainerName split on @sha256: but left the colon from the tag in the function name, producing an invalid Docker container name. Signed-off-by: Stephen Cahill <cahillsf9@gmail.com>
0efc56b to
cc93bda
Compare
Owner
Author
|
merged upstream crossplane-contrib#313 |
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
func:v0.6.1-0@sha256:751a...),generateContainerNamesplit on@sha256:but left the colon from the tag in the function name, producing an invalid Docker container nameInvalid container name (function-auto-ready:v0.6.1-0-751a4afb65f1-comp-...), only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowedxrcommand in fix: add support for requirements handling on eventual state crossplane-contrib/crossplane-diff#281Test plan
TagAndDigesttest case toTestGenerateContainerName🤖 Generated with Claude Code