Skip to content

Commit

Permalink
updating changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Devashishbasu committed Jan 18, 2024
1 parent 325723f commit ad8f7a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,11 @@ private void doValidate() {
checks[i], value, checkPattern.pattern()));
}
}

// Additional validation for repository length
if (repository != null) {
int repositoryLength = repository.length();
if (repositoryLength > 255) {
errors.add(String.format("Repository name '%s' has a length of %d characters, which exceeds the maximum of 255 characters.", repository, repositoryLength));
}
// Additional validation for total image name length
String fullNameWithoutTagAndDigest = getNameWithoutTag(null);
int fullNameLength = fullNameWithoutTagAndDigest.length();
if (fullNameLength > 255) {
errors.add(String.format("Total image name '%s' has a length of %d characters, which exceeds the maximum of 255 characters.", fullNameWithoutTagAndDigest, fullNameLength));
}

if (!errors.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void validNames(String name) {
":justtag",
"@sha256:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
"a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a:tag", // https://github.com/eclipse/jkube/issues/2542
//"repo@sha256:ffffffffffffffffffffffffffffffffff", // https://github.com/eclipse/jkube/issues/2543
"repo@sha256:ffffffffffffffffffffffffffffffffff", // https://github.com/eclipse/jkube/issues/2543
"validname@invaliddigest:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
"Uppercase:tag",
"test:5000/Uppercase/lowercase:tag",
Expand Down

0 comments on commit ad8f7a5

Please sign in to comment.