Skip to content

Add typed JSON output to hydrogen deploy - #4098

Open
gonzaloriestra wants to merge 3 commits into
gonzalo/hydrogen-json-customer-accountfrom
gonzalo/hydrogen-json-deploy
Open

gonzaloriestra wants to merge 3 commits into
gonzalo/hydrogen-json-customer-accountfrom
gonzalo/hydrogen-json-deploy

Conversation

@gonzaloriestra

@gonzaloriestra gonzaloriestra commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Deployment needs a finite result that reports successful and declined operations consistently.

Fixes https://github.com/shop/issues-develop/issues/23679

WHAT is this pull request doing?

Return {status, deployment} with validated URLs and null unavailable bypass tokens. Preserve the native Oxygen CompletedDeployment bytes in h2_deploy_log.json; --json-output still controls that CI file independently from --json.

HOW to test your changes?

shopify hydrogen deploy --json-schema
shopify hydrogen deploy --json

Checklist

  • I have read the contributing guidelines
  • I have considered cross-platform impacts
  • I have added a changeset for user-facing changes
  • I have added tests
  • I have updated the documentation

@shopify

shopify Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Oxygen deployed a preview of your gonzalo/hydrogen-json-deploy branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
Skeleton (skeleton.hydrogen.shop) ✅ Successful (Logs) Preview deployment Inspect deployment October 13, 202611:04 AM

Learn more about Hydrogen's GitHub integration.

@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/hydrogen-json-deploy branch from f3d45cb to e3794de Compare September 29, 2026 12:25
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/hydrogen-json-deploy branch from e3794de to 589de46 Compare September 29, 2026 14:53

@fredericoo fredericoo left a comment

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.

nice and simple - splitting executeDeploy from the presenter in runDeploy reads well, human-mode output is unchanged, and h2_deploy_log.json keeps the same bytes and stays independent of --json (with a test for it). Errors go through the shared JSON error path from #4095, and the two helpers that used to warn-and-return now throw in JSON mode so we don't end up emitting null for what's really a failure.

a couple of small comments on the JSON-mode custom build hook, otherwise LGTM

Comment thread packages/cli/src/commands/hydrogen/deploy.ts Outdated
Comment thread packages/cli/src/commands/hydrogen/deploy.test.ts
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/hydrogen-json-deploy branch from 589de46 to dc77b29 Compare October 6, 2026 12:02
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/hydrogen-json-deploy branch 2 times, most recently from d2c14da to ea80385 Compare October 6, 2026 12:12
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/hydrogen-json-deploy branch 2 times, most recently from 0e0d5b0 to ccdc03f Compare October 6, 2026 13:52
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/hydrogen-json-deploy branch from ccdc03f to b954a05 Compare October 6, 2026 13:55
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/hydrogen-json-deploy branch from b954a05 to 088ecb3 Compare October 8, 2026 11:36
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/hydrogen-json-deploy branch 2 times, most recently from 5482acd to da0e705 Compare October 9, 2026 10:52
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/hydrogen-json-deploy branch from da0e705 to d56b82f Compare October 9, 2026 12:25
@gonzaloriestra
gonzaloriestra marked this pull request as ready for review October 9, 2026 12:28
@gonzaloriestra
gonzaloriestra requested a review from a team as a code owner October 9, 2026 12:28
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/hydrogen-json-deploy branch from d56b82f to 7d66407 Compare October 9, 2026 13:01
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/hydrogen-json-deploy branch 2 times, most recently from 3e14095 to 8b8e1af Compare October 9, 2026 13:29
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/hydrogen-json-deploy branch from 8b8e1af to a213a34 Compare October 9, 2026 14:01
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/hydrogen-json-deploy branch from a213a34 to e251a41 Compare October 13, 2026 11:03
@gonzaloriestra
gonzaloriestra removed this pull request from stack #4104 October 13, 2026 11:03
@gonzaloriestra
gonzaloriestra added this pull request to stack #4177 October 13, 2026 11:04

This branch has not been deployed

No deployments
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