-
Notifications
You must be signed in to change notification settings - Fork 117
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: kafka controller does not panic on invalid kafka client config #3938
fix: kafka controller does not panic on invalid kafka client config #3938
Conversation
Signed-off-by: Calum Murray <cmurray@redhat.com>
/cherry-pick release-1.14 |
@Cali0707: once the present PR merges, I will cherry-pick it on top of release-1.14 in a new PR and assign it to you. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/cherry-pick release-1.13 |
@Cali0707: once the present PR merges, I will cherry-pick it on top of release-1.13 in a new PR and assign it to you. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3938 +/- ##
=======================================
Coverage 48.24% 48.24%
=======================================
Files 246 246
Lines 14500 14502 +2
=======================================
+ Hits 6995 6997 +2
Misses 6799 6799
Partials 706 706 ☔ View full report in Codecov by Sentry. |
if cg.Spec.Template.Spec.Configs.Configs == nil { | ||
return fmt.Errorf("no consumer config supplied, unable to get bootstrap.servers") | ||
} |
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.
This seems to be better suited for Validate
so that it gets rejected from the beginning ?
if cg.Spec.Template.Spec.Configs.Configs == nil { | ||
return fmt.Errorf("no consumer config supplied, unable to get bootstrap.servers") | ||
} |
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.
Same for this one?
Signed-off-by: Calum Murray <cmurray@redhat.com>
/cc @matzew |
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Cali0707, pierDipi 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 |
@@ -57,6 +57,9 @@ func (cts *ConsumerTemplateSpec) Validate(ctx context.Context) *apis.FieldError | |||
cts.Spec.Delivery.Validate(specCtx).ViaField("delivery"), | |||
cts.Spec.Subscriber.Validate(specCtx).ViaField("subscriber"), | |||
) | |||
if cts.Spec.Configs.Configs == nil { | |||
err = err.Also(apis.ErrMissingField("spec.configs")) |
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.
can we test the missing config ?
/test upgrade-tests |
1 similar comment
/test upgrade-tests |
/retest-required |
/test upgrade-tests |
@Cali0707: new pull request created: #4002 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@Cali0707: #3938 failed to apply on top of branch "release-1.13":
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@pierDipi is it worth backporting to 1.13 with the 1.15 release going out this week? |
Fixes #3935
Proposed Changes
Release Note