feat(wanda): implement artifact extraction using docker cp#411
feat(wanda): implement artifact extraction using docker cp#411andrew-anyscale wants to merge 1 commit intoandrew/revup/main/wanda-artifact-specfrom
Conversation
|
Summary of ChangesHello @andrew-anyscale, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a mechanism to copy artifacts from built Docker images using docker cp. The implementation is straightforward, adding new docker command wrappers and integrating artifact extraction into the build process. The changes are well-tested, covering file and directory copying, optional artifacts, and behavior on cache hits.
My review focuses on improving code style and correctness in the tests and documentation. Specifically:
- Using
filepath.Joinfor path construction in tests to improve portability and adhere to Go idioms. - Correcting a misleading comment in
wanda/forge.go.
I also noticed some code duplication in the new test functions in wanda/docker_cmd_test.go. While I haven't added a specific comment, you might consider refactoring the common setup (pulling image, creating container) into a helper function to make the tests more concise.
Overall, this is a solid contribution that adds valuable functionality.
a3b19fc to
80ab6e0
Compare
70e0db3 to
25c63e1
Compare
80ab6e0 to
81385ec
Compare
25c63e1 to
f1104ff
Compare
81385ec to
1e3c63b
Compare
f1104ff to
313a1f8
Compare
1e3c63b to
217cc4d
Compare
313a1f8 to
7a60b1e
Compare
217cc4d to
34ea72c
Compare
34ea72c to
868f0c1
Compare
868f0c1 to
f210797
Compare
aslonnie
left a comment
There was a problem hiding this comment.
- why we are not using crane this time?
- what will happen when wanda cache hits?
I didn't see any capabilities for copying out individual files/directories outside of exporting the file system. I can rework if there is an entrypoint I am missing. https://github.com/google/go-containerregistry/blob/main/cmd/crane/doc/crane.md
Extraction runs for root spec only, even on cache hit. This is so that CI doesn't have missing artifacts in the case of a cache hit. |
Extract artifacts from built images using `docker cp` for cross-platform reliability - Create container from image without starting it - List container files via `docker export` for glob matching - Copy each artifact using `docker cp` - Clean up container when done - Extraction runs for root spec only, even on cache hit Example: ```shell ❯ PYTHON_VERSION=3.13 MANYLINUX_VERSION=260128.221a193 HOSTTYPE=aarch64 ARCH_SUFFIX=-aarch64 BUILDKITE_COMMIT=b5737cefc0 IS_LOCAL_BUILD=true /Users/andrew/devel/rayci-wanda-artifacts/_release/wanda-darwin-arm64 --artifacts_dir .whl/ ci/docker/ray-wheel.wanda.yaml ... 2026/02/04 09:10:39 extracting 1 artifact(s) from localhost:5000/rayci-work:ray-wheel-py3.13-aarch64 Successfully copied 72MB to /Users/andrew/devel/ray-local-wheel-build/.whl/ray-3.0.0.dev0-cp313-cp313-manylinux2014_aarch64.whl 2026/02/04 09:10:40 extracted 1 artifact(s) in 722ms: 2026/02/04 09:10:40 /Users/andrew/devel/ray-local-wheel-build/.whl/ray-3.0.0.dev0-cp313-cp313-manylinux2014_aarch64.whl ``` Topic: wanda-artifact-copy Relative: wanda-artifact-spec Signed-off-by: andrew <andrew@anyscale.com>
f210797 to
f343d80
Compare
7a60b1e to
928b35c
Compare
f343d80 to
44d0999
Compare
Extract artifacts from built images using
docker cpfor cross-platform reliabilitydocker exportfor glob matchingdocker cpExample:
❯ PYTHON_VERSION=3.13 MANYLINUX_VERSION=260128.221a193 HOSTTYPE=aarch64 ARCH_SUFFIX=-aarch64 BUILDKITE_COMMIT=b5737cefc0 IS_LOCAL_BUILD=true /Users/andrew/devel/rayci-wanda-artifacts/_release/wanda-darwin-arm64 --artifacts_dir .whl/ ci/docker/ray-wheel.wanda.yaml ... 2026/02/04 09:10:39 extracting 1 artifact(s) from localhost:5000/rayci-work:ray-wheel-py3.13-aarch64 Successfully copied 72MB to /Users/andrew/devel/ray-local-wheel-build/.whl/ray-3.0.0.dev0-cp313-cp313-manylinux2014_aarch64.whl 2026/02/04 09:10:40 extracted 1 artifact(s) in 722ms: 2026/02/04 09:10:40 /Users/andrew/devel/ray-local-wheel-build/.whl/ray-3.0.0.dev0-cp313-cp313-manylinux2014_aarch64.whlTopic: wanda-artifact-copy
Relative: wanda-artifact-spec
Signed-off-by: andrew andrew@anyscale.com