Repository navigation
feat(cli): deploy config banner, eager secrets validation, health-wait beacons - #34
Merged
Merged
Conversation
…t beacons ## Summary Three DX improvements from issue #10 (R1): - Deploy/redeploy/setup print a config banner (service, destination, version, roles with host counts, proxy hosts, timeouts) before any work - Kamal::Configuration#validate_secrets! resolves every secret the deploy needs (registry, role env, builder, custom SSL PEMs; accessories on setup) so a missing secret fails in seconds, before build/registry/SSH - Health-check waits print progress: the Poller emits a beacon per retry (elapsed/remaining) and the proxy deploy path announces its bounded wait ## Test Coverage - test/cli/healthcheck/poller_test.rb: beacons per retry, quiet timeout path - test/configuration_test.rb: validate_secrets! across registry, env, builder, SSL, and accessory scoping - test/cli/main_test.rb: banner + validation ordering before build; missing secrets abort deploy before any invoke (upstream test inverted — it previously asserted deploy proceeds with unresolvable secrets) - test/cli/app_test.rb: bounded-wait notice on the proxy deploy path ## Verification - [x] bundle exec rubocop --parallel passes - [x] unit tests pass (only pre-existing host-arch/docker builder failures, identical on clean main) Refs #10
…ue-10-dash-integration # Conflicts: # lib/kamal/cli/app/boot.rb # lib/kamal/cli/main.rb
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
Implements issue #10 (R1 DX): make deploys explain themselves before, during, and while waiting.
deploy/redeploy/setupopen with the effective topology: service, destination, version, each role with host counts, proxy hosts, timeouts, and on dash the loadbalancer state — includingloadbalancer: 1.1.1.1 (auto-enabled: primary role web has 2 hosts), the line that would have made the 2026-07-03 auto-LB surprise visible.Kamal::Configuration#validate_secrets!resolves every secret the deploy needs (registry credentials, role env secrets, builder secrets, custom SSL PEMs; accessory secrets onsetup) right after the banner. A missing secret now fails in seconds with the usualConfigurationError, instead of minutes later after the image build. Secret adapters (1Password etc.) run at deploy start instead of mid-deploy — same work, earlier.Container not ready yet, retrying in 2s (3s elapsed, 27s left)on each retry instead of sleeping silently; the proxy deploy path announces its bounded wait (Deploying web on 1.1.1.1 via kamal-proxy (waiting up to 30s for it to become healthy)...) before the blockingkamal-proxy deploy.Branch structure:
issue-10-boot-banner-eager-validation-beacons(rooted offmain, upstream-compatible, all three features) merged into this integration branch, plus one dash-only commit adding the loadbalancer banner line.Closes #10
Test plan
bundle exec ruby -Itest test/cli/main_test.rb— banner content/order, fail-fast on missing secretsbundle exec ruby -Itest test/cli/healthcheck/poller_test.rb— beaconsmain)bin/testin CI (deploy-path change)Deviations & judgment calls
deploy with missing secretsasserted deploy proceeds when secrets are unresolvable — the exact behavior this issue inverts. Rewrote that test to assert fail-fast (ConfigurationError before any invoke) rather than keeping a contradictory test plus a new duplicate; reused upstream'sdeploy_with_secrets.ymlfixture.kamal-proxy deploy; a true local ticker would need a background thread around a blocking SSHKit execute — descoped to a one-line bounded-wait notice. Full ticker is R2 territory if still wanted.validate_secrets!includes accessory secrets only forsetup(boot_accessories: true);deploy/redeploynever touch accessories.proxy: falseprimary role (nothing to balance). Not fixed here — behavior change beyond this issue's scope. Because of it, the negative banner test uses a newdeploy_with_loadbalancer_false.ymlfixture (explicit opt-out) instead of the workers-only fixture.cli_test_case.rbglobally stubsload_balancing?false for upstream-inherited tests; the banner testsunstubit locally to exercise the real predicate.