Cache step results while steps are executing instead of caching all of them at the end#709
Merged
Conversation
LawnGnome
approved these changes
Mar 7, 2022
LawnGnome
left a comment
Contributor
There was a problem hiding this comment.
Generally LGTM — nice work! I have a question about a modified test, and a vague note about having n os.Environ() calls, but nothing blocking.
eseliger
approved these changes
Mar 7, 2022
eseliger
left a comment
Member
There was a problem hiding this comment.
Great PR and an amazing FIRST PR! Congrats on your first, very meaningful even, contribution! 🚀
Co-authored-by: Erik Seliger <erikseliger@me.com>
Co-authored-by: Erik Seliger <erikseliger@me.com>
courier-new
approved these changes
Mar 7, 2022
courier-new
left a comment
Contributor
There was a problem hiding this comment.
Looks great, thanks for added tests!
Made one more suggestion in line with the same renaming Erik suggested about writeToCache vs. writeStepCacheResult, but otherwise I'm excited for this improvement with server-side execution!
Co-authored-by: Kelli Rockwell <kelli@sourcegraph.com>
LawnGnome
approved these changes
Mar 8, 2022
LawnGnome
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Thanks for the changes!
eseliger
approved these changes
Mar 8, 2022
scjohns
pushed a commit
that referenced
this pull request
Apr 24, 2023
…f them at the end (#709) * feat: cache build steps individually * feat: add tests for individual step caching * chore: remove unused method * Update internal/batches/executor/coordinator.go Co-authored-by: Erik Seliger <erikseliger@me.com> * Update internal/batches/executor/executor.go Co-authored-by: Erik Seliger <erikseliger@me.com> * feat: update callback method in executor * feat: optimize writeToCache callback * chore: fix failing tests * Update internal/batches/executor/run_steps.go Co-authored-by: Kelli Rockwell <kelli@sourcegraph.com> * fix: resolve failing tests Co-authored-by: Erik Seliger <erikseliger@me.com> Co-authored-by: Kelli Rockwell <kelli@sourcegraph.com>
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.
Test plan
We adjusted the test suite to ensure that tasks are cached after execution of all steps, but the steps are cached immediately the individual execution is done.
We also tested this change on the UI by taking the following steps:
Closes #27564