Repository navigation
Deploy swarm stacks that have nothing to build - #1
Merged
Merged
Conversation
An infrastructure stack such as a shared Redis and RabbitMQ is made only of published images, and every swarm deploy refused it with 'no services with build'. When every service pins its image by digest, the deploy now skips the builder, the build runner and the registry tunnel and applies the signed stack with those digests. A service without a digest is still refused, by name. Refs DEV-DEPL-65 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The published service may not use stop-first because it is the one behind Caddy. An expose: internal application publishes nothing, yet every app must name a primary service, so a stack whose only services are a single RabbitMQ and a single Redis could not avoid two tasks on one data volume. Refs DEV-DEPL-65 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Compose writes a service's networks as a map to give them aliases, and the typed parse expected a list, so the whole compose file failed to load. Only the network keys are read; the raw document keeps the aliases. Refs DEV-DEPL-65 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs DEV-DEPL-65 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of the image-only deploy: a compose service named redis or rabbitmq without its data account or <app>_<service>_data volume key passed the client checks and was refused by the helper only, which left the operation in recovery_required (seen on the DEV-DEPL-65 recipe) and let infra recreate destroy the guest first. The same checks now run in checkDeployInputs. An internal app's compose may no longer carry dev.shuttle.domain, which would publish the service that may update stop-first, and a pre-deploy hook on a service that is not built uses the image its compose file pins. The stop-first test now proves validation went past the update order. Refs DEV-DEPL-65 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e image Round 2 of the review: with production.redis or production.rabbitmq, the generated service replaces the compose one, so the hook must not run the compose image. The route-label test now goes through the infra recreate preparation, which shares checkDeployInputs with deploy, and fails if that check is unplugged. Refs DEV-DEPL-65 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oice Round 3 of the review: the generated-service guard covers both names, the test only covered Redis. Refs DEV-DEPL-65 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
An infrastructure stack made only of published images (a single Redis and a single RabbitMQ shared by several apps) could not be managed by Shuttle: every swarm deploy refused it with
no services with build, every app must name a primary service that may not updatestop-first, and the compose parser rejected the map form ofnetworksneeded to keep aliases.What changes
expose: internalapp may useupdate_order: stop-first; the published service of a public app is still refused.networksmay be written as a map (aliases are kept in the raw document).redisorrabbitmqmust run as the account that owns its data and mount<app>_<service>_data. Refused only by the helper, it left the operation inrecovery_required, andinfra recreatedestroyed the guest first.dev.shuttle.domain, which would publish it.deploy.pre_deployon a service that is not built uses the image its compose file pins, unlessproduction.redis/production.rabbitmqreplaces that service.Verification
gofmt -l .empty,go vet ./...clean,go test ./...all packages ok.shuttle deployof the same services as an internal image-only app, then a manual rollback to the hand-deployed stack. Redis key counts, the RabbitMQ node name, queues, users and persisted test messages were identical at each step, and clients reached the services through their network aliases. Three full cycles, including a re-migration.shuttle rollbackof such an app, and helper refusals other than the data account and volume.Refs DEV-DEPL-65
🤖 Generated with Claude Code