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: Disallow object names with more than 63 chars #5324

Merged
merged 2 commits into from
Mar 8, 2021

Conversation

simster7
Copy link
Member

@simster7 simster7 commented Mar 8, 2021

Fixes: #5318

Signed-off-by: Simon Behar simbeh7@gmail.com

Checklist:

Signed-off-by: Simon Behar <simbeh7@gmail.com>
@@ -108,6 +108,10 @@ func ValidateWorkflow(wftmplGetter templateresolution.WorkflowTemplateNamespaced
var wfTmplRef *wfv1.TemplateRef
var err error

if len(wf.Name) > 63 {
return nil, fmt.Errorf("workflow name '%s' must not be more than 63 characters long (currently %d)", wf.Name, len(wf.Name))
Copy link
Member

Choose a reason for hiding this comment

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

Minor: could use %q when quoting string

@@ -108,6 +108,10 @@ func ValidateWorkflow(wftmplGetter templateresolution.WorkflowTemplateNamespaced
var wfTmplRef *wfv1.TemplateRef
var err error

if len(wf.Name) > 63 {
Copy link
Member

Choose a reason for hiding this comment

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

Move this to a constant?

Signed-off-by: Simon Behar <simbeh7@gmail.com>
@simster7 simster7 merged commit 67f8ca2 into argoproj:master Mar 8, 2021
This was referenced Mar 8, 2021
simster7 added a commit that referenced this pull request Mar 8, 2021
Signed-off-by: Simon Behar <simbeh7@gmail.com>
simster7 added a commit that referenced this pull request Mar 8, 2021
Signed-off-by: Simon Behar <simbeh7@gmail.com>
@simster7 simster7 mentioned this pull request Apr 19, 2021
50 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lint fails to report a Name which is over 63 characters long
3 participants