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: support long arguments #12325

Merged
merged 1 commit into from
Jan 13, 2024

Conversation

shuangkun
Copy link
Member

@shuangkun shuangkun commented Dec 6, 2023

offload the envtemplate to configmap when arguments is too long

Fixes #7586
Fixes #12190

Motivation

Modifications

Verification

@alexec
Copy link
Contributor

alexec commented Jan 8, 2024

Solution seems reasonable. Perhaps this would benefit from some tests? Not sure why this PR has not been reviewed yet.

@sarabala1979 sarabala1979 self-requested a review January 8, 2024 06:38
@sarabala1979
Copy link
Member

I will take a look

@shuangkun
Copy link
Member Author

Perhaps this would benefit from some tests

Solution seems reasonable. Perhaps this would benefit from some tests? Not sure why this PR has not been reviewed yet.

okay, I will add some ut.

@juliev0 juliev0 added the prioritized-review For members of the Sustainability Effort label Jan 9, 2024
@shuangkun shuangkun force-pushed the feat/supportBigArgument branch 5 times, most recently from a51e3c0 to 71db1fe Compare January 10, 2024 06:45
}

if offloadEnvVarTemplate {
cmName := fmt.Sprintf("%s-configmap", pod.Name)
Copy link
Member

Choose a reason for hiding this comment

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

can you add logic to check name is not crossing the maximum limit? if yes, we can short the name.

@shuangkun shuangkun force-pushed the feat/supportBigArgument branch 2 times, most recently from 182d7bf to 2837b32 Compare January 10, 2024 08:08
package util

func GenerateConfigMapName(prefix string) string {
maxPrefixLength := maxK8sResourceNameLength - k8sNamingHashLength
Copy link
Member

Choose a reason for hiding this comment

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

Can you comment on how the name will calculate if it is oversized?
Do we have hash on end?
Eg:
<podname>-confimap > maxPrefixLength

I am thinking,
can we have just only the podname?

Co-authored-by: shuangkun <tsk2013uestc@163.com>
Co-authored-by: sherwinkoo29 <sherwinkoo@163.com>
Co-authored-by: zjgemi <liuxin_zijian@163.com>
Signed-off-by: shuangkun <tsk2013uestc@163.com>
Copy link
Member

@sarabala1979 sarabala1979 left a comment

Choose a reason for hiding this comment

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

LGTM.
@shuangkun thanks for your contribution.

@sarabala1979 sarabala1979 merged commit 85d1c79 into argoproj:main Jan 13, 2024
27 checks passed
@agilgur5 agilgur5 added area/controller Controller issues, panics area/executor labels Jan 14, 2024
@alexflorezr
Copy link

Hi, Is there any plan for releasing this? I was hoping to see it in the new release, but unfortunately it was not there 😢

@Joibel
Copy link
Member

Joibel commented Mar 4, 2024

This is a "feature" so will be in the next minor release (3.6) rather than a patch release.

@alexflorezr
Copy link

This is a "feature" so will be in the next minor release (3.6) rather than a patch release.

Thank you 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/controller Controller issues, panics area/executor prioritized-review For members of the Sustainability Effort
Projects
None yet
7 participants