Repository navigation
fix(server): preview plan --changed from the synced consumption copy - #1467
Merged
Merged
Conversation
A location's plan preview read consumption history through the warehouse adapter, which the preview refuses, so every model and seed counted as changed. The preview copy now carries each relation's newest executions, ranked as a build reads them, and the preview reads them from the copy.
…s in memory The preview copy carried only each relation's newest 8 executions, so read-back of an older execution found nothing and its readers counted as changed. The server now sends every mirrored row, but only when a --changed plan asks for them, so older locations never receive a field they reject. The recent read ranks executions with recent_executions, which the consumption simulation now shares.
A preview-copy request from an upgraded location now omits the flag unless a --changed plan sets it, so other plans still reach a server that predates the flag.
Move the location plan-from-copy helper out of the test module, drive the --changed preview and recent executions tests from test cases, keep the synced copy's consumption read in its own layer, and list the consumption state reader as a synced-copy preview branch.
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.
Why
A location's
--changedplan preview listed every model as changed ("no completed record"). It read consumption history through the warehouse adapter, which a preview refuses, and the copy it plans from never carried consumption rows.Changes
--changedplan sets a newconsumptionflag on the preview-copy request, and the server then sends every mirrored consumption row for the target. Complete scans keep the mirror to what the warehouse retains.--changed.recent_executions, the in-memory form of the warehouse query, which the consumption simulation now shares. Read-back of older executions searches all copied rows.Verification
test_plan_preview.py: edit one model, then request a--changedplan from a location while the warehouse is locked. The preview'schangedblock equals livesqb plan --changed --json. It fails on main.consumptionkey; with it, all executions of a busy relation come back.recent_executionscases: a late finisher and an exact start-time tie.make check-ci.DuckShop: not applicable. This is the location's preview path between the server mirror and the planner, with no new project shape, data value or build lifecycle.