Repository navigation
Allow '=' in push artifact annotation values - #6159
Open
sarankumar1325 wants to merge 1 commit into
Open
sarankumar1325 wants to merge 1 commit into
sarankumar1325 wants to merge 1 commit into
Conversation
flux push artifact split each --annotations value on every '=' and rejected anything that did not give exactly two parts, so values such as URLs with query strings or base64 padding could not be set. Split on the first '=' only. Signed-off-by: Saran Kumar <120080287+sarankumar1325@users.noreply.github.com> Assisted-by: Grok Bot/grok
This branch has not been deployed
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.
flux push artifact --annotationssplit each value on every=and rejected anything that didn't give exactly two parts. That made it impossible to set values that contain=, for example:The fix splits on the first
=only (strings.Cut). Input without any=still returns the same error.Tests:
TestPushArtifactAnnotationValueWithEqualspushes to the test registry and checks the manifest annotations. It fails without the fix.TestPushArtifactInvalidAnnotationchecks that the error for a missing=is kept. I rango test --tags=unit ./cmd/flux/ -run 'Artifact|Push',go vetandgofmt.AI disclosure: prepared with an AI assistant (Grok Bot), following AGENTS.md. I reviewed the change.