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
fix: don't load entire archived workflow into memory in list APIs #12912
fix: don't load entire archived workflow into memory in list APIs #12912
Conversation
Signed-off-by: Jiacheng Xu <xjcmaxwellcjx@gmail.com>
Signed-off-by: Jiacheng Xu <xjcmaxwellcjx@gmail.com>
8dc8d1a
to
1cd9117
Compare
Signed-off-by: Jiacheng Xu <xjcmaxwellcjx@gmail.com>
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.
LGTM!
StartedAt: v1.Time{Time: md.StartedAt}, | ||
FinishedAt: v1.Time{Time: md.FinishedAt}, | ||
Progress: wfv1.Progress(md.Progress), | ||
}, |
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.
What did you base the metadata requirements on? Based on workflows-service.ts
and reports.tsx
, we may also want status.message
, status.estimatedDuration
, status.resourceDuration
, and spec.suspend
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 was checking columns in the workflow UI and decided what metadata to include, but if the fields that you mentioned are required, I can open another PR to add them
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.
Technically speaking, fields
is a query parameter in the API, so ideally we'd dynamically set the fields.
If you didn't notice some of them it may be because you can expand items in the list?
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.
Oh, that could be, I will prepare a PR to add those fields.
Backported cleanly into |
Fixes #11121 (comment), Related to #12025 (comment)
This PR fixes the regression introduced in #11121 (comment). In this PR, we don't load the entire workflow to the memory since that causes high memory usage and slow query performance.