pbacsko commented on code in PR #758:
URL: https://github.com/apache/yunikorn-core/pull/758#discussion_r1436612278
##########
pkg/scheduler/ugm/manager.go:
##########
@@ -631,6 +641,21 @@ func (m *Manager) CanRunApp(queuePath, applicationID
string, user security.UserG
return userCanRunApp && groupCanRunApp
}
+func (m *Manager) HasWildCardApplied(user string, hierarchy []string) bool {
+ m.RLock()
+ defer m.RUnlock()
+ log.Log(log.SchedUGM).Debug("Has wild card user limit applied?",
+ zap.String("user", user),
+ zap.Strings("queue path", hierarchy))
+ userTracker := m.GetUserTracker(user)
+ if userTracker == nil {
+ log.Log(log.SchedUGM).Error("user tracker must be available in
userTrackers map",
+ zap.String("user", user))
+ return false
+ }
Review Comment:
This branch is easy to test, let's add test for it to enhance coverage.
--
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]