-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(feature): preserves original target namespace #1148
fix(feature): preserves original target namespace #1148
Conversation
This change ensures that original target namespace is used when invoked directly in the builder. Typically subsequent calls of .TargetNamespace in the feature builder indicate coding/copy-paste error and should be reduced to one. However,in the FeatureHandler, where we group features together we do not have to specify target namespace for each feature, as it is defaulted to the one defined on the handler level. This is convenient, but limits application of features to a single namespace, as the value is always overwritten.
/retest |
@@ -67,9 +67,11 @@ func (fb *featureBuilder) Source(source featurev1.Source) *featureBuilder { | |||
} | |||
|
|||
// TargetNamespace sets the namespace in which the feature should be applied. | |||
// If not set, the feature will be applied in the application namespace. | |||
// Calling it multiple times in the builder chain will have no effect, as the first value is used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the original comments is still valid, but with this new one to explain the case "if it has been set"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not on this level, no. If not set it will fail. Implicitly setting the target namespace before building feature is done in the handler, but that's different.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: zdtsw The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
a890ffa
into
opendatahub-io:incubation
This change ensures that original target namespace is used when invoked directly in the builder. Typically subsequent calls of .TargetNamespace in the feature builder indicate coding/copy-paste error and should be reduced to one. However,in the FeatureHandler, where we group features together we do not have to specify target namespace for each feature, as it is defaulted to the one defined on the handler level. This is convenient, but limits application of features to a single namespace, as the value is always overwritten.
This change ensures that original target namespace is used when invoked directly in the builder. Typically subsequent calls of .TargetNamespace in the feature builder indicate coding/copy-paste error and should be reduced to one. However,in the FeatureHandler, where we group features together we do not have to specify target namespace for each feature, as it is defaulted to the one defined on the handler level. This is convenient, but limits application of features to a single namespace, as the value is always overwritten. (cherry picked from commit a890ffa)
This change ensures that original target namespace is used when invoked directly in the builder. Typically subsequent calls of .TargetNamespace in the feature builder indicate coding/copy-paste error and should be reduced to one. However,in the FeatureHandler, where we group features together we do not have to specify target namespace for each feature, as it is defaulted to the one defined on the handler level. This is convenient, but limits application of features to a single namespace, as the value is always overwritten. (cherry picked from commit a890ffa)
Description
This change ensures that original target namespace is used when invoked directly in the builder.
Typically subsequent calls of
.TargetNamespace
in the feature builder indicate coding/copy-paste error and should be reduced to one.However,in the FeatureHandler, where we group features together we do not have to specify target namespace for each feature, as it is defaulted to the one defined on the handler level. This is convenient, but limits application of features to a single namespace, as the value is always overwritten.
How Has This Been Tested?
By running
make
tests.Screenshot or short clip
Merge criteria