Skip to content

Conversation

@tbradsha
Copy link
Contributor

@tbradsha tbradsha commented Nov 7, 2025

Closes MONOREP-197

Similar to #45779, sometimes WP core downloads fail as well, e.g.:
https://github.com/Automattic/jetpack/actions/runs/19178820882/job/54830260653

For now let's just do a single retry after a variable sleep. A more robust solution might be coming in WP-CLI:

Proposed changes:

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

Does this pull request change what data or activity we track or use?

Testing instructions:

The general effect can be tested like so:
wp core download asdf.asdf || sleep $(( 0 + RANDOM % 8 )) && wp core download fdsa.fdsa

@tbradsha tbradsha requested a review from a team November 7, 2025 19:54
@github-actions github-actions bot added [Status] In Progress Actions GitHub actions used to automate some of the work around releases and repository management Docker labels Nov 7, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2025

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add a "[Type]" label (Bug, Enhancement, Janitorial, Task).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!

@github-actions github-actions bot added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Nov 7, 2025
@tbradsha tbradsha self-assigned this Nov 7, 2025
@tbradsha tbradsha added [Status] Needs Review This PR is ready for review. [Type] Janitorial and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. [Status] In Progress labels Nov 7, 2025
@tbradsha tbradsha marked this pull request as ready for review November 7, 2025 19:59
Copy link
Contributor

@anomiex anomiex left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me

@tbradsha tbradsha merged commit 3f42ce1 into trunk Nov 7, 2025
99 of 101 checks passed
@tbradsha tbradsha deleted the fix/tests/retry_wp_download_on_failure branch November 7, 2025 20:35
@github-actions github-actions bot removed [Status] In Progress [Status] Needs Review This PR is ready for review. labels Nov 7, 2025
# https://github.com/wp-cli/core-command/pull/258
# https://github.com/wp-cli/wp-cli/pull/6140
# For now this should work well enough
[ -f /var/www/html/xmlrpc.php ] || wp core download || sleep $(( 30 + RANDOM % 8 )) && wp core download
Copy link
Contributor

Choose a reason for hiding this comment

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

Oops. We both missed that this should have been something like

[ -f /var/www/html/xmlrpc.php ] || wp core download || { sleep $(( 30 + RANDOM % 8 )) && wp core download; }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Actions GitHub actions used to automate some of the work around releases and repository management Docker [Type] Janitorial

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants