Fix kubebuilder enum for StringTransformType: add Join and Replace#296
Closed
StuporHero wants to merge 1 commit intocrossplane-contrib:mainfrom
Closed
Fix kubebuilder enum for StringTransformType: add Join and Replace#296StuporHero wants to merge 1 commit intocrossplane-contrib:mainfrom
StuporHero wants to merge 1 commit intocrossplane-contrib:mainfrom
Conversation
The Join string transform type was added in v0.7.0 (crossplane-contrib#133) and Replace was added later, but the kubebuilder validation enum marker on StringTransform.Type was not updated to include them. This causes CRD schema validation to reject valid Compositions using these transform types. Signed-off-by: Michael Juliano <michaelj@sunsofterp.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1130e8e to
fbdf1d2
Compare
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.
Description
The
Joinstring transform type was added in v0.7.0 (#133) andReplacewas added later, but the kubebuilder validation enum marker onStringTransform.Typewas not updated to include them. This causes the generated CRD schema to reject valid Compositions that use these transform types.The Go code correctly defines the constants:
But the marker only lists:
// +kubebuilder:validation:Enum=Format;Convert;TrimPrefix;TrimSuffix;RegexpChanges
JoinandReplacego generate ./input/...How was this change tested?
CRD regeneration via
go generate— the updated CRD now includesJoinandReplacein all string transform type enums.