Skip to content

test: add deployment scale validation when nodehardening=true - #9372

Open
Thibault Cohen (titilambert) wants to merge 9 commits into
mainfrom
add-deployment-scale-validation
Open

test: add deployment scale validation when nodehardening=true#9372
Thibault Cohen (titilambert) wants to merge 9 commits into
mainfrom
add-deployment-scale-validation

Conversation

@titilambert

@titilambert Thibault Cohen (titilambert) commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Adds an e2e scale validation to Test_Ubuntu2604Minimal_NodeHardening_KubeReservedSlice_CLIFlags.

The validation:

  • reads the scenario node's advertised allocatable pod capacity;
  • subtracts active non-validation pods already assigned to that node;
  • creates a uniquely named Deployment using the Microsoft pause image;
  • pins every replica exclusively to the scenario node;
  • adjusts the Deployment replica target when system pods enter or leave the node;
  • requires every requested Deployment replica to become Ready;
  • fails when the node remains NotReady during scale-up;
  • deletes the Deployment and waits for its pods to disappear before the scenario ends.

This specifically exercises the Node Hardening configuration under full pod-capacity load and detects the node failure that is not exposed by the existing single-pod smoke validation.

The validation is intentionally scoped to this Node Hardening scenario rather than added to the default validation path for every e2e scenario.

Which issue(s) this PR fixes:

Fixes #

@titilambert

Copy link
Copy Markdown
Contributor Author

This change is part of the following stack:

Change managed by git-spice.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Windows Unit Test Results

  3 files   13 suites   53s ⏱️
409 tests 409 ✅ 0 💤 0 ❌
412 runs  412 ✅ 0 💤 0 ❌

Results for commit 4064f6d.

♻️ This comment has been updated with latest results.

@titilambert Thibault Cohen (titilambert) changed the title Add deployment scale validation test: add deployment scale validation Sep 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The replica readiness target and intended default validation integration must be corrected before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds E2E pod-capacity scale validation and helper tests, currently enabled for one Ubuntu 26.04 node-hardening scenario.

Changes:

  • Creates and cleans up a node-pinned pause Deployment.
  • Adds readiness, capacity, ownership, and construction helpers with tests.
  • Invokes validation for one node-hardening scenario.
File summaries
File Review
e2e/scenario_test.go Adds one validator call site. Moderate (2 votes): The default validation path and documented SkipScaleValidation escape hatch are not implemented.
e2e/scale_validation.go Implements scale-up, readiness monitoring, and cleanup. Moderate (2 votes): Completion can succeed while requested replicas remain Pending because existing pod occupancy is not correctly reflected in the target.
e2e/scale_validation_test.go Tests Deployment construction and scale-validation helper logic.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread e2e/scale_validation.go Outdated
Comment thread e2e/scenario_test.go
Copilot AI review requested due to automatic review settings September 4, 2026 20:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Capacity accounting and readiness stabilization issues can cause false failures or miss node failures.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Comment thread e2e/scale_validation.go Outdated
Comment thread e2e/scale_validation.go Outdated
Copilot AI review requested due to automatic review settings September 4, 2026 20:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The unresolved replica calculation issue can allow validation to pass despite workload failure.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread e2e/scale_validation.go Outdated
Copilot AI review requested due to automatic review settings September 4, 2026 20:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The capacity-saturating end-to-end behavior warrants final human review.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

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.

2 participants