Skip to content

[CASCL-1386] (2/11) Build the evict-legacy-nodes execution plan#3161

Open
L3n41c wants to merge 1 commit into
lenaic/CASCL-1386-evict-01-skeletonfrom
lenaic/CASCL-1386-evict-02-buildplan
Open

[CASCL-1386] (2/11) Build the evict-legacy-nodes execution plan#3161
L3n41c wants to merge 1 commit into
lenaic/CASCL-1386-evict-01-skeletonfrom
lenaic/CASCL-1386-evict-02-buildplan

Conversation

@L3n41c

@L3n41c L3n41c commented Jun 18, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Implements BuildPlan: computes which node groups (targets) to drain from the cluster snapshot, filtering out Datadog-managed entities.

Motivation

PR #3026 is too large to review as a single change. This is part 2 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-01-skeleton, 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-prod-us1-4

This comment has been minimized.

@L3n41c L3n41c force-pushed the lenaic/CASCL-1386-evict-01-skeleton branch from 1ea5ce0 to 2491129 Compare June 18, 2026 15:41
@L3n41c L3n41c force-pushed the lenaic/CASCL-1386-evict-02-buildplan branch from aa51aa3 to 1d6af4f Compare June 18, 2026 15:41
@L3n41c L3n41c changed the title [CASCL-1386] (2/12) Build the evict-legacy-nodes execution plan [CASCL-1386] (2/11) Build the evict-legacy-nodes execution plan Jun 18, 2026
@codecov-commenter

codecov-commenter commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.98246% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.90%. Comparing base (a97a49e) to head (67c1c0b).

Files with missing lines Patch % Lines
.../kubectl-datadog/autoscaling/cluster/evict/plan.go 92.98% 2 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@                           Coverage Diff                           @@
##           lenaic/CASCL-1386-evict-01-skeleton    #3161      +/-   ##
=======================================================================
+ Coverage                                43.74%   43.90%   +0.16%     
=======================================================================
  Files                                      388      388              
  Lines                                    30950    31005      +55     
=======================================================================
+ Hits                                     13538    13614      +76     
+ Misses                                   16524    16501      -23     
- Partials                                   888      890       +2     
Flag Coverage Δ
unittests 43.90% <92.98%> (+0.16%) ⬆️

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

Files with missing lines Coverage Δ
.../kubectl-datadog/autoscaling/cluster/evict/plan.go 95.00% <92.98%> (+95.00%) ⬆️

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 a97a49e...67c1c0b. 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-02-buildplan branch from 1d6af4f to e709803 Compare June 19, 2026 14:21
@L3n41c L3n41c force-pushed the lenaic/CASCL-1386-evict-01-skeleton branch 2 times, most recently from 66cb71f to a97a49e Compare June 22, 2026 13:24
@L3n41c L3n41c force-pushed the lenaic/CASCL-1386-evict-02-buildplan branch from e709803 to 5100da9 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-02-buildplan branch from 5100da9 to 67c1c0b Compare June 23, 2026 08:49
@L3n41c L3n41c marked this pull request as ready for review June 23, 2026 08:55
@L3n41c L3n41c requested review from a team as code owners June 23, 2026 08:55
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