-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[YUNIKORN-1957] Add user/group limit config change e2e test #735
Conversation
@pegasas please resolve the conflict to proceed |
Hi, @pbacsko , thank you for your quick reply. conflicts are resolved. It is my case not in right way or there is bug with wildcard? |
Hi @pegasas, thanks for the effort! I am working on https://issues.apache.org/jira/browse/YUNIKORN-1950 add to following test to the end TestUserGroupLimitChange test. //remove Limits , so we can run TestApp2 again
conf.Queues[0].Queues[0].Limits = nil
assert.NilError(t, manager.UpdateConfig(conf.Queues[0], "root"))
increased = manager.IncreaseTrackedResource(queuePathParent, TestApp2, usage, tc.user)
assert.Equal(t, increased, true, "unable to increase tracked resource: queuepath "+queuePathParent+", app "+TestApp2+", res "+usage.String())
decreased = manager.DecreaseTrackedResource(queuePathParent, TestApp2, usage, tc.user, true)
assert.Equal(t, decreased, true, "unable to decreased tracked resource: queuepath "+queuePathParent+", app "+TestApp2+", res "+usage.String())
//set newLimits again, we should not run TestApp2 now
conf.Queues[0].Queues[0].Limits = tc.newLimits
assert.NilError(t, manager.UpdateConfig(conf.Queues[0], "root"))
increased = manager.IncreaseTrackedResource(queuePathParent, TestApp2, usage, tc.user)
assert.Equal(t, increased, false, "should not increase tracked resource: queuepath "+queuePathParent+", app "+TestApp2+", res "+usage.String()) |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #735 +/- ##
==========================================
+ Coverage 69.43% 69.46% +0.02%
==========================================
Files 50 50
Lines 7993 7993
==========================================
+ Hits 5550 5552 +2
+ Misses 2254 2252 -2
Partials 189 189 ☔ View full report in Codecov by Sentry. |
@manirajv06, you have more context regarding the feature. Please check if the comments above. |
I don't think above mentioned core commit should affect this test behaviour. Can you resolve the conflict and try running again? |
Thanks @manirajv06 It seems conflicts was introduced by dd02f2e which was merged yesterday I have fixed this and re-commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall looks good.
Can you organise the changes?
- user max resources
- user max applications
- group max resources
- group max applications
}) | ||
|
||
ginkgo.It("Verify_maxresources_with_a_wildcard_group_limit", func() { | ||
ginkgo.It("Verify_maxapplications_with_users_limits_changed", func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
groups ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems this block is for users as I can see 2 blocks below for groups. If it is true, then we need to check the config in this block as it doesn't have any limits for users
}) | ||
|
||
ginkgo.It("Verify_maxapplications_with_a_wildcard_group_limit", func() { | ||
ginkgo.It("Verify_resources_with_groups_limits_changed", func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maxresources?
}) | ||
|
||
ginkgo.It("Verify_maxresources_with_a_wildcard_group_limit", func() { | ||
ginkgo.It("Verify_maxapplications_with_users_limits_changed", func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems this block is for users as I can see 2 blocks below for groups. If it is true, then we need to check the config in this block as it doesn't have any limits for users
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pegasas please investigate&fix the test failures:
Summarizing 4 Failures:
[FAIL] UserGroupLimit [It] Verify_maxresources_with_users_limits_changed
/home/runner/work/yunikorn-k8shim/yunikorn-k8shim/test/e2e/user_group_limit/user_group_limit_test.go:841
[FAIL] UserGroupLimit [It] Verify_maxapplications_with_users_limits_changed
/home/runner/work/yunikorn-k8shim/yunikorn-k8shim/test/e2e/user_group_limit/user_group_limit_test.go:885
[FAIL] UserGroupLimit [It] Verify_maxresources_with_groups_limits_changed
/home/runner/work/yunikorn-k8shim/yunikorn-k8shim/test/e2e/user_group_limit/user_group_limit_test.go:841
[FAIL] UserGroupLimit [It] Verify_maxapplications_with_groups_limits_changed
/home/runner/work/yunikorn-k8shim/yunikorn-k8shim/test/e2e/user_group_limit/user_group_limit_test.go:841
ping @pegasas have you had time to check the test failures? |
What is this PR for?
use the unit test cases in yunikorn-core for add e2e test
What type of PR is it?
Todos
What is the Jira issue?
[YUNIKORN-1957] Add user/group limit config change e2e test
How should this be tested?
Specific user/group limits limits changes to ensure order of precedence:
5a) When the user limit is specified, it should be considered for that specific user
5b) When the user limit is changed, make sure it meets new limit of for that specific group
6a) When the group limit is specified, it should be considered for that specific group
6b) When the group limit is changed, make sure it meets new limit of for that specific group
Screenshots (if appropriate)
Questions: