Skip to content

@W-24181435 Complete the SCAPI Deployments backend (bundle list + local-build deploy) - #695

Merged
o-olaosebikan merged 7 commits into
mainfrom
o.olaosebikan/W-24181435/deployments-scapi
Sep 18, 2026
Merged

o-olaosebikan merged 7 commits into
mainfrom
o.olaosebikan/W-24181435/deployments-scapi

Conversation

@o-olaosebikan

Copy link
Copy Markdown
Contributor

Summary

GUS: @W-24181435 — [B2C CLI][SCAPI] Complete the Deployments backend

Completes the SCAPI Storefront Deployments backend by moving the two remaining /bundles operations off the legacy MRT Cloud API:

  • mrt bundle list is now backend-aware — lists bundles via SCAPI (normalized rows + backend column), keeps --json as a backend-native passthrough, and auto falls back to legacy on safe statuses.
  • mrt bundle deploy (local build) runs over SCAPI — uploads the build via SCAPI and, when a target is given, creates the deployment and supports --wait polling; upload-only failures fall back to legacy while post-upload deploy failures do not (no double-upload).
  • SDK wrappers addedlistBundlesScapi, uploadBundleScapi, and backend-aware listMrtBundles / pushMrtBundle.
  • Docs, user-facing skills, and a changeset updated for the two now-SCAPI-capable commands.

Testing

Test plan: Test Plan — W-24181435 SCAPI Deployments Backend (A & B live tests)

Live scenarios exercised (cloud-soak tenant zymb_018 / org f_ecom_zymb_018, project nicki-be2141):

  • A — SCAPI bundle listing: list via --mrt-backend scapi (table + backend column, -D shows resolved org/backend), --json backend-native passthrough, and auto resolving to SCAPI. A1 verified live (HTTP 200, correlation a3cb765d3f1867aa).
  • B — SCAPI local-build deploy: upload local build (no environment), upload + deploy to a target, upload + deploy + --wait to completion.

Automated coverage: MSW unit tests in packages/b2c-tooling-sdk/test/operations/mrt/push.test.ts (listBundlesScapi, uploadBundleScapi, backend-aware listMrtBundles / pushMrtBundle) and CLI command tests in packages/b2c-cli/test/commands/mrt/bundle/{list,deploy}.test.ts across backends.

Dependencies

  • No net-new third-party dependencies were added
  • If net-new third-party dependencies were added, rationale/discussion is included and 3pl-approved is set by a maintainer

  • Tests pass (pnpm test)
  • Code is formatted (pnpm run format)


static flags = {
...MrtCommand.baseFlags,
message: Flags.string({

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.

The upload v2 endpoint supports some additional arguments:

'root-dir': Flags.string({
      description: 'Archive path prefix under which built files and the config file live',
      default: DEFAULT_V2_ROOT_DIR,
    }),
    'config-path': Flags.string({
      description: 'Path to the in-archive config file, relative to --root-dir',
      default: DEFAULT_V2_CONFIG_PATH,
    }),
    'match-mode': Flags.string({
      description: 'How ssr-only/ssr-shared patterns that match no files are handled',
      options: ['strict', 'ignore_missing'],
      default: DEFAULT_V2_MATCH_MODE,
    }),

Can you add those but make it so they only take affect if the backend is SCAPI?

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.

You can look at the upload-v2 command for reference

this.log(
t(
'commands.mrt.bundle.uploadV2.pushV2Hint',
'Note: "b2c mrt bundle deploy --v2" performs the same v2 upload and can build, upload, and deploy in one step.',

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.

Can this be a warning instead

@o-olaosebikan
o-olaosebikan marked this pull request as ready for review September 18, 2026 21:53
@o-olaosebikan
o-olaosebikan deployed to b2c-docs-preview September 18, 2026 21:54 — with GitHub Actions Active
@github-actions

github-actions Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

📘 Docs preview

🧹 The preview for this PR has been removed (PR closed).

@o-olaosebikan
o-olaosebikan merged commit d076982 into main Sep 18, 2026
15 checks passed
@o-olaosebikan
o-olaosebikan deleted the o.olaosebikan/W-24181435/deployments-scapi branch September 18, 2026 21:59
@o-olaosebikan
o-olaosebikan deployed to b2c-docs-preview September 18, 2026 22:00 — with GitHub Actions Active
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