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

@sarabala1979 sarabala1979 Jan 10, 2024

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 <[email protected]>
Co-authored-by: sherwinkoo29 <[email protected]>
Co-authored-by: zjgemi <[email protected]>
Signed-off-by: shuangkun <[email protected]>
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

alexflorezr commented Mar 5, 2024

Thank you 🙏

@fyp711
Copy link
Contributor

fyp711 commented Oct 8, 2024

@shuangkun Thanks for fix it. I have a small question, how to clear this configmap? Is there any way to clean up?

@Joibel
Copy link
Member

Joibel commented Oct 8, 2024

how to clear this configmap? Is there any way to clean up?

It should have an owner reference of the workflow, so get deleted when the workflow is deleted.

@fyp711
Copy link
Contributor

fyp711 commented Oct 8, 2024

I see. Thank you for your answer, which has solved my doubts.

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
8 participants