Fix proxy host overrides in destination configs - #1896
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a config-merge edge case where destination-specific config files can switch between proxy.host and proxy.hosts (in either direction) without leaving both keys present in the merged proxy config, while keeping the existing validation behavior for configs that explicitly set both keys.
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.
Changes:
- Adjust config file loading to remove the superseded
proxy.host/proxy.hostskey from the already-loaded config when a later file overrides with the alternate key. - Add regression tests covering both override directions (
host→hostsandhosts→host) via destination config files.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| lib/kamal/configuration.rb | Removes replaced proxy.host/proxy.hosts keys during destination config merges to avoid invalid merged configs. |
| test/configuration/proxy_test.rb | Adds regression coverage for destination overrides switching between host and hosts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Superseded by #1903, which covers the same destination override behavior and adds the role-level cases. |
Summary
proxy.hostwithproxy.hosts, or the reverse, without leaving both keys in the merged config.Fixes #1832.
Testing
bundle _2.6.5_ exec ruby -Itest test/configuration/proxy_test.rbin aruby:3.4containerbundle _2.6.5_ exec ruby -Itest test/configuration/validation_test.rbin aruby:3.4containergit diff --check