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

fix: don't panic on shutdown for nil nodepools for logging budgets #866

Merged
merged 2 commits into from
Dec 15, 2023

Conversation

njtran
Copy link
Contributor

@njtran njtran commented Dec 15, 2023

Fixes #N/A

Description
On shutdown, we were getting panics since we weren't returning after a failed nodePool.List call.

How was this change tested?
make presubmit

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 15, 2023
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 15, 2023
Copy link
Member

@jonathan-innis jonathan-innis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@@ -250,7 +250,8 @@ func (c *Controller) logAbnormalRuns(ctx context.Context) {
func (c *Controller) logInvalidBudgets(ctx context.Context) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline. I think the method signature should just be ValdiateBudgets() error so that we are less likely to miss error returns like this

@jonathan-innis
Copy link
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 15, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jonathan-innis, njtran

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:
  • OWNERS [jonathan-innis,njtran]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coveralls
Copy link

coveralls commented Dec 15, 2023

Pull Request Test Coverage Report for Build 7219277746

  • 0 of 2 (0.0%) changed or added relevant lines in 1 file are covered.
  • 5 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.05%) to 79.891%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/controllers/disruption/controller.go 0 2 0.0%
Files with Coverage Reduction New Missed Lines %
pkg/controllers/disruption/controller.go 1 72.67%
pkg/test/cachesyncingclient.go 2 78.13%
pkg/test/expectations/expectations.go 2 95.01%
Totals Coverage Status
Change from base Build 7219068882: -0.05%
Covered Lines: 7648
Relevant Lines: 9573

💛 - Coveralls

@k8s-ci-robot k8s-ci-robot merged commit 3707cef into kubernetes-sigs:main Dec 15, 2023
11 checks passed
@njtran njtran deleted the fixPanicOnShutdown branch December 26, 2023 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants