Repository navigation
Build/Test Tools: Run the smoke check on multisite installations - #16355
Open
adimoldovan wants to merge 2 commits into
Open
adimoldovan wants to merge 2 commits into
adimoldovan wants to merge 2 commits into
Conversation
Requests keep the installed host name, `localhost`, so a network finds its main site. A new check loads the network admin. The workflows load the action from their own commit, so a pull request runs its own copy.
adimoldovan
marked this pull request as ready for review
December 1, 2026 11:23
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
| @@ -20,9 +22,7 @@ http_code='' | |||
|
|
|||
| version="$(wp core version)" | |||
Member
There was a problem hiding this comment.
The script now relies on the site being installed at http://localhost/, but nothing checks it. With another URL, the run would fail later with a vague error, such as "the REST index was not the expected JSON". An early check would give a clear message:
Suggested change
| version="$(wp core version)" | |
| version="$(wp core version)" | |
| # Every request sends Host: localhost, so another install URL would fail later with a vague error. | |
| installed_url="$(wp option get siteurl)" | |
| [ "${installed_url%/}" = "${site_url}" ] \ | |
| || { echo "::error::the site must be installed at ${site_url}/, not ${installed_url}"; exit 1; } |
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.
Enable the smoke checks for multisite in Installation Tests and Upgrade Tests.
Trac ticket: https://core.trac.wordpress.org/ticket/66036
A network picks its site from the request's
Hostheader. The script used to move the site tohttp://127.0.0.1:8889, so a network found no site. Now the site keeps its installed URL,http://localhost, and curl sends every request to the local server with--connect-to localhost:80:127.0.0.1:8889. Single sites no longer need thehomeandsiteurlrewrite either. The site must be installed athttp://localhost/, as both workflows do.On a network, the script also loads
/wp-admin/network/after it logs in. It checks only the main site, becausephp -Sdoes no URL rewrites for subsite paths.The workflows now load the action with
$/.github/actions/smoke-checkinstead of@trunk. A pull request that changes the script then runs its own copy. Release branches still get trunk's copy, because they callreusable-upgrade-testing.yml@trunkand$/resolves to that workflow's commit. Their multisite upgrade jobs then run the check too.setup-wp-clialready uses the same reference. The upgrade workflows run again on pull requests that change the action.Testing instructions
The Installation Tests and Upgrade Tests checks on this pull request run the step. Multisite rows print
ok /wp-admin/network/. Single site rows printskip /wp-admin/network/ (not a network).To run the script by hand:
Every check prints
okand the script exits 0. To check a single site, usewp core installinstead. The network check then printsskip.Testing done
ok /wp-admin/network/.Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: The script and workflow changes, local testing, and iterative code review.
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.