Skip to content
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

[CMD] kamel bind empty error handler #2493

Closed
squakez opened this issue Jul 12, 2021 · 1 comment · Fixed by #2496
Closed

[CMD] kamel bind empty error handler #2493

squakez opened this issue Jul 12, 2021 · 1 comment · Fixed by #2496

Comments

@squakez
Copy link
Contributor

squakez commented Jul 12, 2021

I think the test spotted an hidden issue:

=== RUN   TestKamelCLIBind/bind_timer_to_log
KameletBinding.camel.apache.org "test-timer-source-to-log" is invalid: []: Invalid value: map[string]interface {}{"kind":"KameletBinding", "apiVersion":"camel.apache.org/v1alpha1", "metadata":map[string]interface {}{"uid":"2948e0fe-e2f1-11eb-b545-000d3a02688e", "selfLink":"", "clusterName":"", "name":"test-timer-source-to-log", "namespace":"test-6a95d672-8ac8-4df7-8688-1eacb6220973", "creationTimestamp":"2021-07-12T09:11:37Z", "generation":1}, "spec":map[string]interface {}{"source":map[string]interface {}{"ref":map[string]interface {}{"kind":"Kamelet", "namespace":"test-6a95d672-8ac8-4df7-8688-1eacb6220973", "name":"test-timer-source", "apiVersion":"camel.apache.org/v1alpha1"}, "properties":map[string]interface {}{"message":"helloTest"}}, "sink":map[string]interface {}{"uri":"log:info"}, "errorHandler":interface {}(nil)}}: validation failure list:
spec.errorHandler in body must be of type object: "null"

Probably the bind operation is setting a null error handler, when instead it should be omitted as empty.

Originally posted by @squakez in #2461 (comment)

@squakez
Copy link
Contributor Author

squakez commented Jul 12, 2021

I am having a look at it. cc @vsokolov00

@squakez squakez changed the title [CMD] kamel bind empty error handler [CMD] kamel bind empty error handler Jul 12, 2021
squakez added a commit to squakez/camel-k that referenced this issue Jul 12, 2021
Using a pointer in order to admit an empty value instead of a null when marshalling the KameletBindingSpec

Closes apache#2493
squakez added a commit to squakez/camel-k that referenced this issue Jul 13, 2021
Using a pointer in order to admit an empty value instead of a null when marshalling the KameletBindingSpec

Closes apache#2493
nicolaferraro pushed a commit that referenced this issue Jul 15, 2021
Using a pointer in order to admit an empty value instead of a null when marshalling the KameletBindingSpec

Closes #2493
squakez added a commit to squakez/camel-k that referenced this issue Jul 15, 2021
Using a pointer in order to admit an empty value instead of a null when marshalling the KameletBindingSpec

Closes apache#2493
squakez added a commit to jboss-fuse/camel-k that referenced this issue Jul 15, 2021
Using a pointer in order to admit an empty value instead of a null when marshalling the KameletBindingSpec

Closes apache#2493
squakez added a commit to squakez/camel-k that referenced this issue Jul 15, 2021
Using a pointer in order to admit an empty value instead of a null when marshalling the KameletBindingSpec

Closes apache#2493
squakez added a commit to squakez/camel-k that referenced this issue Jul 15, 2021
Using a pointer in order to admit an empty value instead of a null when marshalling the KameletBindingSpec

Closes apache#2493
nicolaferraro pushed a commit that referenced this issue Jul 16, 2021
Using a pointer in order to admit an empty value instead of a null when marshalling the KameletBindingSpec

Closes #2493
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant