Skip to content

[CASCL-1386] (4/11) Add evict-legacy-nodes preflight warnings#3163

Merged
L3n41c merged 7 commits into
mainfrom
lenaic/CASCL-1386-evict-04-preflight
Jun 29, 2026
Merged

[CASCL-1386] (4/11) Add evict-legacy-nodes preflight warnings#3163
L3n41c merged 7 commits into
mainfrom
lenaic/CASCL-1386-evict-04-preflight

Conversation

@L3n41c

@L3n41c L3n41c commented Jun 18, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Implements the non-blocking preflight warnings (e.g. user Karpenter NodePool weight conflicts) shown before eviction.

Motivation

PR #3026 is too large to review as a single change. This is part 4 of 11 of a stack that splits it into small, individually-reviewable pieces that each build and pass tests on their own. See #3026 for the full feature context and end-to-end QA.

Additional Notes

Stacked PR — the base branch is lenaic/CASCL-1386-evict-03-prompt, not main, so the diff shows only this step's change. Implements logic the skeleton (part 1) left stubbed. The code is taken verbatim from #3026 (rebased onto main); there are no logic changes versus #3026.

Minimum Agent Versions

N/A — kubectl-datadog plugin only.

Describe your test plan

go test ./cmd/kubectl-datadog/autoscaling/cluster/... passes at this commit. Full end-to-end QA is tracked on #3026.

Checklist

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Jun 18, 2026

Copy link
Copy Markdown

Code Coverage

Fix all issues with BitsAI

🛑 Gate Violations

🎯 1 Code Coverage issue detected

A Patch coverage percentage gate may be blocking this PR.

Patch coverage: 76.00% (threshold: 80.00%)

ℹ️ Info

🎯 Code Coverage (details)
Patch Coverage: 76.00%
Overall Coverage: 44.97% (+0.03%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 7cf1215 | Docs | Datadog PR Page | Give us feedback!

@L3n41c
L3n41c force-pushed the lenaic/CASCL-1386-evict-03-prompt branch from 66deaee to 99db839 Compare June 18, 2026 15:41
@L3n41c
L3n41c force-pushed the lenaic/CASCL-1386-evict-04-preflight branch from 1107a29 to 49deb5c Compare June 18, 2026 15:41
@L3n41c L3n41c changed the title [CASCL-1386] (4/12) Add evict-legacy-nodes preflight warnings [CASCL-1386] (4/11) Add evict-legacy-nodes preflight warnings Jun 18, 2026
@codecov-commenter

codecov-commenter commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 41.95402% with 202 lines in your changes missing coverage. Please review.
✅ Project coverage is 44.01%. Comparing base (92788bf) to head (374d307).
⚠️ Report is 15 commits behind head on main.

Files with missing lines Patch % Lines
...d/kubectl-datadog/autoscaling/cluster/evict/run.go 11.71% 98 Missing ⚠️
...kubectl-datadog/autoscaling/cluster/evict/evict.go 0.00% 80 Missing ⚠️
...ctl-datadog/autoscaling/cluster/evict/preflight.go 83.87% 4 Missing and 1 partial ⚠️
...d/kubectl-datadog/autoscaling/cluster/evict/pdb.go 0.00% 4 Missing ⚠️
.../kubectl-datadog/autoscaling/cluster/evict/plan.go 95.00% 2 Missing and 2 partials ⚠️
...d/kubectl-datadog/autoscaling/cluster/evict/asg.go 0.00% 2 Missing ⚠️
...dog/autoscaling/cluster/evict/clusterautoscaler.go 0.00% 2 Missing ⚠️
...bectl-datadog/autoscaling/cluster/evict/eks_mng.go 0.00% 2 Missing ⚠️
...atadog/autoscaling/cluster/evict/karpenter_user.go 0.00% 2 Missing ⚠️
...tl-datadog/autoscaling/cluster/evict/standalone.go 0.00% 2 Missing ⚠️
... and 1 more

❌ Your patch status has failed because the patch coverage (41.95%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3163      +/-   ##
==========================================
- Coverage   44.03%   44.01%   -0.03%     
==========================================
  Files         377      388      +11     
  Lines       30713    31061     +348     
==========================================
+ Hits        13525    13671     +146     
- Misses      16300    16499     +199     
- Partials      888      891       +3     
Flag Coverage Δ
unittests 44.01% <41.95%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ubectl-datadog/autoscaling/cluster/evict/prompt.go 100.00% <100.00%> (ø)
cmd/kubectl-datadog/autoscaling/cluster/cluster.go 0.00% <0.00%> (ø)
...d/kubectl-datadog/autoscaling/cluster/evict/asg.go 0.00% <0.00%> (ø)
...dog/autoscaling/cluster/evict/clusterautoscaler.go 0.00% <0.00%> (ø)
...bectl-datadog/autoscaling/cluster/evict/eks_mng.go 0.00% <0.00%> (ø)
...atadog/autoscaling/cluster/evict/karpenter_user.go 0.00% <0.00%> (ø)
...tl-datadog/autoscaling/cluster/evict/standalone.go 0.00% <0.00%> (ø)
...d/kubectl-datadog/autoscaling/cluster/evict/pdb.go 0.00% <0.00%> (ø)
.../kubectl-datadog/autoscaling/cluster/evict/plan.go 95.00% <95.00%> (ø)
...ctl-datadog/autoscaling/cluster/evict/preflight.go 83.87% <83.87%> (ø)
... and 2 more

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 92788bf...374d307. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@L3n41c
L3n41c force-pushed the lenaic/CASCL-1386-evict-04-preflight branch from 49deb5c to dd7f679 Compare June 19, 2026 14:21
Part of a stack splitting #3026 (too large to review in one piece) into
small pieces that each build and pass tests on their own. The command is
fully functional only once the whole stack lands.
@L3n41c
L3n41c force-pushed the lenaic/CASCL-1386-evict-04-preflight branch from dd7f679 to a8fa15e Compare June 22, 2026 13:24
@L3n41c
L3n41c force-pushed the lenaic/CASCL-1386-evict-03-prompt branch from 3471309 to 8316f55 Compare June 22, 2026 13:25
Part of a stack splitting #3026 (too large to review in one piece) into
small pieces that each build and pass tests on their own. The command is
fully functional only once the whole stack lands.
@L3n41c
L3n41c force-pushed the lenaic/CASCL-1386-evict-04-preflight branch from a8fa15e to b03651d Compare June 23, 2026 08:49
L3n41c added 2 commits June 25, 2026 10:15
Part of a stack splitting #3026 (too large to review in one piece) into
small pieces that each build and pass tests on their own. The command is
fully functional only once the whole stack lands.
Part of a stack splitting #3026 (too large to review in one piece) into
small pieces that each build and pass tests on their own. The command is
fully functional only once the whole stack lands.
@L3n41c
L3n41c force-pushed the lenaic/CASCL-1386-evict-04-preflight branch from b03651d to 374d307 Compare June 25, 2026 08:18
@L3n41c
L3n41c force-pushed the lenaic/CASCL-1386-evict-03-prompt branch from 0213012 to 802e3c1 Compare June 25, 2026 08:18
@L3n41c
L3n41c marked this pull request as ready for review June 25, 2026 08:31
@L3n41c
L3n41c requested review from a team as code owners June 25, 2026 08:31

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 374d307f83

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cmd/kubectl-datadog/autoscaling/cluster/evict/preflight.go Outdated
Comment thread cmd/kubectl-datadog/autoscaling/cluster/evict/preflight.go Outdated
Base automatically changed from lenaic/CASCL-1386-evict-03-prompt to main June 25, 2026 12:20
L3n41c and others added 3 commits June 26, 2026 10:29
Part of a stack splitting #3026 (too large to review in one piece) into
small pieces that each build and pass tests on their own. The command is
fully functional only once the whole stack lands.
…ight' into lenaic/CASCL-1386-evict-04-preflight
@L3n41c
L3n41c force-pushed the lenaic/CASCL-1386-evict-04-preflight branch from 2ced16b to 7cf1215 Compare June 26, 2026 15:18
@L3n41c

L3n41c commented Jun 26, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7cf1215e53

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cmd/kubectl-datadog/autoscaling/cluster/evict/preflight.go
@L3n41c
L3n41c merged commit 306e23a into main Jun 29, 2026
38 of 39 checks passed
@L3n41c
L3n41c deleted the lenaic/CASCL-1386-evict-04-preflight branch June 29, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants