Repository navigation
Conversation
…all Workspace A filtered check selection wraps each module object in __withArtifactView, whose state carries Origins from artifactViewOrigin. That hash held inputs that differ in every session: the host Workspace's cachePerCall input, the module recipe of each rebuilt call, and the cache-per-call inputs of any argument Append rebuilt. So the view argument changed per session, every receiver below it got a new digest, and no check under a filter cached across sessions, however little its inputs read. An origin now normalizes only what varies per session and keeps what tells two collections apart. On the source's own call chain, the ambient Workspace, a currentWorkspace with no receiver, becomes its type name; an explicit or overlaid Workspace keeps its identity. A call with nothing to change keeps its ID, so a digest the engine set survives. A rebuilt call replaces its module with the module's name, since a recipe differs per load and a ref per checkout. Sources sort by origin, then recipe, so a per-call Workspace cannot reorder them against their keys. Signed-off-by: Yasyf Mohamedali <[email protected]>
Contributor
|
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
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.
Key a filtered collection's view by an origin that holds nothing per-session, so checks under a filter can cache across sessions. #15044 has the details.
artifactViewOriginhashed the collection's recipe, which held the host Workspace'scachePerCallinput, the module recipe of each rebuilt call, and the cache-per-call inputs of any argumentAppendrebuilt. It now changes only what varies per session:currentWorkspacewith no receiver, becomes its type name. An explicit or overlaid Workspace keeps its identity, so two collections built from different overlays keep different origins.artifact_collection.gonow sorts sources by origin, then recipe, withKeysandOriginsmoved together, so a per-call Workspace can't reorder them.The risk in this change is a wrong cache hit, so what follows measures that first.
TestArtifactViewOriginHoldsNoPerSessionInputscovers the origin itself: equal across differingcachePerCallinputs and view wrappers, different across modules, fields and overlaid Workspaces. On one engine, two Go packages that differ only in one input file, one passing and one failing, selected through collection filters:The cost, on one package of 466 test files under a filter, on one engine, across committed README-only changes:
CACHEDA one-line edit to one source file still evaluates the collection's checks, since the collection's content changed, and runs 34 execs: the tests whose imports hold that file. Two README-only changes over that edit evaluate none.
Fixes #15044.