Repository navigation
Release - #1169
Open
pirate-bot wants to merge 13 commits into
Open
Release#1169pirate-bot wants to merge 13 commits into
pirate-bot wants to merge 13 commits into
Conversation
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan-phar-composer-source) from 2.1.32 to 2.2.15. - [Commits](https://github.com/phpstan/phpstan-phar-composer-source/commits) --- updated-dependencies: - dependency-name: phpstan/phpstan dependency-version: 2.2.15 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Collaborator
Author
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan-phar-composer-source) from 2.2.15 to 2.2.16. - [Commits](https://github.com/phpstan/phpstan-phar-composer-source/commits) --- updated-dependencies: - dependency-name: phpstan/phpstan dependency-version: 2.2.16 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [codeinwp/themeisle-sdk](https://github.com/Codeinwp/themeisle-sdk) from 3.3.65 to 3.3.66. - [Release notes](https://github.com/Codeinwp/themeisle-sdk/releases) - [Commits](Codeinwp/themeisle-sdk@v3.3.65...v3.3.66) --- updated-dependencies: - dependency-name: codeinwp/themeisle-sdk dependency-version: 3.3.66 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ils (#1175) callSync() sets the global loading flag before it polls the transfer progress. apiFetch rejects on any non-2xx response or network error, and the rejection handler cleared the sync and rollback flags but not the global one, so the Image Storage controls (and the other screens that read it) stayed disabled after a failed poll. Adds the first Jest test for the dashboard API module. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix: let WP-CLI continue a rollback started from the dashboard "Transfer back from Optimole" turns offload_media off when it starts the rollback, and `wp optimole media rollback_images` refused to run whenever offload_media was off. A rollback may now run while one is in progress (is_offload_enabled(), as the Abilities API already does); moving images to Optimole still needs offload_media on. The new Optml_Settings::can_transfer_images() holds that rule so it can be tested. The command also stopped a rollback when the offload limit flag was set; the limit only concerns uploads, so it now stops the offload only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: run the WP-CLI media command under PHPUnit The tests only covered Optml_Settings::can_transfer_images(), so the command could go back to its old checks unnoticed. A small WP-CLI stand-in (tests/wp-cli-stub.php) lets the real command run: it continues a rollback started from the dashboard, is not stopped by the offload limit flag, still stops an offload when the account is at its limit, and is refused when nothing was offloaded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: do not let the WP-CLI transfer overlap a running background transfer With the gate open, `wp optimole media rollback_images` could move the same images as the dashboard's background chain at the same time, and restore them twice. The background chain takes the transfer lock when it is scheduled, and maybe_reschedule() takes it again on every request while a transfer is in progress, also where cron never runs the chain. So the command cannot simply wait for the lock: it would never run on a site with a stuck cron. The lock now records when a step ran (on renew). The command is refused while a background step ran within the lock's lifetime, and otherwise takes the lock over: a background step that fires later cannot renew it and stops, and nothing is rescheduled while the command holds it. The command renews the lock per batch and releases it on every exit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: use a database advisory lock so only one run moves images The takeover of the transfer lock was a read-then-write: a background step could renew the lock between the two, and both runs then moved the same images. The transfer lock (a transient) goes back to what it was: it says which chain owns a transfer, and is taken when the chain is scheduled. A second lock now says who is moving images at this moment: a MySQL advisory lock (GET_LOCK), which is atomic and freed by the database when the request ends, also after a crash. A background step takes it for its batch and does nothing when it cannot; the WP-CLI command takes it for its whole run and stops with a message when it cannot. Where the database has no advisory locks, the lock is granted and transfers work as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: take the moving-images lock on the primary and release it at shutdown With several database servers (HyperDB, LudicrousDB) the lock query could go to a different server in each run, so two runs could both get the lock. Reads are now sent to the primary before the lock is asked. A fatal error skips the cleanup of the run. On a persistent connection the lock would then outlive the request, so it is also released on shutdown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: do not add a translatable string for the WP-CLI lock message The message of the refused command is plain English, like the other WP-CLI messages of the plugin, so the fix adds no string to translate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix: keep new uploads local while an Image Storage rollback runs During a rollback, offload_media is off but is_offload_enabled() stays true so that already offloaded images keep being served from Optimole. That also kept the upload hooks on, so a new upload was offloaded while everything else was being moved back. generate_image_meta() and the filename deduplication in insert() are now registered only while offload_media is on; they belong together, because insert() renames the attached file for offloaded uploads only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: add a void return type to the rollback upload test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: move the rollback upload test away from the other new media tests Three open PRs added tests at the same place in tests/test-media.php, which would conflict as they merge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan-phar-composer-source) from 2.2.16 to 2.2.17. - [Commits](https://github.com/phpstan/phpstan-phar-composer-source/commits) --- updated-dependencies: - dependency-name: phpstan/phpstan dependency-version: 2.2.17 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
) * fix: do not build polled image URLs before the SDK is initialized poll_optimized_images() turned the API's list into image URLs through the Optimole SDK, which is only initialized for a connected site. On a site without a CDN key and secret it threw "Please initialize the Optimole SDK first". It now returns an empty list there, without calling the API. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: add return types to the not-connected polling test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan-phar-composer-source) from 2.2.17 to 2.3.0. - [Commits](https://github.com/phpstan/phpstan-phar-composer-source/commits) --- updated-dependencies: - dependency-name: phpstan/phpstan dependency-version: 2.3.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [codeinwp/themeisle-sdk](https://github.com/Codeinwp/themeisle-sdk) from 3.3.66 to 3.3.67. - [Release notes](https://github.com/Codeinwp/themeisle-sdk/releases) - [Commits](Codeinwp/themeisle-sdk@v3.3.66...v3.3.67) --- updated-dependencies: - dependency-name: codeinwp/themeisle-sdk dependency-version: 3.3.67 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issues
This release will close the following issues once merged:
wp optimole media rollback_imagescommand to execute whenoffload_mediais set to rollback state #1161Public changelog