-
Notifications
You must be signed in to change notification settings - Fork 308
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
Adding missing fields to FlyteTask remote entity #3093
base: master
Are you sure you want to change the base?
Adding missing fields to FlyteTask remote entity #3093
Conversation
Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line:
|
Code Review Agent Run #42cb06Actionable Suggestions - 1
Review Details
|
Signed-off-by: Umer Ahmad <[email protected]>
70784e4
to
ef01024
Compare
Changelist by BitoThis pull request implements the following key changes.
|
security_context=None, | ||
config=None, | ||
k8s_pod=None, | ||
sql=None, | ||
extended_resources=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.
Consider adding parameter validation for the new parameters security_context
, k8s_pod
, sql
, and extended_resources
to ensure they contain valid values before being passed to the task template.
Code suggestion
Check the AI-generated fix before applying
@@ -51,6 +51,14 @@
task_type_version: int = 0,
security_context=None,
config=None,
k8s_pod=None,
sql=None,
extended_resources=None,
+ if security_context is not None and not isinstance(security_context, dict):
+ raise ValueError('security_context must be a dict or None')
+ if k8s_pod is not None and not isinstance(k8s_pod, dict):
+ raise ValueError('k8s_pod must be a dict or None')
+ if sql is not None and not isinstance(sql, dict):
+ raise ValueError('sql must be a dict or None')
+ if extended_resources is not None and not isinstance(extended_resources, dict):
+ raise ValueError('extended_resources must be a dict or None')
Code Review Run #42cb06
Is this a valid issue, or was it incorrectly flagged by the Agent?
- it was incorrectly flagged
Code Review Agent Run #c16628Actionable Suggestions - 0Review Details
|
Signed-off-by: Umer Ahmad <[email protected]>
Code Review Agent Run #4cb82dActionable Suggestions - 0Additional Suggestions - 1
Review Details
|
Tracking issue
flyteorg/flyte#6192
Why are the changes needed?
Missing fields from FlyteTask entity from remote, for example, we need k8s_pod for template data analyis, but it only includes container as of now.
What changes were proposed in this pull request?
Adding the following fields to FlyteTask init, and promotion from model (also config):
security_context
config
k8s_pod
sql
extended_resources
How was this patch tested?
unit tests
Check all the applicable boxes
Related PRs
Docs link
Summary by Bito
The enhanced FlyteTask remote entity now includes additional fields: security_context, k8s_pod, sql, and extended_resources. The implementation adds proper initialization of SQL and Kubernetes pod template fields with default None values, includes parameter validation for data integrity, and implements a new property method for accessing extended_resources.Unit tests added: True
Estimated effort to review (1-5, lower is better): 1