This is an automated email from the ASF dual-hosted git repository.

chenyulin0719 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yunikorn-core.git


The following commit(s) were added to refs/heads/master by this push:
     new dfc9e48d [YUNIKORN-2775] Update inaccurate comment regarding regexp 
(#940)
dfc9e48d is described below

commit dfc9e48d19bedda9535206a32824bc86b54bbb3f
Author: ryankert <[email protected]>
AuthorDate: Sun Aug 11 05:00:14 2024 +0000

    [YUNIKORN-2775] Update inaccurate comment regarding regexp (#940)
    
    Closes: #940
    
    Signed-off-by: Yu-Lin Chen <[email protected]>
---
 pkg/common/configs/configvalidator.go | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/pkg/common/configs/configvalidator.go 
b/pkg/common/configs/configvalidator.go
index 04acec17..176ada84 100644
--- a/pkg/common/configs/configvalidator.go
+++ b/pkg/common/configs/configvalidator.go
@@ -72,10 +72,11 @@ var DefaultPreemptionDelay = 30 * time.Second
 var QueueNameRegExp = regexp.MustCompile(`^[a-zA-Z0-9_:#/@-]{1,64}$`)
 
 // User and group name check: systems allow different things POSIX is the base 
but we need to be lenient and allow more.
-// allow upper and lower case, add the @ and . (dot) and officially no length.
+// A username must start with a letter(uppercase or lowercase),
+// followed by any number of letter(uppercase or lowercase), digits, ':', '#', 
'/', '_', '.', '@', '-', and may end with '$'.
 var UserRegExp = regexp.MustCompile(`^[_a-zA-Z][a-zA-Z0-9:#/_.@-]*[$]?$`)
 
-// Groups should have a slightly more restrictive regexp (no @ . or $ at the 
end)
+// Groups should have a slightly more restrictive regexp (no # / @ or $ at the 
end)
 var GroupRegExp = regexp.MustCompile(`^[_a-zA-Z][a-zA-Z0-9:_.-]*$`)
 
 // all characters that make a name different from a regexp


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to