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

Commit

Permalink
Increase allowedExecutionNameLength to 63 (#466)
Browse files Browse the repository at this point in the history
* Increase `allowedExecutionNameLength` to 63

Signed-off-by: Rahul Mehta <[email protected]>

* Update TestValidExecutionIdInvalidLength

Signed-off-by: Rahul Mehta <[email protected]>

Signed-off-by: Rahul Mehta <[email protected]>
Signed-off-by: Rahul Mehta <[email protected]>
  • Loading branch information
rahul-theorem authored Aug 31, 2022
1 parent 36caab6 commit 5472634
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
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

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

Expand Down
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

0 comments on commit 5472634

Please sign in to comment.