Support target-controlled push relay and staged file apply#277
Open
adamziel wants to merge 5 commits into
Open
Support target-controlled push relay and staged file apply#277adamziel wants to merge 5 commits into
adamziel wants to merge 5 commits into
Conversation
f9d8cc5 to
d7be100
Compare
Contributor
Pull pipeline performance —
|
| Stage | PR | trunk | Δ | Status | Details |
|---|---|---|---|---|---|
playground-sqlite-db-pull |
9.29 s | 9.34 s | ⚪ -50 ms (-0.5%) | ✓ | condition=db-pull in PHP.wasm runtime=php.wasm 8.3 wp_mysql_parser=enabled mode=lexer native_lexer=verified native_token_stream=WP_MySQL_Native_Token_Stream native_token_count=18 native_parser=selected trunk: condition=db-pull in PHP.wasm runtime=php.wasm 8.3 wp_mysql_parser=enabled mode=lexer native_lexer=verified native_token_stream=WP_MySQL_Native_Token_Stream native_token_count=18 native_parser=selected |
playground-sqlite-db-apply |
3.55 s | 3.48 s | ⚪ +71 ms (+2.0%) | ✓ | condition=db-apply to SQLite in PHP.wasm runtime=php.wasm 8.3 wp_mysql_parser=enabled mode=parser native_lexer=verified native_token_stream=WP_MySQL_Native_Token_Stream native_token_count=18 native_parser=verified native_ast=WP_MySQL_Native_Parser_Node sqlite_driver_parser=verified trunk: condition=db-apply to SQLite in PHP.wasm runtime=php.wasm 8.3 wp_mysql_parser=enabled mode=parser native_lexer=verified native_token_stream=WP_MySQL_Native_Token_Stream native_token_count=18 native_parser=verified native_ast=WP_MySQL_Native_Parser_Node sqlite_driver_parser=verified |
| Total | 12.84 s | 12.82 s | ⚪ +21 ms (+0.2%) |
Numbers carry runner noise; treat single-run deltas as directional, not authoritative.
📈 Trunk performance history — commit-by-commit timeline.
657c4a3 to
cbee0ff
Compare
cbee0ff to
be5076e
Compare
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.
Summary
relay-sourceworker for outbound-only/local sources.files-plan,materialize-docroot, andapply-staged-files.Why
Studio push should be initiated by the local user but still keep the remote target in charge of importer sequencing, cursors, retries, safety checks, and final writes. This PR keeps direct pulls working as-is, adds a relay path for push-style networking, and adds the first target-side filesystem planning/apply commands needed to avoid writing changed PHP code directly into the live tree during transfer.
Issue: #276
How to try
Build the PHAR:
For the relay transport, start the source worker where the local/source exporter is reachable:
Then run the target importer through the same relay directory:
For the staged filesystem apply primitives after
preflight+files-index/files-pull:Notes:
files-planblocks WordPress core files andwp-config.phpby default, warns on loose top-level PHP, and reports target writability when--target-rootis supplied.apply-staged-filesintentionally does not delete target files.apply-staged-filescopies uploads/fonts before maintenance mode, prepares plugin/theme.newtrees merged with live unselected files, swaps through.bak, swaps loose top-level PHP, clears the current-operation journal, and invalidates PHP opcache entries when available.Validation
php -n -l packages/reprint-importer/src/import.php✅php -n vendor/bin/phpunit --configuration tests/phpunit.xml tests/Import/FilesPlanMaterializeApplyTest.php tests/Import/FlatDocrootWpConfigTest.php tests/Import/RelayTransportTest.php tests/SiteExportPushSessionTest.php✅npm --prefix tests/e2e test -- tests/import-53-plugin-push-relay-api.test.js tests/import-54-push-apply-primitives.test.js✅composer build:phar✅npm --prefix tests/e2e test -- tests/import-52-relay-transport.test.js/srv/e2e-sites/basic; the suite passed in GitHub Actions.phpunitis not a useful local signal in this workspace because the MySQL-backed producer tests cannot connect to a local MySQL server; the GitHub PHPUnit matrix passed.gh pr checks 277 --watch✅ all GitHub checks passed after the follow-up e2e PHAR invocation fix.