Merge pull request #16136 from borg-land/sns-char-limit

limit jobname value to 80
This commit is contained in:
Kubernetes Prow Robot 2023-11-30 13:52:17 +01:00 committed by GitHub
commit 6f7fcb0a9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -274,6 +274,9 @@ func defaultClusterName(cloudProvider string) (string, error) {
suffix = "k8s.local" suffix = "k8s.local"
} }
if len(jobName) > 79 { // SNS has char limit of 80
jobName = jobName[:79]
}
if jobType == "presubmit" { if jobType == "presubmit" {
return fmt.Sprintf("e2e-pr%s.%s.%s", pullNumber, jobName, suffix), nil return fmt.Sprintf("e2e-pr%s.%s.%s", pullNumber, jobName, suffix), nil
} }