-
Notifications
You must be signed in to change notification settings - Fork 49
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
Replacement transformer fails for list #534
Comments
I would like to pick this |
@gnana03 - it's all yours. Thanks. |
@gnana03 , what t-shirt size would you estimate this effort to be?
|
This issue seems invalid. We don't have to change object types, source and target fields types must match, so transformer behavior looks expected in described case. This is kind of protection measure - mixing types can cause multiple issues. Also, static validation (which we have enabled) verifies object type and its value as well, in case of mismatch - the error will be thrown. OpenAPIv3 schema doesn't support multiple types for an object: As a workaround, you can use smp or json patch to remove value first, then apply transformer. But I would not recommend doing this for schema-declared kinds. Since we don't have a defined OpenAPIv3 schema for VariableCatalogue, such workaround could be applied. [1] https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#schemaObject |
@hem2 Reddy, can you take a look at Ruslan's comments & let us know if this is still an issue? |
@ak3216 I agree with Ruslan. Let's close this. Thank you. |
@hem2 thanks! Closing per comments above. |
Describe the bug
Replacement transformer fails for list with "Error: wrong Node Kind for expected: ScalarNode was SequenceNode: value: . " error.
Steps To Reproduce
Change L47 to a list https://github.com/airshipit/airshipctl/blob/master/krm-functions/replacement-transformer/local-resource/example-use.yaml and run "kustomize fn run local-resource/example-use.yaml" and it fails with the above error.
Expected behavior
Replacement transformer should be able to replace of type list.
Environment
The text was updated successfully, but these errors were encountered: