Skip to content

chore(wab): diagnostic + fixup scripts for commerce-elastic-path hostless publish failure - #399

Open
jameswillis99 wants to merge 2 commits into
masterfrom
diagnose-and-fix-commerce-elastic-path-hostless
Open

chore(wab): diagnostic + fixup scripts for commerce-elastic-path hostless publish failure#399
jameswillis99 wants to merge 2 commits into
masterfrom
diagnose-and-fix-commerce-elastic-path-hostless

Conversation

@jameswillis99

Copy link
Copy Markdown
Collaborator

Summary

  • The "Publish Hostless Packages" workflow was failing on commerce-elastic-path with a bare AssertionError (message lost to lossy JSON logging)
  • Root cause: plasmic-commerce-ep-add-to-cart-button dropped enableStockCheck (and other props) in the composable-components refactor (9b2e5e777), which trips updateHostlessPackage's "nothing existing may be removed" safety check against the project's last-published site (2026-01-09, predates that refactor)
  • Since publishHostlessProjects() runs every hostless project in one shared transaction with no per-project isolation, this one failure was blocking all hostless package publishes, not just this one
  • Adds two scripts (not wired into DbCustomScripts.ts, run directly) plus a README:
    • diagnose-commerce-elastic-path.ts — read-only repro that surfaces the real assertion message
    • migrate-commerce-elastic-path.ts — runs the real publish flow, retrying past the expected "Deleted param/slot" errors (the underlying sync already applies the fix correctly; the assertion just complains reactively) — no application source is modified
    • COMMERCE_ELASTIC_PATH_HOSTLESS_FIX.md — root cause writeup, usage, and status
  • Already run once against the non-prod DB: bumped the project's internal pkg_version from 0.1.0 to 0.2.0. Confirmed via project-deps.ts's dependency-upgrade logic that any existing customer project referencing this component handles a removed prop by cleanly dropping the arg — no crash. Confirmed nothing currently relies on enableStockCheck.

Test plan

  • Ran migrate-commerce-elastic-path.ts against non-prod, verified new pkg_version (0.2.0) registers the new global-context providers and no longer contains enableStockCheck
  • Confirm whether the actual "Publish Hostless Packages" GitHub Action environment is the same DB this was run against, and re-run there if not

…hostless publish failure

The commerce-elastic-path hostless project stopped publishing because
plasmic-commerce-ep-add-to-cart-button dropped enableStockCheck (and
other props) in the composable-components refactor (9b2e5e7), which
trips updateHostlessPackage's "nothing existing may be removed" safety
assertion against the project's last-published site.

diagnose-commerce-elastic-path.ts reproduces updateHostlessPackage
read-only to surface the real assertion message (the ECS logger drops
Error.message via JSON.stringify). migrate-commerce-elastic-path.ts
runs the real publish flow, retrying past the expected
"Deleted param/slot" errors since the underlying sync already applies
the removal correctly before the assertion fires reactively.

Already run once against the non-prod DB, bumping the project's
pkg_version from 0.1.0 to 0.2.0.
Explains root cause, what each script does, how to run them, and
current migration status.
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.

2 participants