← Back to Pull requests

test(e2e): node-pool create validation — reject negative replicas (P2-1) #7472

Open
unknown opened this pull request with 299 lines diff across 3 files
View on GitHub
unknown unknown commented on Oct 12, 2026 11:03 UTC
Author

P2-1 — Node-pool create validation (reject invalid create)

Stacked on #7471 → #7470 → #7468 → #7467 (shared read-only cluster fixture). _Review note:_ the diff also shows the upstream stack commits until they merge; the P2-1 change itself is test/e2e/nodepool_create_validation_reject.go (+ the child-create guard reuse).

Behavior


Borrows the shared fixture cluster and attempts to create a node pool with an invalid properties.replicas: -1 under a unique child name, asserting the RP rejects it with a typed HTTP 400 InvalidRequestContent targeting properties.replicas ("must be greater than or equal to 0"), and that the node pool is not created (typed 404 ResourceNotFound before and after), with the parent cluster unchanged. Ported from the CS negative node-pool create case (test/arohcp/api/node_pools_test.go — replicas -1); RP evidence: internal/validation/validate_nodepools.go + the core-API 400 mapping.

Scope note


Existing ARO E2E already covers 201 replicas (simple_negative_cases.go) and autoscaling limits (nodepool_autoscaling.go) but not negative replicas; this fills that DEV-gate gap. Other distinct node-pool create invariants (unsupported/missing VM size, missing platform) are noted as separate follow-ups rather than bundled here.

Fixture usage


Reuses the child-create guard: typed child 404 before/after, exact typed validation rejection, unchanged parent, bounded cleanup for any unexpected creation, and fixture quarantine on assertion failure. Copies the shared pool's known-good config and only flips replicas to -1. No durable shared mutation.

Labels / selection


RequireSharedReadOnlyCluster, High, Negative, AroRpApiCompatible, MIContainers:0; not Slow. DEV-gate selected (verified).

Tracking


Same E2E coverage-migration series as #7421 / #7467 / #7468 / #7470 / #7471 — no single tracking ticket; rationale per CONTRIBUTING.md §4.

Validation


make lint 0 issues; license verification clean (Apache 2.0 headers on all new files); go build ./...; go vet ./test/...; make -C test; regenerated suite-listing fixtures + go test ./test/cmd/aro-hcp-tests/...; offline framework scenarios (RP conversion/error mapping, cleanup, serialization, owner-pool protection). Live Azure path runs in CI.

---
AI-generated. Review for accuracy.

@zgalor requested from Slack

Diff: 299 lines (+224 / -75) across 3 files Reviewer: redhat-chai-bot Review duration: 1850m
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.40) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 299 lines diff across 3 files
0.40
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
46%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth shallow_review_depth
0.344
Diff Size diff_size
0.341
Real PR Conversation Timeline
1 comments
"Review active on #7472"
general weight: 0.35
Assignees
Unassigned
Labels
risk: low confidence: 46.7% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 40% (MEDIUM) · Higher = larger blast radius
40%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 46.7% · Lower = rushed or shallow review
46.7%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 21.3% · Safe to merge
21.3%
Repository