Skip to content

Conversation

david-crespo
Copy link
Collaborator

@david-crespo david-crespo commented Oct 18, 2022

Closes #1221
Closes #1235

  • Fix bug due to lack of prefetch. Groups names were popping in late, and we were sorting by name, so the sort order was different before and after the group names showed up.
  • Sort groups before users, then sort by name within those
  • Tests for groups on IAM pages

@vercel
Copy link

vercel bot commented Oct 18, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
console-ui-storybook ✅ Ready (Inspect) Visit Preview Oct 19, 2022 at 8:45PM (UTC)

@david-crespo david-crespo changed the title Fix IAM sort bug Sort IAM role assignments with groups first, then by name Oct 18, 2022
apiQueryClient.prefetchQuery('policyView', {}),
// used to resolve user names
apiQueryClient.prefetchQuery('userList', {}),
apiQueryClient.prefetchQuery('groupList', {}),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is exactly the kind of bug I was concerned about in #1232

Copy link
Contributor

Choose a reason for hiding this comment

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

tricky, tricky

apiQueryClient.prefetchQuery('projectPolicyView', { orgName, projectName }),
// used to resolve user names
apiQueryClient.prefetchQuery('userList', {}),
apiQueryClient.prefetchQuery('groupList', {}),
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this very much re-enforces the fact that this should only be a short term impl.

@david-crespo
Copy link
Collaborator Author

The Omicron commit I upgraded to is not merged yet, it's the latest commit on oxidecomputer/omicron#1830. Even if that PR changes further, the API spec probably won't. In any case I will wait until that's merged, then update this to point to omicron main, then merge.

# Conflicts:
#	libs/api/__generated__/Api.ts
#	libs/api/__generated__/msw-handlers.ts
#	libs/api/__generated__/validate.ts
@david-crespo david-crespo enabled auto-merge (squash) October 19, 2022 20:45
@david-crespo david-crespo merged commit d039472 into main Oct 19, 2022
@david-crespo david-crespo deleted the fix-iam-sort-bug branch October 19, 2022 20:48
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.

IAM table sort changes soon after initial render Test group handling logic in IAM table

2 participants