Repository navigation
fix(cli)!: wheels deploy requires a bind address on an accessory port - #4078
Conversation
An accessory port: went to docker run --publish as written, so a bare 5432 published on a random host port and 5432:5432 on every interface, with no warning. Validator.$validateAccessoryPort() now requires "<ipv4>:<host>:<container>" or "[<ipv6>]:<host>:<container>" (ports or ranges, optional /tcp, /udp or /sctp), as Kamal main does since basecamp/kamal@00cb4cf1d, and fails with a message naming the accessory and bound examples for its port. The --publish value is now quoted like the other docker arguments. Fixtures, the CLI's accessories doc, the v4-2-0 accessories guide, config reference and 4.1-to-4.2 upgrade page use or describe the bound form. BREAKING CHANGE: a bare accessory port (5432) or host:container pair (5432:5432) now fails validation; give it a bind address. Fixes #4067 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Peter Amiri <peter@alurium.com>
|
rev1-r3 review @ 266001f: APPROVE Checked against #4067. The breaking change is user-approved and labelled in the changelog and on the 4.2 upgrade page.
Non-blocking nits:
Freeze-check: clean. CI was still pending when I reviewed. |
…ay Kamal main The complexity gate failed: Validator.validate() reached 31 with the new port check. The per-accessory loop body (name, image, port, volume host paths, hosts) is now the public $validateAccessory() helper. Review nits folded in: the port docblock lists /sctp, and the config reference and changelog say the bind-address rule is Kamal main's (unreleased), not released Kamal's. Refs #4067 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Peter Amiri <peter@alurium.com>
|
rev1-r3 review @ 2f2a254: APPROVE The delta since |
Fixes #4067. Breaking (approved by the user for 4.2.0).
Problem
An accessory
port:went todocker run --publishunchanged. A bareport: 5432published on a random host port, and"5432:5432"on every interface (0.0.0.0), with no warning.Change
Validator.$validateAccessoryPort()requires a bind address, matching Kamalmain(basecamp/kamal@00cb4cf1d, unreleased; released Kamal ≤ 2.12.0 still passes ports through). Accepted shapes:"<ipv4>:<host port>:<container port>", where the IPv4 address must be four 0–255 octets;"[<ipv6>]:<host port>:<container port>";8000-8010), and the value may end in/tcp,/udpor/sctp.Anything else, including trailing text after the ports, a hostname instead of an IP,
5432or5432:5432, fails with an error in the same style as Kamal's:accessory db: port "5432" must name a bind address, e.g. "127.0.0.1:5432:5432" to keep it on that host, "10.0.0.20:5432:5432" for a private network address, or "0.0.0.0:5432:5432" to publish it on every interfaceAccessoryCommands.$portArgs()quotes the published value (shellEscape) like the other docker arguments.Docs:
wheels deploy docs accessoriestext and the v4-2-0 accessories guide and config reference describe the rule;port:must name a bind address" bullet;changedchangelog fragment marked Breaking.Tests
New
cli/lucli/tests/specs/deploy/config/AccessoryPortBindSpec.cfc(6 specs):0.0.0.0, bracketed IPv6,/tcp, ranges,/udp,/sctp, and an accessory with noport:5432(number),"5432","5432:5432",localhost:…,[nope]:…,999.1.1.1:…,…/tcp;id,… -v /:/x,…:abc,…/httpUpdated to the bound form: the
with-accessories.ymlandfull.ymlfixtures, DeployFollowupsSpec's inline config, and theAccessorySpec/AccessoryCommandsSpecexpectations (--publish '127.0.0.1:5432:5432').RED on develop: the two rejection specs failed (a bare port was accepted). GREEN:
PORT=9512 bash tools/test-cli-local.shgave 2072 pass, 0 fail, 0 error;tools/test-local.sh cligave 231 passed; a realpnpm buildofweb/sites/guidesexits 0 with the new text on all three pages. Freeze-check clean (no frozen files touched).Rule #9: no open community PR references #4067.
🤖 Generated with Claude Code