Skip to content
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

add org list roles cmd #1554

Merged
merged 5 commits into from
Feb 20, 2024
Merged

add org list roles cmd #1554

merged 5 commits into from
Feb 20, 2024

Conversation

aliotta
Copy link
Contributor

@aliotta aliotta commented Feb 15, 2024

Description

Describe the purpose of this pull request.

  • Adds an org list roles command to ease the use of the custom rbac cli cmds. This displays the default roles as well as a paginated list of custom roles
  • Regens the core api code so the new endpoints can be used

🎟 Issue(s)

Related #XXX

🧪 Functional Testing

List the functional testing steps to confirm this feature or fix.

Tested the functionality of the cmd locally

📸 Screenshots

Add screenshots to illustrate the validity of these changes.

Screenshot 2024-02-15 at 3 41 02 PM

📋 Checklist

  • Rebased from the main (or release if patching) branch (before testing)
  • Ran make test before taking out of draft
  • Ran make lint before taking out of draft
  • Added/updated applicable tests
  • Tested against Astro-API (if necessary).
  • Tested against Houston-API and Astronomer (if necessary).
  • Communicated to/tagged owners of respective clients potentially impacted by these changes.
  • Updated any related documentation

Copy link

codecov bot commented Feb 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f2a7d7f) 86.14% compared to head (8925bd1) 86.21%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1554      +/-   ##
==========================================
+ Coverage   86.14%   86.21%   +0.07%     
==========================================
  Files         112      113       +1     
  Lines       14945    15026      +81     
==========================================
+ Hits        12874    12955      +81     
  Misses       1252     1252              
  Partials      819      819              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

if err != nil {
return nil, nil, err
}
defaultRoles = *resp.JSON200.DefaultRoles
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit can we do it so we only set this once and after the first ListRolesWithResponse call, we turn includeDefaultRoles to false since we already have em

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually should we add a flag as to whether to include it or not,
seems kinda annoying to have it always show up if you only care about custom roles
im thinking --include-default-roles should even be default false 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call. done.

func newOrganizationRoleRootCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "role",
Aliases: []string{"te", "roles"},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's te 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

team 😂. I just changed it to ro thx

Copy link
Contributor

@vandyliu vandyliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the changes

after this is merged, can we get some qa testing on this @shri-astro @sreenusuuda
thank you :D

@aliotta aliotta merged commit 3846e49 into main Feb 20, 2024
5 checks passed
@aliotta aliotta deleted the addListOrgRolesCmd branch February 20, 2024 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants