Fix Group list > "updated" filter list not in order
What does this MR do and why?
As per #17017 (closed), our ordering is not working as expected, therefore we're fixing the problem of passing the params
to GroupDescendantsFinder
. Instead of using memoized group_descendants_params
method, we're using safe_params
instead, to preserve all params.
- uses
safe_params
- adds
sorting
specs - improve specs performance
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Specs Before
[TEST PROF INFO] Time spent in factories: 00:35.588 (61.63% of total time)
[TEST PROF INFO] Factories usage
Total: 563
Total top-level: 221
Total time: 00:35.588 (out of 01:08.058)
Total uniq factories: 7
total top-level total time time per call top-level time name
122 94 12.4050s 0.1017s 9.6876s group
122 0 0.6943s 0.0057s 0.0000s namespace_settings
122 0 0.5272s 0.0043s 0.0000s namespace_ci_cd_settings
98 28 4.9228s 0.0502s 1.5847s user
70 70 17.4840s 0.2498s 17.4840s project
28 28 6.8146s 0.2434s 6.8146s group_member
1 1 0.0174s 0.0174s 0.0174s license
Specs Now
[TEST PROF INFO] Time spent in factories: 00:08.772 (31.12% of total time)
[TEST PROF INFO] Factories usage
Total: 144
Total top-level: 57
Total time: 00:08.772 (out of 00:37.690)
Total uniq factories: 7
total top-level total time time per call top-level time name
31 30 3.2078s 0.1035s 3.1078s group
31 0 0.1671s 0.0054s 0.0000s namespace_settings
31 0 0.1303s 0.0042s 0.0000s namespace_ci_cd_settings
25 1 1.2209s 0.0488s 0.1932s user
24 24 5.1481s 0.2145s 5.1481s project
1 1 0.3128s 0.3128s 0.3128s group_member
1 1 0.0109s 0.0109s 0.0109s license
How to set up and validate locally
- Checkout the branch
- Visit one group that has subgroups/projects
- Verify that sorting is working as expected
🎉
Related to #17017 (closed)
Edited by Bojan Marjanovic