Run plain-permalinks login test against the shared integration server#1411
Merged
Conversation
Replace the dedicated plain-permalinks WordPress instance with a serial test that flips the shared test server to plain permalinks via wp-cli, runs API discovery, and restores the original permalink structure as its last step. This removes the extra docker-compose stack, setup script, Makefile targets, and Buildkite step in favor of the existing mutable test harness.
Collaborator
|
Every PR should add an entry under the
If the change genuinely has no user-visible impact (e.g. CI-only tweaks, internal refactors), add a short entry under |
Collaborator
XCFramework BuildThis PR's XCFramework is available for testing. Add to your .package(url: "https://github.com/automattic/wordpress-rs", branch: "pr-build/1411")Built from 59449eb |
jkmassel
approved these changes
Jun 26, 2026
crazytonyli
added a commit
that referenced
this pull request
Jul 6, 2026
* Support plain-permalink REST API root on self-hosted sites On plain-permalink sites, WordPress advertises the REST API root as `…/index.php?rest_route=/` rather than `…/wp-json`. Discovery accepted that URL, but `WpOrgSiteApiUrlResolver` then path-extended it to build endpoint URLs — producing `…/index.php/wp/v2/users/me?rest_route=/`, which WordPress routes to the API index. Every endpoint silently collapsed, breaking self-hosted login (#1366). Detect the query-parameter form on the discovered `api_root_url` and append into the `rest_route` value instead of the path. The URL itself carries the form information, so no callers or constructors change. Includes a dedicated Docker setup (`docker-compose.plain-permalinks.yml` + `make start-plain-permalinks-test-server`) and a regression test that runs against a real plain-permalinks WordPress instance. Fixes #1366 * wp_rs_cli: acknowledge ?rest_route= API root form The CLI's `--api-root` flag never actually enforced a `/wp-json` suffix in code — only the help text and error message claimed it did. Now that the resolver handles plain-permalink sites, update the help text and README example to document both forms and drop the misleading error message. * ci: run plain-permalinks integration test in Buildkite Adds a step in the e2e group that brings up the dedicated WordPress instance and runs the regression test from #1366. Rust is installed on the agent (matching the pattern used by the Kotlin step), then cargo test runs on the host against the docker-mapped port 8081. * Add CHANGELOG entry for #1366 Documents the plain-permalink REST API root fix under [Unreleased] → Fixed, per the project's changelog convention. * ci: run plain-permalinks test inside the WordPress container The first CI attempt ran `cargo test` directly on the Buildkite agent, which has no OpenSSL dev libraries — `openssl-sys` failed to build. It only passed locally because the dev Mac has openssl. Run cargo *inside* the dedicated WordPress container instead, matching the main `test-rust-integration` flow. The container image already provides the Rust toolchain and `libssl-dev`. Inside the container the site is reachable at `http://localhost` (port 80), so `wp core install` now configures that URL rather than the host-mapped `:8081` (which the compose file still exposes for local debugging). * Run plain-permalinks login test against the shared integration server (#1411) Replace the dedicated plain-permalinks WordPress instance with a serial test that flips the shared test server to plain permalinks via wp-cli, runs API discovery, and restores the original permalink structure as its last step. This removes the extra docker-compose stack, setup script, Makefile targets, and Buildkite step in favor of the existing mutable test harness. --------- Co-authored-by: Tony Li <tony.li@automattic.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.
Implements this suggestion: #1369 (comment)