-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
executor/simple: prohibit setting a resource group to a role #54525
Conversation
/cc @nolouch @CbcWestwolf @tangenta PTAL, thx. |
Signed-off-by: JmPotato <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #54525 +/- ##
=================================================
- Coverage 72.8280% 56.0809% -16.7471%
=================================================
Files 1546 1667 +121
Lines 436236 609055 +172819
=================================================
+ Hits 317702 341564 +23862
- Misses 98945 244161 +145216
- Partials 19589 23330 +3741
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Rest LGTM
@@ -379,6 +379,11 @@ create user user1; | |||
ALTER USER `user1` RESOURCE GROUP `rg1`; | |||
SELECT CURRENT_RESOURCE_GROUP(); | |||
|
|||
create role role_for_resource_group; |
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.
Please add a simple create role role_for_resource_group resource group rg1;
to cover s.IsCreateRole
branch in executeCreateUser
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.
CREATE ROLE
syntax doesn't support setting the resource group, so it will directly return an error when parsing the SQL.
![image](https://private-user-images.githubusercontent.com/1446531/346904649-a09d3774-bdd0-4985-b300-74ef56fc7fa5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5ODQ1NjQsIm5iZiI6MTczOTk4NDI2NCwicGF0aCI6Ii8xNDQ2NTMxLzM0NjkwNDY0OS1hMDlkMzc3NC1iZGQwLTQ5ODUtYjMwMC03NGVmNTZmYzdmYTUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTlUMTY1NzQ0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Y2RjN2FkOGQwNWU1YmVjYmI2ZjVmZDE0NzBkZWMzNDk4OWMyNTk4Y2I2ODBkMWVkMDFkYTE3NGJmMjE4ZWFkYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.TvOqpT5Gev9cRtXKDs52Loo5FC8UIrMxb0d7-LsEKJ8)
[LGTM Timeline notifier]Timeline:
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: CbcWestwolf, nolouch, tangenta The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
/cherry-pick release-7.5 |
Signed-off-by: ti-chi-bot <[email protected]>
@JmPotato: new pull request created to branch In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
/cherry-pick release-8.1 |
@nolouch: new pull request created to branch In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
/cherry-pick release-7.1 |
Signed-off-by: ti-chi-bot <[email protected]>
@JmPotato: new pull request created to branch In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
What problem does this PR solve?
Issue Number: close #54417, ref #54434.
What changed and how does it work?
Check if a user is a role before assigning a resource group to it.
Check List
Tests
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.