AnzhiZhang commented on code in PR #3724:
URL: https://github.com/apache/texera/pull/3724#discussion_r2335639490


##########
core/workflow-core/src/main/scala/edu/uci/ics/amber/core/storage/util/LakeFSStorageClient.scala:
##########
@@ -74,25 +74,36 @@ object LakeFSStorageClient {
   }
 
   /**
-    * Initializes a new repository in LakeFS.
+    * Validates the repository name against LakeFS naming conventions.
     *
-    * @param repoName         Name of the repository.
-    * @param defaultBranch    Default branch name, usually "main".
+    * @param repoName name of the repository to validate.
+    * @throws IllegalArgumentException if the repository name is invalid.
     */
-  def initRepo(
-      repoName: String
-  ): Repository = {
+  def validateRepositoryName(repoName: String): Unit = {
     val repoNamePattern = "^[a-z0-9][a-z0-9-]{2,62}$".r
 
     // Validate repoName
     if (!repoNamePattern.matches(repoName)) {
       throw new IllegalArgumentException(
-        s"Invalid dataset name: '$repoName'. " +
-          "Dataset names must be 3-63 characters long, " +
+        s"Invalid repository name: '$repoName'. " +
+          "Repository names must be 3-63 characters long, " +
           "contain only lowercase letters, numbers, and hyphens, " +
-          "and cannot start or end with a hyphen."
+          "and cannot start with a hyphen."

Review Comment:
   This allows ending with a hyphen, and this is what we want.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to