Mark --filter=skipped-earlier runs complete#265
Open
epeicher wants to merge 1 commit into
Open
Conversation
The skipped-files fetch branch in run_files_sync returned right after running the pipeline, before the code that sets status = "complete". So after a fully successful --filter=skipped-earlier run the state was left at "in_progress" forever, and later runs took the resume path instead of treating the sync as done. Mark the run complete once the pipeline finishes, unless it returned "partial" (meaning it yielded mid-fetch on its execution budget and needs another invocation), and emit the matching complete lifecycle event.
Contributor
Pull pipeline performance —
|
| Stage | PR | trunk | Δ | Status | Details |
|---|---|---|---|---|---|
playground-sqlite-db-pull |
7.31 s | 7.20 s | ⚪ +101 ms (+1.4%) | ✓ | 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 |
2.88 s | 2.84 s | ⚪ +38 ms (+1.3%) | ✓ | 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 | 10.18 s | 10.04 s | ⚪ +139 ms (+1.4%) |
Numbers carry runner noise; treat single-run deltas as directional, not authoritative.
📈 Trunk performance history — commit-by-commit timeline.
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.
What it does
A completed
files-sync --filter=skipped-earlierrun (the second phase that downloads the deferred uploads) is now recorded ascompletein the state file. Previously it was left atin_progressforever, so a laterfiles-syncsaw a non-complete state and took the resume path instead of treating the sync as done.Rationale
In
ImportClient::run_files_sync, the--filter=skipped-earlierbranch setsstatus = "in_progress", runs the fetch pipeline, and thenreturns — short-circuiting before the code path that marks the runcomplete:So even after a fully successful skipped-earlier fetch, the state stayed
in_progress.Implementation
After the pipeline returns, mark the run complete. The partial case is guarded first: if the pipeline yielded mid-fetch (it hit its
--max-execbudget or a server timeout and returnedstatus = "partial", exit code 2), it returns without marking complete so the next invocation resumes from the cursor.Testing instructions
The E2E
import-40-defer-uploadstest now asserts that after the--filter=skipped-earlierrun the persisted statestatusiscomplete(it wasin_progressbefore this fix):The full
Import/PHPUnit suite is green (264 tests) and WPCS reports no new violations.