Repository navigation
fix: refuse new stacks with shared endpoint hostnames, add deployments delete --forget - #875
Merged
Merged
Conversation
Generated hostnames are <hostLabel>.<deployment domain>, so two resources exposing an endpoint named "api" collide in every deployment, but alien build and alien release accepted such stacks. A new build-time-only check rejects them and names both resources. It does not run in deployment-time or template preflights: stacks released before the check existed must keep deploying and updating. Two gated resources may be alternatives chosen at deploy time, so they may still share a host label. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Removes only the deployment record, for deployments whose resources are already gone (a deleted CloudFormation stack or Helm release) but that stay stuck. The API already supports the forget action. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The manager's POST /v1/releases stores submitted stacks without the build-time preflights, so it now refuses the same conflicts. The check covers only platforms that always generate hostnames: Kubernetes does so only with generated exposure, and local and test never do. After --forget the CLI no longer suggests reading the removed record. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
<hostLabel>.<deployment domain>, so two resources that both expose an endpoint namedapicollide in every deployment.alien buildandalien releaseaccepted such stacks. A new build-time check rejects them and names both resources.PreflightRegistry::add_build_time_check). Deployment-time and template preflights do not run it, so stacks released before this check keep deploying and updating.enabledWhen-gated resources may be alternatives chosen at deploy time, so they may still share a host label.alien deployments delete <id> --forget. Sendsaction: forget, which removes only the deployment record. It is for deployments whose resources are already gone (for example, a deleted CloudFormation stack or Helm release) but that stay stuck. The server already supports this action and limits it to admins.Testing
cargo test -p alien-preflights(392 + integration tests pass). New tests incompile_time/unique_endpoint_host_labels.rs:apiand names both;run_compile_time_checks(used by deployment-time preflights) andrun_template_preflightsstill accept that same stack, which is what keeps existing releases updatable;cargo test -p alien-cli --lib delete_forget: drivesdelete_deployment_taskagainst a loopback manager and asserts the exact request bodies (forget, thencleanup).🤖 Generated with Claude Code