fix: resolve symlinks when archiving embedded artifacts#13554
fix: resolve symlinks when archiving embedded artifacts#13554Priyanshu-u07 wants to merge 3 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @Priyanshu-u07. Thanks for your PR. I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There was a problem hiding this comment.
Pull request overview
Fixes embedded-artifact extraction failures at runtime by ensuring symlinked inputs are archived as regular files (with their actual contents) during SDK compile-time component generation, addressing #13533 without backend changes.
Changes:
- Enable symlink dereferencing when building the embedded tar archive for lightweight components (
dereference=True). - Add a small test helper to extract/decompress the embedded archive payload from compiled component source.
- Add unit tests covering (1) embedding a symlinked file and (2) embedding a directory containing symlinked files, asserting the archive has no symlink/hardlink entries and content is correct.
🤖 LGTM 🤖
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| sdk/python/kfp/dsl/component_factory.py | Dereference symlinks when creating embedded artifact tar archives to avoid runtime extraction errors. |
| sdk/python/kfp/dsl/component_factory_test.py | Adds helpers + new tests to validate symlink resolution behavior for embedded artifacts. |
Signed-off-by: Priyanshu-u07 <connect.priyanshu8271@gmail.com>
31539d5 to
20d78a9
Compare
|
/retest |
|
@Priyanshu-u07: Cannot trigger testing until a trusted user reviews the PR and leaves an DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Description of your changes:
Resolves symlinks when creating tar archives for embedded artifacts. Previously,
tarfile.open()preserved symlinks in the archive, causingRuntimeError: Failed to extract embedded archiveat runtime when the symlink target didn't exist inside the container.Fixes #13533
Changes:
dereference=Truetotarfile.open()in_get_command_and_args_for_lightweight_component()so symlinked files are archived as regular files with actual content_get_archive()test helper to extract and decompress the embedded archive from a compiled componentembedded_artifact_pathNote: The issue is labeled [backend] but the bug is in the Python SDK's archiving logic, not the backend API server.