Skip to content

Conversation

@nickwesselman
Copy link
Contributor

@nickwesselman nickwesselman commented Dec 8, 2025

WHY are these changes introduced?

Improve the user experience when monitoring bulk operations by providing more responsive status updates and clearer progress information.

WHAT is this pull request doing?

  1. Enhances the bulk operation polling mechanism:

    • Uses a faster 1-second polling interval for the first 10 polls, then switches to 5 seconds
    • This provides more responsive feedback during the initial stages of a bulk operation
  2. Improves status formatting:

    • Hides the object count in the status message when the count is 0
    • Prevents showing "0 objects read/written" which could be confusing to users
  3. Adds comprehensive tests:

    • Verifies the polling interval behavior
    • Ensures proper formatting when object count is 0

How to test your changes?

  1. Run a bulk operation using the CLI
  2. Observe that status updates appear more frequently at the beginning
  3. Verify that when a bulk operation is in the RUNNING state with 0 objects, it doesn't display the object count

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

@nickwesselman nickwesselman changed the title poll more frequently the first 10 times Improve bulk operation polling with faster initial checks and hide zero counts Dec 8, 2025
@nickwesselman nickwesselman marked this pull request as ready for review December 8, 2025 02:35
@nickwesselman nickwesselman requested a review from a team as a code owner December 8, 2025 02:35
@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

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.

Copy link
Contributor Author

Copy link
Contributor Author

/snapit

@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

🫰✨ Thanks @nickwesselman! 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.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
79.21% (+0.01% 🔼)
13921/17574
🟡 Branches
73.21% (+0.01% 🔼)
6803/9293
🟡 Functions 79.35% 3565/4493
🟡 Lines
79.57% (+0% 🔼)
13151/16528

Test suite run success

3492 tests passing in 1408 suites.

Report generated by 🧪jest coverage report action from 9d4706e

Copy link
Contributor

@jordanverasamy jordanverasamy left a comment

Choose a reason for hiding this comment

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

nice change! kept it simple and clean, love it 👌🏾

@nickwesselman nickwesselman force-pushed the poll_bulk_operations_faster branch from 0ffa7ec to a694179 Compare December 9, 2025 13:32
@nickwesselman nickwesselman force-pushed the poll_bulk_operations_faster branch from a694179 to d894b0c Compare December 9, 2025 20:20
@nickwesselman nickwesselman force-pushed the use_integer_for_status_id branch from 6b4b9cb to e72bf3d Compare December 9, 2025 20:20
Copy link
Contributor

@ericlee878 ericlee878 left a comment

Choose a reason for hiding this comment

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

Cool idea!

@nickwesselman nickwesselman force-pushed the use_integer_for_status_id branch from e72bf3d to e7d4f1f Compare December 10, 2025 14:13
@nickwesselman nickwesselman requested a review from a team as a code owner December 10, 2025 14:13
@nickwesselman nickwesselman force-pushed the poll_bulk_operations_faster branch from d894b0c to 544183d Compare December 10, 2025 14:14
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.

👌

Base automatically changed from use_integer_for_status_id to main December 11, 2025 14:15
@nickwesselman nickwesselman added this pull request to the merge queue Dec 11, 2025
Merged via the queue into main with commit 426706b Dec 11, 2025
25 of 45 checks passed
@nickwesselman nickwesselman deleted the poll_bulk_operations_faster branch December 11, 2025 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants