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

Extend DatasetResourceProvider to create hierarchical groups with many subgroups #471

Closed
Tracked by #22261
eatikrh opened this issue Aug 8, 2023 · 2 comments · Fixed by #472
Closed
Tracked by #22261

Extend DatasetResourceProvider to create hierarchical groups with many subgroups #471

eatikrh opened this issue Aug 8, 2023 · 2 comments · Fixed by #472
Assignees

Comments

@eatikrh
Copy link
Contributor

eatikrh commented Aug 8, 2023

Description

We have observed some performance issues with Admin Console groups where there are many subgroups: Paging through the subgroups has some issues while paging through top level groups were fine. This may be related to the fact that DatasetResourceProvider only created top level groups and this case is well tested.

Discussion

No response

Motivation

We would like to be able create hierarchical group structures to help us test with various scenarios with Admin Console/Groups navigation and search.

Details

The paging of the subgroups issue has mostly been addressed by #21520 We still would like to have a way to create data that will help testing performance of partial searches on group names and their UI components. A similar issue exists with Admin Console/Identity Providers but this issue is to address only the groups.

We are proposing to extend the DatasetResourceProvider with an extra boolean parameter in " createGroups" method. This boolean parameter could be called "hiearchicalGroups" and would have a default value of false to ensure backward compatibility. If "hiearchicalGroups" is "true" than the first group created would the be parent group of the rest of the groups created. This would mimic the one case that lead to performance issues in our experience. Alternatively, we can also define a depth parameter of which value would denote the first number of groups to be direct subgroup of the prior group, and the remaining groups being the leaf subgroups of the "depth"th group. The "depth" would have a default value of "1" meaning that createGroups method would create only on parent group; if the "hiearchicalGroups" is false then the "depth" parameter would not be operative.

@mposolda
Copy link
Contributor

mposolda commented Aug 8, 2023

I vote for depth approach to allow creating groups at multiple levels. Not just limit to 2 levels. So something like:

/**
  * If countGroupsAtEachLevel is 1000 and depth is 1, then this creates 1000 top levels groups without any subgroups
  * If countGroupsAtEachLevel is 10 and depth is 3, then this creates 10 top level groups, each having 10 subgroups (level 2) and each of them having another 10 subgroups (level 3). So 1000 groups in total
  */ 
createGroups(int countGroupsAtEachLevel, int depth) {
   // Backwards compatibility
   if (depth == null) depth = 1;
  // Implementation here...
}

@eatikrh
Copy link
Contributor Author

eatikrh commented Aug 8, 2023

This sounds good!

ahus1 added a commit that referenced this issue Aug 16, 2023
Closes #471

Co-authored-by: Alexander Schwartz <aschwart@redhat.com>
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 a pull request may close this issue.

2 participants