diff --git a/pkg/manager/impl/validation/execution_validator.go b/pkg/manager/impl/validation/execution_validator.go index fc4f993930..8db798eb0c 100644 --- a/pkg/manager/impl/validation/execution_validator.go +++ b/pkg/manager/impl/validation/execution_validator.go @@ -16,7 +16,8 @@ import ( "google.golang.org/grpc/codes" ) -const allowedExecutionNameLength = 20 +// Maximum value length of a Kubernetes label +const allowedExecutionNameLength = 63 var executionIDRegex = regexp.MustCompile(`^[a-z][a-z\-0-9]*$`) diff --git a/pkg/manager/impl/validation/execution_validator_test.go b/pkg/manager/impl/validation/execution_validator_test.go index 7e5a2d4e9d..0af0ebfde0 100644 --- a/pkg/manager/impl/validation/execution_validator_test.go +++ b/pkg/manager/impl/validation/execution_validator_test.go @@ -162,9 +162,9 @@ func TestValidExecutionId(t *testing.T) { } func TestValidExecutionIdInvalidLength(t *testing.T) { - err := CheckValidExecutionID("abcdeasdasdasdasdasdasdasd123", "a") + err := CheckValidExecutionID("abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc", "a") assert.NotNil(t, err) - assert.EqualError(t, err, "size of a exceeded length 20 : abcdeasdasdasdasdasdasdasd123") + assert.EqualError(t, err, "size of a exceeded length 63 : abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc") } func TestValidExecutionIdInvalidChars(t *testing.T) {