Skip to content

Fix #1934: Separate proxied and non-proxied accessory boot ordering - #1942

Open
TotyLabs wants to merge 2 commits into
basecamp:mainfrom
TotyLabs:fix-1934-accessory-boot-ordering
Open

Fix #1934: Separate proxied and non-proxied accessory boot ordering#1942
TotyLabs wants to merge 2 commits into
basecamp:mainfrom
TotyLabs:fix-1934-accessory-boot-ordering

Conversation

@TotyLabs

Copy link
Copy Markdown

On a fresh server with error_pages_path and proxied accessories, kamal setup could fail because proxied accessories booted before app:boot, causing kamal-proxy to validate the error pages directory before it existed.
The solution splits accessory boot into two phases:
Boot non-proxied accessories before app:boot
Boot proxied accessories after app:boot, ensuring error pages exist
This preserves the existing boot order for non-proxied accessories while ensuring error pages exist before proxied accessories are registered.
Fixes #1934

…dering

On a fresh server with error_pages_path and proxied accessories, kamal setup
would fail because proxied accessories were booted before app:boot, which meant
kamal-proxy tried to validate the error_pages directory before it was created.

The solution splits accessory boot into two phases:
- Boot non-proxied accessories before app:boot (original behavior)
- Boot proxied accessories after app:boot (new, ensures error pages exist)

This preserves all existing semantics while fixing the fresh server scenario.

Fixes: basecamp#1934
Copilot AI balanced review requested due to automatic review settings August 28, 2026 21:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Separates accessory startup phases so proxied accessories register only after app error pages are available.

Changes:

  • Boots non-proxied accessories before app:boot.
  • Boots proxied accessories afterward.
  • Adds a mixed-accessory setup test and fixture.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
lib/kamal/cli/main.rb Splits accessory startup around app boot.
test/cli/main_test.rb Tests mixed accessory setup behavior.
test/fixtures/deploy_with_error_pages_and_accessories.yml Provides proxied and non-proxied accessory configuration.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread test/cli/main_test.rb
Comment thread lib/kamal/cli/main.rb Outdated
@TotyLabs

TotyLabs commented Sep 5, 2026

Copy link
Copy Markdown
Author

Hi! Just following up on this PR in case it got buried. The requested review changes have been addressed and it's ready for another look when you have a chance. Thanks!

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.

kamal setup fails on a fresh server when an accessory has a proxy block and error_pages_path is set

2 participants