-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature/flytekit] Smarter copy handling with image spec #3070
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: taieeuu <[email protected]>
Code Review Agent Run #36f32bActionable Suggestions - 0Additional Suggestions - 1
Review Details
|
Changelist by BitoThis pull request implements the following key changes.
|
Code Review Agent Run #b288dcActionable Suggestions - 0Additional Suggestions - 10
Review Details
|
flytekit/tools/translator.py
Outdated
container._args = prefix_with_fast_execute(settings, container.args) | ||
if ( | ||
(not hasattr(entity, "container_image")) | ||
or (not entity.container_image) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or (not entity.container_image) | |
or (entity.container_image is not None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your review ~ I fixed it ~
flytekit/tools/translator.py
Outdated
if ( | ||
(not hasattr(entity, "container_image")) | ||
or (not entity.container_image) | ||
or (entity.container_image and not entity.container_image.source_root) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or (entity.container_image and not entity.container_image.source_root) | |
or (IsInstance(entity.container_image, ImageSpec) and entity.container_image.source_root is not None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your review ~ I fixed it .
Signed-off-by: taieeuu <[email protected]>
Signed-off-by: taieeuu <[email protected]>
Signed-off-by: taieeuu <[email protected]>
Code Review Agent Run #70c125Actionable Suggestions - 1
Review Details
|
or (entity.container_image is None) | ||
or (isinstance(entity.container_image, ImageSpec) and entity.container_image.source_root is not None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition for checking ImageSpec
source root appears to be inverted. Currently it checks for source_root is not None
, but based on the context it should check for source_root is None
to properly handle image building cases.
Code suggestion
Check the AI-generated fix before applying
or (entity.container_image is None) | |
or (isinstance(entity.container_image, ImageSpec) and entity.container_image.source_root is not None) | |
or (entity.container_image is None) | |
or (isinstance(entity.container_image, ImageSpec) and entity.container_image.source_root is None) |
Code Review Run #70c125
Is this a valid issue, or was it incorrectly flagged by the Agent?
- it was incorrectly flagged
let us think about this... we're thinking through what the ideal experience is. |
Tracking issue
Related to issue#6094
Why are the changes needed?
What changes were proposed in this pull request?
If you use the source_root parameter in imagespec, the command execution will use pyflyte-fast-execute; otherwise, it will use pyflyte-execute.
How was this patch tested?
the unit test pass.
Screenshots
Check all the applicable boxes
Summary by Bito
Implementation of enhanced container image handling in flytekit with improved validation logic and execution command determination. The system includes Kubernetes StatefulSet Data Service features, custom Python executable support, and smarter ImageSpec configurations. Changes focus on proper handling of container images, None value checks, and logic refinement for pyflyte-execute selection based on source_root parameters. The implementation includes improved error handling and CLI monitoring capabilities with configurable chunk sizes for data persistence.Unit tests added: True
Estimated effort to review (1-5, lower is better): 5