Skip to content

LPX-606: yolo deploy always builds; --app-version names the build#30

Merged
stevethomas merged 2 commits into
mainfrom
steve/lpx-606-restore-build-in-deploy-behaviour-fix-readme-one-liner
May 20, 2026
Merged

LPX-606: yolo deploy always builds; --app-version names the build#30
stevethomas merged 2 commits into
mainfrom
steve/lpx-606-restore-build-in-deploy-behaviour-fix-readme-one-liner

Conversation

@stevethomas
Copy link
Copy Markdown
Member

@stevethomas stevethomas commented May 19, 2026

Hey, I made a thing! 🥳

LPX-606

What problems are you solving?

yolo deploy <env> now always builds, pushes, and deploys as one motion. The v1 rewrite in PR #26 had inadvertently dropped build-in-deploy, leaving the README's one-liner broken and forcing users to remember a separate yolo build step.

--app-version is now reframed as an input to the build — the tag to stamp on the fresh image:

  • yolo deploy production — auto-generates a timestamp tag (26.21.2.1500), builds, pushes, deploys.
  • yolo deploy production --app-version=v1.2.3 — uses v1.2.3 (e.g. a GitHub release name) as the build's tag, builds, pushes, deploys.

The alpha-era "skip build when --app-version is supplied" branch is gone. Deploying a pre-existing ECR tag is rollback's job, tracked separately as LPX-608. Folding rollback into deploy --app-version=<old-tag> muddied the mental model.

BuildCommand writes --app-version back onto the shared InputInterface before returning, so deploy's downstream steps pick up the tag via $this->option('app-version').

Also drops the Manifest::has('tasks.web') guard. The ExecutesWebStep interface + Manifest::isHeadless() already gates DNS steps for headless apps (the right axis). The dropped guard was catching a different scenario — "yolo.yml has no Fargate spec at all" — which is best left to surface as ServiceNotFoundException via the natural AWS error path. Consistent with the "let AWS errors bubble" stance.

Plus: closes a coverage gap in ExecutesWebStep. LPX-604 (#29) added headless-mode gating for solo DNS (SyncSoloRecordSetStep) but missed the multitenancy mirror. SyncMultitenancyRecordSetStep dereferences $this->config['apex'] and ['domain'] unconditionally, so a headless multitenant deploy would undefined-key-crash before reaching ECS. Adding implements ExecutesWebStep to the tenant step lets shouldBeRunning() skip it via the existing trait.

README's yolo init && yolo build && yolo sync production && yolo deploy production was nonsensical (yolo build errored on the missing env arg; explicit build was redundant). Updated to:

yolo init && yolo sync production && yolo deploy production

Is there anything the reviewer needs to know to deploy this?

  • Every yolo deploy now triggers the full build pipeline (rsync → composer/npm → docker build → ECR push) before the deploy steps. ~2-5 min added depending on cache hits.
  • CI workflows that previously ran yolo build and yolo deploy --app-version=<tag> as separate stages can now collapse to a single yolo deploy production --app-version=<release-tag> call. If the split is still wanted for any reason (e.g. preview before promotion), yolo build alone still works.
  • Unit tests not added for the build-invocation path — goes through Command::execute() which runs registerAwsServices() and shouldBeRunning checks, hard to mock cleanly. Smoke-tested locally via the CL Fargate canary path.
  • 119 pest, 0 phpstan, pint clean.

🤖 Generated with Claude Code

@stevethomas stevethomas force-pushed the steve/lpx-606-restore-build-in-deploy-behaviour-fix-readme-one-liner branch from d83cb1b to fa2f724 Compare May 20, 2026 00:55
Restores build-in-deploy that v1's DeployCommand rewrite in #26 lost.
Drops the alpha-era assumption that `--app-version=<tag>` meant "deploy
this previously-built artefact" — that's rollback's job, not deploy's
(future LPX-608).

`--app-version` is now an input to the build: the tag to stamp on the
fresh image. Absent → BuildCommand generates a timestamp. Present (e.g.
a GitHub release name) → BuildCommand uses it verbatim.

Build always runs. BuildCommand writes --app-version back onto the
shared InputInterface, so deploy's downstream steps pick up the
freshly-baked tag via `$this->option('app-version')`.

Also drops the `Manifest::has('tasks.web')` guard. The interface
mechanism (ExecutesWebStep + Manifest::isHeadless) already gates DNS
steps for headless apps. The guard was catching a different scenario —
"yolo.yml has no Fargate spec at all" — which is best left to surface
as ServiceNotFoundException via the natural AWS error path.

README's `yolo init && yolo build && yolo sync production && yolo deploy
production` was nonsensical (`yolo build` errored on the missing env arg;
explicit build was redundant). Updated to:

    yolo init && yolo sync production && yolo deploy production

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@stevethomas stevethomas force-pushed the steve/lpx-606-restore-build-in-deploy-behaviour-fix-readme-one-liner branch from fa2f724 to 216e4a6 Compare May 20, 2026 06:55
@stevethomas stevethomas changed the title LPX-606: restore build-in-deploy + fix README one-liner LPX-606: yolo deploy always builds; --app-version names the build May 20, 2026
LPX-604 (#29) added headless-mode gating for solo DNS via the
ExecutesWebStep interface, but missed the multitenancy mirror.
SyncMultitenancyRecordSetStep dereferences \$this->config['apex'] and
['domain'] unconditionally, so a headless multitenant deploy would
undefined-key-crash before reaching ECS.

Symmetric fix: implement ExecutesWebStep on the tenant step too, so
Manifest::isHeadless() drives the skip via the existing
ChecksIfCommandsShouldBeRunning::shouldBeRunning() trait.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@stevethomas stevethomas merged commit 2ebe600 into main May 20, 2026
5 checks passed
@stevethomas stevethomas deleted the steve/lpx-606-restore-build-in-deploy-behaviour-fix-readme-one-liner branch May 20, 2026 07:09
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.

1 participant