Skip to content

fix: name each failed resource in CLI deployment errors - #805

Merged
alongubkin merged 2 commits into
mainfrom
alon/alien-1122-cli-deployment-failures-dont-name-the-failed-resources
Oct 1, 2026
Merged

alongubkin merged 2 commits into
mainfrom
alon/alien-1122-cli-deployment-failures-dont-name-the-failed-resources

Conversation

@alongubkin

@alongubkin alongubkin commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Fixes ALIEN-1122.

Problem

When a deployment fails, alien deployments get and deploy failure output showed only the summary:

Deployment failed: 1 resource error(s), 4 interrupted, 10 total

The failed resources and their errors are in the DEPLOYMENT_FAILED error's context.resource_errors, which render_human_error never read. Finding out which resource failed, and why, meant fetching the deployment as JSON and walking the nested errors. alien dev already had this logic (deployment_error_message / root_cause_message), but only for its own status card.

Fix

  • render_human_error finds a DEPLOYMENT_FAILED error in the chain and adds a Failed resources: section with one resource: root cause line per failed resource. The root cause is the deepest non-internal message in that resource's error chain.
  • alien deploy and alien destroy returned a new phase-level DEPLOYMENT_FAILED ("provisioning failed") with no details. They now attach the final deployment state's headline error, which lists the failed resources, as its source.
  • The resource/root-cause extraction moved from lib.rs into ui.rs, and alien dev uses the same function, so there's one copy.

Tests

  • New render_human_error_names_each_failed_resource: a real alien_deployment DeploymentFailed error with two failed resources, serialized and read back the way deployments get reads the stored error, renders both resources with their root cause, both as stored and wrapped the way alien deploy returns it.
  • cargo test -p alien-cli --lib passes (341 tests).

🤖 Generated with Claude Code

@greptile-apps

greptile-apps Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Improves error messages for deployment and deletion failures.

No distinct new blocking issue was found, but the previously reported deploy failure-output problem remains in the code.

Summary

The PR adds per-resource causes to human-readable deployment errors and shares the extraction logic with alien dev.

  • The follow-up attempts to attach the final deployment-state error to deploy and destroy failures.
  • A test covers rendering a stored failure and a wrapped failure.

Reviews (2) · Last reviewed commit: "fix: carry failed resources into deploy ..."

Comment thread crates/alien-cli/src/ui.rs Outdated
@alongubkin

Copy link
Copy Markdown
Member Author

@greptileai

alongubkin and others added 2 commits September 30, 2026 17:00
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@alongubkin
alongubkin force-pushed the alon/alien-1122-cli-deployment-failures-dont-name-the-failed-resources branch from 1c1d273 to 8bc52f1 Compare October 1, 2026 00:00
@alongubkin
alongubkin merged commit 871c472 into main Oct 1, 2026
21 checks passed
@alongubkin
alongubkin deleted the alon/alien-1122-cli-deployment-failures-dont-name-the-failed-resources branch October 1, 2026 09:41
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.

1 participant