Skip to content

Conversation

@jordanverasamy
Copy link
Contributor

@jordanverasamy jordanverasamy commented Nov 25, 2025

WHY are these changes introduced?

Part 1/2 addressing https://github.com/shop/issues-api-foundations/issues/1142.

WHAT is this pull request doing?

Adds a new command that lets users check the progress of their long-running bulk operations.

How to test your changes?

Start a bulk query:

pnpm shopify app execute --path=<PATH_TO_YOUR_APP> --query="{ products { edges { node { id variants { edges { node { id } } } } } } }"
image

Note down the ID and pass it to the bulk status command using --id:

pnpm shopify app bulk status --path=<PATH_TO_YOUR_APP> --id=<YOUR_BULK_OPERATION_ID>
image image

If you pass in an ID that doesn't exist, you'll get an error:

image

@github-actions
Copy link
Contributor

github-actions bot commented Nov 25, 2025

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
79.27% (+0.04% 🔼)
13762/17361
🟡 Branches
73.23% (+0.12% 🔼)
6720/9177
🟡 Functions
79.4% (+0.03% 🔼)
3535/4452
🟡 Lines
79.64% (+0.06% 🔼)
13004/16329
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / admin-as-app.ts
100% 100% 100% 100%
🟢
... / bulk-operation-run-mutation.ts
100% 100% 100% 100%
🟢
... / bulk-operation-run-query.ts
100% 100% 100% 100%
🟢
... / get-bulk-operation-by-id.ts
100% 100% 100% 100%
🟢
... / staged-uploads-create.ts
100% 100% 100% 100%
🔴
... / status.ts
0% 100% 0% 0%
🟢
... / bulk-operation-status.ts
96% 85.71% 100% 100%
🟢
... / download-bulk-operation-results.ts
100% 100% 100% 100%
🟢
... / execute-bulk-operation.ts
90.91% 80.56% 100% 92.31%
🟢
... / format-bulk-operation-status.ts
100% 100% 100% 100%
🟢
... / run-mutation.ts
100% 100% 100% 100%
🟢
... / run-query.ts
100% 100% 100% 100%
🟡
... / stage-file.ts
72.73% 62.5% 83.33% 71.88%
🟢
... / watch-bulk-operation.ts
100% 100% 100% 100%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟡
... / specification.ts
68.52% (-0.57% 🔻)
75.61% (+2.44% 🔼)
76.47% (-1.31% 🔻)
68.09% (-0.66% 🔻)
🟢
... / developer-platform-client.ts
84.62% (-1.5% 🔻)
73.68% (+3.1% 🔼)
81.82% (+1.82% 🔼)
90.63% (-2.71% 🔻)
🟢
... / api.ts
87.07% (-0.43% 🔻)
76.71% (-0.1% 🔻)
100%
86.49% (-0.43% 🔻)
🔴
... / ui.tsx
50.82% (-0.79% 🔻)
42.86% (-5.53% 🔻)
54.55% (+1.42% 🔼)
50% (-0.82% 🔻)
🟢
... / console.ts
81.82% (+15.15% 🔼)
75% (-25% 🔻)
100% (+33.33% 🔼)
81.82% (+15.15% 🔼)
🔴
... / dev.ts
12.77% (-0.57% 🔻)
2.78% (-0.16% 🔻)
57.14%
12.77% (-0.57% 🔻)
🟡
... / theme-environment.ts
69.57% (-1.86% 🔻)
50%
55.56% (-3.27% 🔻)
69.57% (-1.86% 🔻)

Test suite run success

3422 tests passing in 1390 suites.

Report generated by 🧪jest coverage report action from bce54f6

@jordanverasamy jordanverasamy force-pushed the jtv/add-status-subcommand branch from 1b17a01 to de15a6b Compare November 26, 2025 18:35
@jordanverasamy jordanverasamy force-pushed the jtv/watch-live-progress branch 2 times, most recently from c8e62d6 to 4c19852 Compare November 26, 2025 18:51
@jordanverasamy jordanverasamy force-pushed the jtv/add-status-subcommand branch from de15a6b to 16085c8 Compare November 26, 2025 18:51
Base automatically changed from jtv/watch-live-progress to main November 26, 2025 19:33
@jordanverasamy jordanverasamy force-pushed the jtv/add-status-subcommand branch 8 times, most recently from 3dc60f0 to 1220b22 Compare November 27, 2025 03:14
@jordanverasamy jordanverasamy self-assigned this Nov 27, 2025
@jordanverasamy jordanverasamy force-pushed the jtv/add-status-subcommand branch from 1220b22 to 8e4cd3b Compare November 27, 2025 03:37
@jordanverasamy jordanverasamy marked this pull request as ready for review November 27, 2025 03:37
@jordanverasamy jordanverasamy requested review from a team as code owners November 27, 2025 03:37
@github-actions
Copy link
Contributor

We detected some changes at packages/*/src and there are no updates in the .changeset.
If the changes are user-facing, run pnpm changeset add to track your changes and include them in the next release CHANGELOG.

Caution

DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release.

@gonzaloriestra
Copy link
Contributor

/snapit

@github-actions
Copy link
Contributor

🫰✨ Thanks @gonzaloriestra! Your snapshot has been published to npm.

Test the snapshot by installing your package globally:

npm i -g --@shopify:registry=https://registry.npmjs.org @shopify/[email protected]

Caution

After installing, validate the version by running just shopify in your terminal.
If the versions don't match, you might have multiple global instances installed.
Use which shopify to find out which one you are running and uninstall it.

Copy link
Contributor

@gonzaloriestra gonzaloriestra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! The only important thing is using ensureAuthenticatedAdminAsApp.

Also, another UX suggestion: I think both execute and status should be under the same topic. For example I'd find it more clear to have:

  • shopify app bulk run (instead of shopify app execute)
  • shopify app bulk status

@jordanverasamy
Copy link
Contributor Author

Also, another UX suggestion: I think both execute and status should be under the same topic. For example I'd find it more clear to have:

shopify app bulk run (instead of shopify app execute)
shopify app bulk status

Yeah, this is happening, I'm just waiting for us to be out of PR stack hell before I move the existing code into the bulk command. See https://github.com/shop/issues-api-foundations/issues/1127.

@jordanverasamy jordanverasamy force-pushed the jtv/add-status-subcommand branch 2 times, most recently from ac5e1e1 to 40308af Compare November 27, 2025 16:58
@jordanverasamy jordanverasamy changed the base branch from main to graphite-base/6667 November 27, 2025 17:16
@jordanverasamy jordanverasamy force-pushed the jtv/add-status-subcommand branch from 40308af to 761e22f Compare November 27, 2025 17:16
@jordanverasamy jordanverasamy changed the base branch from graphite-base/6667 to 11-19-implement-ensureAuthenticatedAdminAsApp November 27, 2025 17:16
@jordanverasamy jordanverasamy force-pushed the 11-19-implement-ensureAuthenticatedAdminAsApp branch from 41d68b3 to 02b54ed Compare November 27, 2025 17:22
@jordanverasamy jordanverasamy force-pushed the jtv/add-status-subcommand branch from 761e22f to 32308b1 Compare November 27, 2025 17:22
Base automatically changed from 11-19-implement-ensureAuthenticatedAdminAsApp to main November 27, 2025 17:42
@jordanverasamy jordanverasamy force-pushed the jtv/add-status-subcommand branch from 32308b1 to cc1db6c Compare November 27, 2025 17:46
Allows users to check the status of a bulk operation by ID.
@jordanverasamy jordanverasamy force-pushed the jtv/add-status-subcommand branch from cc1db6c to bce54f6 Compare November 27, 2025 17:49
@github-actions
Copy link
Contributor

Differences in type declarations

We detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

We found no new type declarations in this PR

Existing type declarations

packages/cli-kit/dist/public/common/string.d.ts
@@ -120,4 +120,12 @@ export declare function pascalize(str: string): string;
  * @param delimiter - Delimiter used to split the string into tokens.
  * @returns String with the normalized list of tokens.
  */
-export declare function normalizeDelimitedString(delimitedString?: string, delimiter?: string): string | undefined;
\ No newline at end of file
+export declare function normalizeDelimitedString(delimitedString?: string, delimiter?: string): string | undefined;
+/**
+ * Given two dates, it returns a human-readable string representing the time elapsed between them.
+ *
+ * @param from - Start date.
+ * @param to - End date.
+ * @returns A string like "5 minutes ago" or "2 days ago".
+ */
+export declare function timeAgo(from: Date, to: Date): string;
\ No newline at end of file

@jordanverasamy jordanverasamy added this pull request to the merge queue Nov 27, 2025
Merged via the queue into main with commit f7eb632 Nov 27, 2025
25 checks passed
@jordanverasamy jordanverasamy deleted the jtv/add-status-subcommand branch November 27, 2025 18:06
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.

3 participants