Skip to content
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

Merged
merged 5 commits into from Apr 16, 2024

Conversation

jiachengxu
Copy link
Contributor

@jiachengxu jiachengxu commented Apr 8, 2024

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.

Signed-off-by: Jiacheng Xu <xjcmaxwellcjx@gmail.com>
@agilgur5 agilgur5 changed the title fix: load entire archived workflow into memory in list APIs fix: don't load entire archived workflow into memory in list APIs Apr 8, 2024
@agilgur5 agilgur5 self-assigned this Apr 8, 2024
Signed-off-by: Jiacheng Xu <xjcmaxwellcjx@gmail.com>
@jiachengxu jiachengxu force-pushed the select-archived-workflow-fix branch from 8dc8d1a to 1cd9117 Compare April 8, 2024 17:22
@agilgur5 agilgur5 added this to the v3.5.x patches milestone Apr 12, 2024
Copy link
Member

@jessesuen jessesuen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@terrytangyuan terrytangyuan merged commit f80b9e8 into argoproj:main Apr 16, 2024
28 checks passed
StartedAt: v1.Time{Time: md.StartedAt},
FinishedAt: v1.Time{Time: md.FinishedAt},
Progress: wfv1.Progress(md.Progress),
},
Copy link
Member

@agilgur5 agilgur5 Apr 19, 2024

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

Copy link
Contributor Author

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

Copy link
Member

@agilgur5 agilgur5 Apr 26, 2024

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?

Copy link
Contributor Author

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.

agilgur5 pushed a commit that referenced this pull request Apr 19, 2024
…2912)

Signed-off-by: Jiacheng Xu <xjcmaxwellcjx@gmail.com>
(cherry picked from commit f80b9e8)
@agilgur5
Copy link
Member

Backported cleanly into release-3.5 as 200f4d1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3.5 ListWorkflows causes server to hang when there are lots of archived workflows
4 participants