Repository navigation
fix: resume setup-required failures when setup reruns - #962
Merged
Merged
Conversation
|
Enclave skipped this draft pull request. It will run automatically when you mark the PR as Ready for review. |
Member
Author
|
@greptileai review |
|
A controller step that only setup can unblock (MANAGEMENT_PERMISSION_MISSING, and the new SETUP_RERUN_REQUIRED) now makes a failed update or provisioning report DEPLOYMENT_RESOURCE_SETUP_REQUIRED, so the control plane can wait for a setup run instead of failing the operation. When setup hands the deployment back at Provisioning, the runtime resumes those steps; Provisioning uses the update completion check so removed resources do not hold it open; an installed deployment that fails there reports update-failed. A setup run refused because the last operation failed names the retry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
alongubkin
force-pushed
the
alon/alien-1345-setup-required-recovery
branch
from
October 9, 2026 16:14
3b0dc6d to
4b1483d
Compare
Member
Author
|
@greptileai review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Some controller errors can only be fixed by rerunning setup. Examples: EBS growth on a management role without
ec2:DescribeVolumesModifications(MANAGEMENT_PERMISSION_MISSING), or a workload role whose trust does not admit the compute nodes. Rerunning setup did not finish the deployment:update-failed, headlineDEPLOYMENT_FAILED). A control plane could only record the operation as failed, so a setup run had nothing to claim and got a barestatusMismatch.Provisioning.handle_provisioningfound the resource still failed, failed again, and reportedprovisioning-failedfor an installed deployment. Only a second retry finished it.Change
alien-infra:requires_setup_rerun(error)recognizes the errors only a setup run resolves:MANAGEMENT_PERMISSION_MISSINGand a newSETUP_RERUN_REQUIRED(setup-owned configuration such as workload role trust).alien-deployment:DEPLOYMENT_RESOURCE_SETUP_REQUIRED, naming the resources. If any other failure is mixed in, behavior is unchanged and a retry is still asked for. The message also says that CloudFormation/Terraform installs retry after updating the stack, because a stack update does not hand the deployment back.Provisioningwith such failures (reachable only through a setup handoff), the runtime resumes them at their saved step instead of failing again. Authority is unchanged: setup grants, and the runtime only continues its own controller steps.Provisioningnow uses the same completion check asUpdating(same change as fix: complete provisioning after removed resources finish deletion #925). A removed resource'sDeletedtombstone therefore no longer holds a resumed update open (Greptile P1).Provisioningreportsupdate-failed; its installed release keeps serving.statusMismatchon a failed deployment now returnsSETUP_RUN_AFTER_FAILED_OPERATION, which says to retry first. The refusal stays in the error chain. If the status lookup fails, the plain refusal is returned.withhold_test_worker_setup_grant/give_test_worker_setup_grantsimulate a step that needs setup.Alternatives considered: retrying automatically in the runtime would keep failing until the grant exists. Having setup request a retry would give setup-run authority to runtime retries. Resuming at the existing setup handoff is the smallest change that keeps authority where it is.
Proof
Tests ran in a Linux sandbox on this commit, rebased on main
7b9a37011:alien-deployment+alien-infra(--features alien-infra/test) all pass;rustfmt --checkpasses on the changed files.test_platform:an_update_waiting_for_a_setup_grant_finishes_when_setup_reruns: a mid-update step fails with a missing grant. An idle step changes nothing. A setup run that does not grant it leaves the deploymentupdate-failedand waiting (neverprovisioning-failed). A setup run that grants it finishes the update from the failed step, with no retry.an_update_that_removes_a_resource_finishes_after_setup_reruns: the same flow while removing a worker.a_first_install_waiting_for_setup_continues_when_setup_reruns.provisioning.rs+updating.rsat main, all 3 fail;Provisioning);setup_run_refused_after_a_failed_operation_names_the_retryfails.only_failures_that_all_need_setup_wait_for_setup,setup_rerun_errors_are_recognized_through_wrapping, plus mocked acquire+GET tests for the refusal (failed status, non-failed status, lookup failure, other refusal reason).Rollout
New error codes:
SETUP_RERUN_REQUIRED,DEPLOYMENT_RESOURCE_SETUP_REQUIRED,SETUP_RUN_AFTER_FAILED_OPERATION. No controller state variants changed. A control plane that does not knowDEPLOYMENT_RESOURCE_SETUP_REQUIREDtreats it as an ordinary failure, which is today's behavior.🤖 Generated with Claude Code