Skip to content

[wanda] Wire context owner override through tar writing#480

Merged
andrew-anyscale merged 2 commits intomainfrom
andrew/revup/main/add-context-owner-tar
Apr 6, 2026
Merged

[wanda] Wire context owner override through tar writing#480
andrew-anyscale merged 2 commits intomainfrom
andrew/revup/main/add-context-owner-tar

Conversation

@andrew-anyscale
Copy link
Copy Markdown
Contributor

@andrew-anyscale andrew-anyscale commented Apr 2, 2026

Add an owner field to tarStream that, when set, overrides the uid/gid on all file entries written to the tar. Pass the owner through tarFile.writeTo so each file header gets the override applied.

Topic: add-context-owner-tar
Relative: add-context-owner

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
Signed-off-by: andrew andrew@anyscale.com

@andrew-anyscale
Copy link
Copy Markdown
Contributor Author

Reviews in this chain:
#479 [wanda] Add contextOwner type and parser
 └#480 [wanda] Wire context owner override through tar writing
  └#481 [wanda] Add context_owner spec option and include in cache digest

@andrew-anyscale
Copy link
Copy Markdown
Contributor Author

andrew-anyscale commented Apr 2, 2026

# head base diff date summary
0 fac3b483 3a039ba0 diff Apr 2 13:44 PM 4 files changed, 51 insertions(+), 5 deletions(-)
1 91254ad6 36e12bbe diff Apr 2 13:55 PM 4 files changed, 30 insertions(+), 9 deletions(-)
2 08d056c8 433015c0 diff Apr 2 19:35 PM 0 files changed

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the ability to override UID and GID for all entries in a tar stream by adding an owner field to the tarStream struct and propagating it to the tarFile.writeTo method. While the implementation correctly updates the tar headers, the reviewer pointed out that the owner field is currently missing from the digest() calculation. This omission could lead to cache collisions where different ownership settings result in the same digest. It is recommended to include the owner information in the digest and add a test case to verify that digest values change when ownership is modified.

Comment thread wanda/tar_stream.go
Comment thread wanda/tar_stream_test.go
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/main/add-context-owner-tar branch from fac3b48 to 91254ad Compare April 2, 2026 20:55
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/main/add-context-owner branch from 3a039ba to 36e12bb Compare April 2, 2026 20:55
andrew-anyscale and others added 2 commits April 2, 2026 19:35
Add the contextOwner struct and parseContextOwner function for parsing "uid:gid" strings. This will be used to allow wanda specs to override file ownership in the build context tar.

Topic: add-context-owner

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: andrew <andrew@anyscale.com>
Add an owner field to tarStream that, when set, overrides the uid/gid on all file entries written to the tar. Pass the owner through tarFile.writeTo so each file header gets the override applied.

Topic: add-context-owner-tar
Relative: add-context-owner

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: andrew <andrew@anyscale.com>
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/main/add-context-owner branch from 36e12bb to 433015c Compare April 3, 2026 02:35
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/main/add-context-owner-tar branch from 91254ad to 08d056c Compare April 3, 2026 02:35
@andrew-anyscale andrew-anyscale marked this pull request as ready for review April 3, 2026 02:35
@andrew-anyscale andrew-anyscale requested a review from aslonnie April 3, 2026 02:35
Base automatically changed from andrew/revup/main/add-context-owner to main April 6, 2026 15:11
@andrew-anyscale andrew-anyscale merged commit 94f6a2f into main Apr 6, 2026
4 of 5 checks passed
@andrew-anyscale andrew-anyscale deleted the andrew/revup/main/add-context-owner-tar branch April 6, 2026 15:11
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

⚠️ PR Size Warning

This PR exceeds the size limits defined in .buildkite/raycilint.yaml.

Break this into smaller PRs, or apply the skip-prcheck label to bypass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants