Fix Flaky Offset and Limit for namespace_spec traversal_scope_examples
What does this MR do and why?
Fixes flaky examples that use .offset
and .limit
within traversal_scope_examples
as originally reported here:
By adding an .order
clause to order by a known value (ex: path
), we will guarantee the order of the query results so that the offset can be applied correctly and match the expected results.
How to set up and validate locally
- In your local GDK from the
gitlab
directory, runbin/rspec spec/models/namespace_spec.rb
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Merge request reports
Activity
changed milestone to %14.9
added devopsfoundations sectiondev test typemaintenance + 1 deleted label
assigned to @vburton
1 Message CHANGELOG missing: If you want to create a changelog entry for GitLab FOSS, add the
Changelog
trailer to the commit message you want to add to the changelog.If you want to create a changelog entry for GitLab EE, also add the
EE: true
trailer to your commit message.If this merge request doesn't need a CHANGELOG entry, feel free to ignore this message.
If needed, you can retry the
danger-review
job that generated this comment.Reviewer roulette
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer backend Roy Zwambag ( @rzwambag
) (UTC+1, 7 hours ahead of@vburton
)Mark Chao ( @lulalala
) (UTC+8, 14 hours ahead of@vburton
)To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
Generated by
Danger- Resolved by Douglas Barbosa Alexandre
@alexpooley Would you happen to have some time to review? I was not able to reproduce the flakiness locally, but my assumption for the cause is that since an order was not specified, there may be times where
group_2, group_1
could be returned- causing the offset to apply incorrectly and retrieveself_and_descendants
forgroup_1
instead. WDYT?
requested review from @alexpooley
added 1 commit
- 85bcc222 - Use traversal_ids instead of path for ordering
requested review from @dbalexandre
@alexpooley
, thanks for approving this merge request.This is the first time the merge request is approved. To ensure full test coverage, a new pipeline has been started.
For more info, please refer to the following links:
Thanks, @vburton! This LGTM
enabled an automatic merge when the pipeline for 5e5ea919 succeeds
mentioned in commit 5fd785d6
added workflowstaging-canary label
added workflowcanary label and removed workflowstaging-canary label
added workflowproduction label and removed workflowcanary label
added workflowstaging label and removed workflowproduction label
mentioned in issue #348973 (closed)
added releasedcandidate label
added releasedpublished label and removed releasedcandidate label
mentioned in issue #351210 (closed)
added devopsdata stores grouptenant scale sectioncore platform labels and removed devopsfoundations sectiondev + 1 deleted label