fix(flow): sync proto mirror and harden decommission poll loop - #4524
fix(flow): sync proto mirror and harden decommission poll loop#4524kdhulipala-wq wants to merge 2 commits into
Conversation
Proto mirror sync (rest-api/proto/flow/): - Add DecommissionRack RPC and DecommissionRackRequest message to the source proto (src/v1/flow.proto) so external consumers (REST API, site-workflow) can call the endpoint once it is ungated. - Manually patch the generated client and server stubs in gen/v1/ with a TODO to replace via `buf generate` from rest-api/proto/flow/. Poll loop robustness (executeWaitDecommissionedAction): - Add a consecutive-failure budget (5 failures) so a permanent GetDecommissionStatus error aborts within a few poll intervals rather than spinning until the 4-hour deadline. - Treat a component absent from Core's response (state "") as already decommissioned: Core removes the resource record as the terminal step, so an absent ID is the expected success condition, not an error. Improve the error message for genuinely unexpected states. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Krishna Dhulipala <kdhulipala@nvidia.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
Summary by CodeRabbit
WalkthroughThe Flow API now supports rack decommissioning requests and rejects component targets. Decommission waiting uses a 30-second fire-once activity policy, aborts after five consecutive retrieval failures, and treats missing component states as successful completion. ChangesRack decommissioning
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
🔐 TruffleHog Secret Scan✅ No secrets or credentials found! Your code has been scanned for 700+ types of secrets and credentials. All clear! 🎉 🕐 Last updated: 2026-08-04 23:34:31 UTC | Commit: 7e88e50 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@rest-api/flow/internal/task/executor/temporalworkflow/workflow/actions.go`:
- Around line 650-666: Update executeWaitDecommissionedAction so its
GetDecommissionStatus activity invocation uses dedicated activity options with a
short StartToCloseTimeout and MaximumAttempts set to 1, instead of inheriting
the decommission step’s 3 attempts and 4-hour timeout. Keep the existing
consecutive-failure counter and polling behavior, allowing the loop—not Temporal
activity retries—to control retries.
In `@rest-api/proto/flow/src/v1/flow.proto`:
- Around line 717-722: Update the DecommissionRack RPC flow to validate that the
request target contains only racks before invoking TargetSpecFrom or
decommissionRackImpl. Reject component targets when the RPC is enabled, while
preserving existing handling for valid rack targets.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: f17bdde4-aa00-47de-a285-7df48b5c7006
⛔ Files ignored due to path filters (2)
rest-api/proto/flow/gen/v1/flow.pb.gois excluded by!**/*.pb.go,!**/gen/**,!rest-api/**/*.pb.gorest-api/proto/flow/gen/v1/flow_grpc.pb.gois excluded by!**/*.pb.go,!**/gen/**,!rest-api/**/*.pb.go,!rest-api/**/*_grpc.pb.go
📒 Files selected for processing (2)
rest-api/flow/internal/task/executor/temporalworkflow/workflow/actions.gorest-api/proto/flow/src/v1/flow.proto
Signed-off-by: Krishna Dhulipala <kdhulipala@nvidia.com>
Proto mirror sync (rest-api/proto/flow/):
buf generatefrom rest-api/proto/flow/.Poll loop robustness (executeWaitDecommissionedAction):