-
Notifications
You must be signed in to change notification settings - Fork 345
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
feat: add enable_simple_view to PipelineJob.list() #1614
Conversation
"job_detail.pipeline_run_context", | ||
"job_detail.pipeline_context", | ||
] | ||
) |
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.
nit - consider creating the path list as a constant somewhere that can be shared with the test file. Feel free to ignore if it needs too much refactor.
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.
Done
/lgtm |
@@ -1026,6 +1027,7 @@ def _list( | |||
cls_filter: Callable[[proto.Message], bool] = lambda _: True, | |||
filter: Optional[str] = None, | |||
order_by: Optional[str] = None, | |||
read_mask: Optional[field_mask.FieldMask] = 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.
Could you please add doc string for this and the one in the next method?
enable_simple_view (bool): | ||
Optional. Whether to pass the `read_mask` parameter to the list call. | ||
This will improve the performance of calling list(). However, the | ||
returned PipelineJob list will not include all fields for each PipelineJob. |
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.
I think here we can specify what fields are missing.
Add support for
read_mask
option inPipelineJob.list()
to improve performance. This will reduce the number of fields returned in the response for each PipelineJob.