File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
tests/e2e/kubetest2-kops/deployer Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -300,14 +300,17 @@ func defaultClusterName(cloudProvider string) (string, error) {
300
300
jobName = jobName [:79 ]
301
301
}
302
302
if jobType == "presubmit" {
303
- jobName = fmt .Sprintf ("e2e-pr%s.%s.%s " , pullNumber , jobName , suffix )
303
+ jobName = fmt .Sprintf ("e2e-pr%s.%s" , pullNumber , jobName )
304
304
} else {
305
- jobName = fmt .Sprintf ("e2e-%s.%s " , jobName , suffix )
305
+ jobName = fmt .Sprintf ("e2e-%s" , jobName )
306
306
}
307
- if len (jobName ) > 63 && cloudProvider == "gce" { // GCP has char limit of 64
308
- jobName = jobName [:63 ]
307
+
308
+ // GCP has char limit of 64
309
+ gcpLimit := 63 - (len (suffix ) + 1 ) // 1 for the dot
310
+ if len (jobName ) > gcpLimit && cloudProvider == "gce" {
311
+ jobName = jobName [:gcpLimit ]
309
312
}
310
- return jobName , nil
313
+ return fmt . Sprintf ( "%v.%v" , jobName , suffix ) , nil
311
314
}
312
315
313
316
// stateStore returns the kops state store to use
You can’t perform that action at this time.
0 commit comments