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

feat: speed up resolve reference #12328

Merged

Conversation

shuangkun
Copy link
Member

@shuangkun shuangkun commented Dec 7, 2023

I have a big and flat workflow( 2000+ ) pod, which have artifacts reference each step. I find it won’t continue running down when it run to around step 100~200.

After investigation, I find the function "resolveReferences" is too slow. One Step Group node has 1000 step need 300s to resolveReferences and then update the Step Group succeed. After that, then the workflow can run down. But the default time for woc.operator is 30s. I have set MAX_OPERATION_TIME to 20 min to succeed the workflow. But I think there is a better solution.

So I want to speed up resolve reference.

I print the step time when it change to newStepStr use "template.Replace". Maybe I will speed up the "template.Replace" function future.
image
image

Fixes #TODO

Motivation

Modifications

Verification

Beyond this PR

@shuangkun shuangkun force-pushed the feature/SpeepUpResolveReference branch from a82c424 to 3265886 Compare December 7, 2023 12:33
@shuangkun shuangkun marked this pull request as draft December 7, 2023 12:55
@shuangkun shuangkun force-pushed the feature/SpeepUpResolveReference branch 3 times, most recently from 3c9921c to 8498c0b Compare December 19, 2023 13:01
@shuangkun shuangkun marked this pull request as ready for review December 19, 2023 13:02
@shuangkun shuangkun force-pushed the feature/SpeepUpResolveReference branch from 8498c0b to 2893ce1 Compare December 19, 2023 13:02
@shuangkun shuangkun marked this pull request as draft December 19, 2023 13:07
@shuangkun shuangkun closed this Dec 19, 2023
@shuangkun shuangkun reopened this Dec 19, 2023
@shuangkun shuangkun marked this pull request as ready for review December 19, 2023 13:38
@agilgur5 agilgur5 added area/controller Controller issues, panics area/artifacts S3/GCP/OSS/Git/HDFS etc labels Dec 28, 2023
@juliev0 juliev0 added the prioritized-review For members of the Sustainability Effort label Jan 9, 2024
@juliev0 juliev0 self-assigned this Jan 13, 2024
@shuangkun shuangkun force-pushed the feature/SpeepUpResolveReference branch 2 times, most recently from 6e16be0 to e0b847c Compare January 14, 2024 04:21
go func(i int, step wfv1.WorkflowStep) {
defer wg.Done()
if err := resolveStepReferences(i, step, newStepGroup); err != nil {
woc.log.WithFields(log.Fields{"stepName": step.Name}).WithError(err).Error(err.Error())
Copy link
Contributor

Choose a reason for hiding this comment

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

Just want to make sure - would we possibly print the error twice? I'm looking at WithError(err).Error(err.Error())

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, I changed it!

Signed-off-by: shuangkun <tsk2013uestc@163.com>
@shuangkun shuangkun force-pushed the feature/SpeepUpResolveReference branch from e0b847c to fe2b1aa Compare January 15, 2024 01:32
@juliev0 juliev0 merged commit 1e7b239 into argoproj:main Jan 15, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/artifacts S3/GCP/OSS/Git/HDFS etc area/controller Controller issues, panics prioritized-review For members of the Sustainability Effort
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants