Repository navigation
Remove deprecated constants - #2496
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## trunk #2496 +/- ##
=======================================
Coverage 69.29% 69.29%
=======================================
Files 90 90
Lines 7724 7723 -1
=======================================
Hits 5352 5352
+ Misses 2372 2371 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
90e0955 to
5d0b606
Compare
There was a problem hiding this comment.
Pull request overview
This PR removes the now-unused deprecated constants file from the Optimization Detective plugin and adjusts the CI Plugin Check workflow to work around an upstream wp-env startup issue on ubuntu-24.04.
Changes:
- Removed loading of
deprecated.phpfromplugins/optimization-detective/load.php. - Deleted
plugins/optimization-detective/deprecated.php(previously containing deprecated constants). - Reworked
.github/workflows/plugin-check.ymlto inline Plugin Check setup/run steps viawp-env(instead ofwordpress/plugin-check-action) and upload results as an artifact.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
plugins/optimization-detective/load.php |
Stops requiring the deprecated constants file during plugin load. |
plugins/optimization-detective/deprecated.php |
Removes the deprecated constants file entirely. |
.github/workflows/plugin-check.yml |
Changes how Plugin Check runs in CI to avoid an upstream wp-env runner issue. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5d0b606 to
9ae5021
Compare
The `Plugin Check` workflow started failing intermittently on PRs starting
2026-05-26 and was about to fail for every run once GitHub finished rolling
out the new `ubuntu-24.04` runner image (20260525.161, Node.js 24.16.0).
The symptom: `wp-env start` from wordpress/plugin-check-action silently
exits 0 after ~30 s without booting Docker, then `wp-env run cli wp cli
info` reports "Environment not initialized". Failures correlated 100% with
the new image; runs on the previous image (20260518.149, Node 24.15.0)
continued to succeed.
Bisected the trigger via three CI experiments on this branch:
1. Inlined the upstream action and added `"testsEnvironment": false`
to the generated `.wp-env.json` — the dual-env deprecation path was
a plausible suspect. Symptom unchanged.
2. Dropped the `--update` flag from `wp-env start` — Gutenberg's CI
succeeds on the new image without it. Symptom unchanged.
3. Removed the URL-based plugin entry
("https://downloads.wordpress.org/plugin/plugin-check.zip") from
`.wp-env.json` and installed plugin-check via `wp-cli` after the env
came up. All matrix jobs went green on the new image.
The bug is in wp-env's URL-plugin download path (likely the bundled `got`
^11.8.5 dependency regressing on Node 24.16/libuv 1.52.1). This commit
keeps the workaround from experiment 3 — inlining the upstream action's
steps so we can omit the URL plugin and install plugin-check via wp-cli
post-boot.
Also pins @wordpress/env to 11.7.0 (rather than installing latest) so a
future regression in wp-env can't silently break this workflow the same
way again. Bump intentionally when picking up upstream fixes.
Tracking upstream fixes at:
- WordPress/plugin-check-action#579
- WordPress/gutenberg#78762
Revert to `uses: wordpress/plugin-check-action@...` once those are
resolved upstream.
---
Squashed from the following commits, preserved verbatim below:
--- 1a83936: Inline plugin-check-action to add testsEnvironment:false workaround ---
The upstream wordpress/plugin-check-action auto-generates a .wp-env.json
without "testsEnvironment": false, which triggers a bug in @wordpress/env's
legacy dual-environment startup path on the ubuntu-24.04 runner image
20260525.161 (Node.js 24.16.0): wp-env start silently exits 0 after ~30s
without booting Docker, then `wp-env run cli wp cli info` reports
"Environment not initialized". Failures correlate 100% with the new image;
runs on 20260518.149 (Node 24.15.0) still succeed.
This commit inlines the relevant steps from the action so we can add
"testsEnvironment": false to the generated config, sidestepping the
buggy code path. Track upstream resolution at:
WordPress/plugin-check-action#579
Revert to `uses: wordpress/plugin-check-action@...` once that issue lands.
--- fb628f6: Drop --update flag from wp-env start to test if it dodges the bug ---
First experiment (testsEnvironment: false) didn't fix it — wp-env still
silently exits 0 on the new runner image. The deprecation warning is gone,
proving the config was honored, so the dual-env path isn't where the bug
lives.
The remaining difference vs Gutenberg's CI (which boots wp-env fine on the
same broken image) is the --update flag. Their `wp-env --config ... start`
has no --update; ours does. Dropping it here to see if that's the trigger.
--- 90e0955: Remove URL plugin download from .wp-env.json to test if that's the trigger ---
The remaining material difference vs Gutenberg's working wp-env start on the
new runner image: their config only references local plugins ("." and a git
core ref); ours pulls plugin-check via HTTP from downloads.wordpress.org.
The HTTP download path goes through wp-env's bundled `got` (^11.8.5, last
released years ago), which is plausibly where Node 24.16 / libuv 1.52.1
regresses silently.
Removing the URL plugin from .wp-env.json; install plugin-check via wp-cli
once the env is up instead.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
9ae5021 to
56c61e6
Compare
…bug (#579) On the ubuntu-24.04 runner image >=20260525.161 (Node 24.16), @wordpress/env's URL-source download path silently exits 0 without booting Docker. The upstream plugin-check-action auto-generates a .wp-env.json that lists plugin-check as a URL plugin, which trips this bug, so `wp-env start` "succeeds" but nothing runs and the check fails with "Environment not initialized". Inline the action's steps in the pcp job: generate .wp-env.json without the URL plugin, pin @wordpress/env@11.6.0, and install plugin-check via wp-cli after boot. Revert to `uses: wordpress/plugin-check-action@...` once upstream is fixed. Also clear any github-oauth token before Strauss in both jobs (prefixing reads only the installed composer.json/vendor and needs no GitHub auth; gravityops/core is SSH/no-api, the rest are public), and add a debug step to surface composer auth state. Refs WordPress/plugin-check-action#579, WordPress/performance#2496, WordPress/gutenberg#78762. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
This PR contains two unrelated changes:
Plugin CheckCI workflow, which started failing on the new GitHub Actionsubuntu-24.04runner image (20260525.161, Node.js 24.16.0) due to a latent bug in@wordpress/env's URL-source download path. The workflow now inlines the relevant steps ofwordpress/plugin-check-actionso we can installplugin-checkviawp-cliafterwp-env startinstead of via a URL plugin entry in.wp-env.json(the trigger). Also pins@wordpress/envto a known-good version.Tracking upstream resolution at:
wp-env startfirst. plugin-check-action#579Once those land, revert the workflow change back to
uses: wordpress/plugin-check-action@….Relevant technical choices
wordpress/plugin-check-action's steps in.github/workflows/plugin-check.yml, omitting theplugin-check.zipURL from the generated.wp-env.jsonand installing it viawp-clipost-boot. Bisection of the bug is documented in the squashed commit message and on plugin-check-action#579.Use of AI Tools
@wordpress/envwas suggested by GitHub Copilot's PR reviewer. Both are credited as co-authors on the workflow commit.