-
Notifications
You must be signed in to change notification settings - Fork 0
Code freeze base branch #96
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
Conversation
| def execute_json_nullable(az_cmd: AzCmd) -> Any: | ||
| az_response = execute(az_cmd, can_fail=True) | ||
| if not az_response: | ||
| return None | ||
| return json.loads(az_response) |
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.
Hm, I feel like this was supposed to be used somewhere.... If we find it I think it would be better off as an optional argument to execute_json.
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.
I agree
| def get_assigned_entra_role_ids(user_id: str) -> set[str]: | ||
| return set( | ||
| execute_json( | ||
| Cmd(["az", "rest"]) |
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.
Are these not using AzCmd because there isn't a service associated with these commands? Seems a little bit confusing just from a naming perspective given that they are very much az cli commands.
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.
Right. I kinda think we should phase out that AzCmd class, I don't really see the benefit of it. I also think we could consider integrating the shlex.quote into the Cmd class to make it easier to use. Anything that's an input to a command should proably be quoted (I think, lmk if you think that's not right)
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.
Yeah I think we should quote everything - just have to be very careful to not double quote things. The PR for that change will need to be tested very thoroughly.
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.
Agreed
benjjs
left a comment
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.
Approach seems good and the refactor is otherwise appreciated
…rest [AZINTS-4252] Use `az rest` to fetch permissions
[AZINTS-4268][HD-148] Quickstart agent bulk install for Azure VMs
[AZINTS-4260] Handle unhandled throttling
…signments-concurrent [AZINTS-4143] Check ability to create app registrations (concurrently)
Will use this as base branch until code thaw.