Do not update project repo when loading results - #127
Open
schmoelder wants to merge 1 commit into
Open
Conversation
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.
Commit 0967f17 changed Case.load() from updating the output repository to updating the project repository before looking for matching cached results. That fixed the update target only if loading is expected to sync repositories first, but it made a load operation mutate the study repository. In practice, Case.load() can now fetch, rebase, and hard-reset the project checkout before provenance matching happens.
This PR makes Case.load() read from local state by default. Loading results no longer updates the project repository, fetches output refs, or moves either checkout unless explicitly requested.
For callers that want to discover newly pushed output results before matching, Case.load(fetch=True) fetches the output repository refs first. This keeps the useful part of the old behavior, finding newly available output results, without pulling, rebasing, or resetting the project repository.
The tests cover that default Case.load() does not call project_repo.update(), does not fetch output refs by default, and leaves both repositories in the same Git state while still loading cached result files. They also cover that fetch=True performs the explicit output fetch path.
This changes an unintended side effect of Case.load(). Code that relied on loading to update the project repository should call project_repo.update() explicitly before loading.