Skip to content

chore: remove UpsertCustomRole in favor of Insert + Update #14217

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

Merged
merged 12 commits into from
Aug 13, 2024

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented Aug 8, 2024

Upsert was causing some ui issues, it is better to make these an explicit create or an update.

This was request by @jaaydenh to make the UI experience more fluid. Essentially you do not want to mistakenly create a role. A create and update should be explicit.

Copy link

alwaysmeticulous bot commented Aug 8, 2024

🤖 Meticulous spotted visual differences in 35 of 1355 screens tested: view and approve differences detected.

Last updated for commit 2d81996. This comment will update as new commits are pushed.

@Emyrk Emyrk marked this pull request as ready for review August 8, 2024 18:29
@Emyrk Emyrk requested a review from f0ssel August 8, 2024 18:31
@Emyrk Emyrk force-pushed the stevenmasley/custom_role_remove_upsert branch from 28f3603 to 14da05a Compare August 9, 2024 11:27
@Emyrk
Copy link
Member Author

Emyrk commented Aug 9, 2024

@jaaydenh mentioned he needs to make a UI PR to migrate the UI to move away from upsert

Comment on lines +220 to +225
switch createNewRole {
case true:
updated, err = client.CreateOrganizationRole(ctx, customRole)
default:
updated, err = client.UpdateOrganizationRole(ctx, customRole)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This feels like a smell to me, my gut would say that we should just have a separate create cli command. If the UI needs to make the distinction, sounds like we should do the same for the CLI.

Copy link
Member Author

Choose a reason for hiding this comment

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

You are right @f0ssel. This PR is already quite big, and we are not launching this yet. Can I create an issue to split these out into 2 commands and do it in another PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

Totally 👍

@Emyrk Emyrk force-pushed the stevenmasley/custom_role_remove_upsert branch from 05f1814 to 2d81996 Compare August 13, 2024 17:12
@Emyrk Emyrk merged commit 84fdfd2 into main Aug 13, 2024
33 checks passed
@Emyrk Emyrk deleted the stevenmasley/custom_role_remove_upsert branch August 13, 2024 17:53
@github-actions github-actions bot locked and limited conversation to collaborators Aug 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants