Skip to content

chore: harden addon warning logging and empty drain - #8869

Open
atharvaHJoshi wants to merge 1 commit into
eksctl-io:mainfrom
atharvaHJoshi:chore/harden-drain-and-warning-logging
Open

atharvaHJoshi wants to merge 1 commit into
eksctl-io:mainfrom
atharvaHJoshi:chore/harden-drain-and-warning-logging

Conversation

@atharvaHJoshi

Copy link
Copy Markdown

What this PR does

Two small hardening fixes found during issue investigations:

  1. pkg/actions/addon/create.gologger.Warning used the %w verb (intended for
    fmt.Errorf/error wrapping). Loggers that follow the go-kit convention render
    %w as a literal %!w(...) placeholder, so the actual error text was garbled.
    Switched to %v.

  2. pkg/actions/nodegroup/drain.goDrainer.Drain now returns early when it is
    asked to drain zero nodegroups, instead of logging "starting parallel draining"
    and clearing with nothing to do.

Validation

  • go build ./...
  • golangci-lint run --timeout=30m ./pkg/...
  • go test ./pkg/actions/...

Pre-existing, unrelated failures in pkg/info and pkg/iam/oidc are environmental
(kubectl/cfssl missing locally) and remain unchanged.

Signed-off-by: Atharva Joshi <josh.atharva2005@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Hello atharvaHJoshi 👋 Thank you for opening a Pull Request in eksctl project. The team will review the Pull Request and aim to respond within 1-10 business days. Meanwhile, please read about the Contribution and Code of Conduct guidelines here. You can find out more information about eksctl on our website

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 this pull request may close these issues.

1 participant