Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Increase allowedExecutionNameLength to 63 #466

Merged
merged 2 commits into from
Aug 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pkg/manager/impl/validation/execution_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import (
"google.golang.org/grpc/codes"
)

const allowedExecutionNameLength = 20
// Maximum value length of a Kubernetes label
const allowedExecutionNameLength = 63
rahul-theorem marked this conversation as resolved.
Show resolved Hide resolved

var executionIDRegex = regexp.MustCompile(`^[a-z][a-z\-0-9]*$`)

Expand Down
4 changes: 2 additions & 2 deletions pkg/manager/impl/validation/execution_validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down