A-1270 part 1: move zstash into agent repo#3953
Merged
Merged
Conversation
ee7db31 to
f5d81a8
Compare
e0ea7ee to
1da81ee
Compare
1da81ee to
f2b6859
Compare
Contributor
Author
|
@buildsworth-bk review please this is just largely a move file from one place to another change. We don't have production usage for this command, so the risk level should be low. |
There was a problem hiding this comment.
Read this as what it says on the tin: a mechanical copy of buildkite/zstash into internal/zstash, plus the testify-removal and Windows-CI commits. Spot-checked the non-mechanical bits and they look reasonable:
internal/cache/cache.goandinternal/cache/cache_test.goare the only agent-side import rewrites needed; grepped forgithub.com/buildkite/zstashand there are no other references.go.modcorrectly promoteswolfeidau/quickzipfrom indirect to direct (it's imported byinternal/zstash/archive/{create,extract}.go) and drops thebuildkite/zstashdep.- The Windows fixes in commit
f2b68597are well-scoped:filepath.ToSlashon the zip-prefix comparison inarchive/extract.go, separating chmod-walk andRemoveAllinrestore.goso theos.Roothandle is closed before the remove (needed on Windows), thefile:///C:/...path correction instore/file.go, and allowing\throughvalidateFilePathon Windows. The latter is fine becauserunCommandusesexec.Commanddirectly without a shell, so the validator is defense-in-depth rather than the actual injection boundary. - Not flagging anything in the moved zstash code itself: per the PR description that's an exact upstream copy and out of scope here. The follow-up renaming/refactor PRs will be the place for that.
No risk: label so I'm not approving, but I have no blocking concerns with the move.
Want to dig deeper? The full session log is attached to this Buildkite build. Download the session file and open a new pi session with it:
Download the buildsworth logs from build 235, then answer my questions about the findings.
Contributor
Author
|
@buildsworth-bk I gave it a risk:l1 label. |
buildkate
approved these changes
May 26, 2026
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.
Description
Mechanically copy zstash main head into buildkite-agent repo.
It's largely an exact copy, but I added two extra commits:
Context
part of A-1270.
(I plan to do more renaming and refactor dance afterwards)
Disclosures / Credits
My LLM minion