Fix bug with label_name search filter
What does this MR do and why?
Related to #479987 (closed)
This MR fixes a bug found with global search for issues using the label_name
param.
The fix is to take into account what search level is being requested (this is known and sent down as an option). Labels are queried differently for each level:
- global - all labels are queried
- group -
group_id
is sent toLabelsFinder
- project -
project_id
(s) andgroup_id
(if provided) are sent toLabelsFinder
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
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
No filtering applied: http://gdk.test:3000/search?scope=issues&search=sed
Filtering applied: https://gdk.test:3000/search?scope=issues&search=sed&label_name%5B%5D=Afterpod
User | Before | After |
---|---|---|
admin | ![]() |
![]() |
non-admin | ![]() |
![]() |
anonymous | ![]() |
![]() |
How to set up and validate locally
- setup gdk for elasticsearch
- make sure you have issues with labels assigned to them
- perform a global issues search, manually add a label param to the URL
- ensure that the filtering applies to the result
- also test with non-admin and anonymous users
Merge request reports
Activity
assigned to @terrichu
added pipelinetier-1 label
Reviewer roulette
Category Reviewer Maintainer backend @imand3r
(UTC-7, 3 hours behind author)
@wandering_person
(UTC+8, 12 hours ahead of author)
Please refer to documentation page for guidance on how you can benefit from the Reviewer Roulette, or use the GitLab Review Workload Dashboard to find other available reviewers.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
Dangeradded groupglobal search label
changed milestone to %17.4
added devopsdata stores sectioncore platform labels
@sdungarwal would you mind an initial backend review?
requested review from @sdungarwal
- Resolved by Dmitry Gruzd
@tbulva would you mind a look at this (even though it's backend)? I want to make sure I didn't miss anything
requested review from @tbulva
- Resolved by Dmitry Gruzd
added backportskip label
applying label backportskip because the frontend is not consuming the backend param
label_name
yetadded pipeline:mr-approved label
removed review request for @tbulva
added pipelinetier-3 pipeline:run-e2e-omnibus-once labels and removed pipelinetier-1 label
Before you set this MR to auto-merge
This merge request will progress on pipeline tiers until it reaches the last tier: pipelinetier-3. We will trigger a new pipeline for each transition to a higher tier.
Before you set this MR to auto-merge, please check the following:
- You are the last maintainer of this merge request
- The latest pipeline for this merge request is pipelinetier-3 (You can find which tier it is in the pipeline name)
- This pipeline is recent enough (created in the last 8 hours)
If all the criteria above apply, please set auto-merge for this merge request.
See pipeline tiers and merging a merge request for more details.
E2E Test Result Summary
allure-report-publisher
generated test report!e2e-test-on-gdk:
test report for 88f2620cexpand test summary
+------------------------------------------------------------------+ | suites summary | +-------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +-------------+--------+--------+---------+-------+-------+--------+ | Create | 128 | 0 | 15 | 0 | 143 | ✅ | | Verify | 44 | 0 | 2 | 0 | 46 | ✅ | | Plan | 72 | 1 | 0 | 0 | 73 | ❌ | | Fulfillment | 2 | 0 | 0 | 0 | 2 | ✅ | | Govern | 71 | 0 | 0 | 0 | 71 | ✅ | | Data Stores | 31 | 0 | 1 | 0 | 32 | ✅ | | Package | 20 | 0 | 12 | 0 | 32 | ✅ | | Release | 5 | 0 | 0 | 0 | 5 | ✅ | | Manage | 1 | 0 | 1 | 0 | 2 | ✅ | | Monitor | 8 | 0 | 0 | 0 | 8 | ✅ | | Secure | 3 | 0 | 0 | 0 | 3 | ✅ | | Analytics | 2 | 0 | 0 | 0 | 2 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+ | Total | 387 | 1 | 31 | 0 | 419 | ❌ | +-------------+--------+--------+---------+-------+-------+--------+
e2e-package-and-test:
test report for 5d5a4957expand test summary
+---------------------------------------------------------------------+ | suites summary | +----------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +----------------+--------+--------+---------+-------+-------+--------+ | Manage | 28 | 0 | 17 | 1 | 45 | ✅ | | Systems | 7 | 0 | 0 | 0 | 7 | ✅ | | Package | 31 | 0 | 14 | 0 | 45 | ✅ | | Create | 417 | 0 | 51 | 0 | 468 | ✅ | | Govern | 107 | 0 | 6 | 0 | 113 | ✅ | | Plan | 82 | 0 | 9 | 0 | 91 | ✅ | | GitLab Metrics | 2 | 0 | 1 | 0 | 3 | ✅ | | Monitor | 12 | 0 | 13 | 0 | 25 | ✅ | | Fulfillment | 4 | 0 | 7 | 0 | 11 | ✅ | | Analytics | 3 | 0 | 0 | 0 | 3 | ✅ | | Verify | 51 | 0 | 15 | 0 | 66 | ✅ | | Configure | 1 | 0 | 3 | 0 | 4 | ✅ | | Release | 5 | 0 | 1 | 0 | 6 | ✅ | | Secure | 4 | 0 | 2 | 1 | 6 | ✅ | | Data Stores | 46 | 0 | 11 | 0 | 57 | ✅ | | Ai-powered | 1 | 0 | 2 | 0 | 3 | ✅ | | ModelOps | 0 | 0 | 1 | 0 | 1 | ➖ | | Growth | 0 | 0 | 2 | 0 | 2 | ➖ | +----------------+--------+--------+---------+-------+-------+--------+ | Total | 801 | 0 | 155 | 2 | 956 | ✅ | +----------------+--------+--------+---------+-------+-------+--------+
removed pipeline:run-e2e-omnibus-once label
- Resolved by Dmitry Gruzd
@terrichu the spec failures look related can you have a look ? Also the changes LGTM
but can we have specs for the 3 cases admin, non-admin and anonymous search cases ?Edited by Siddharth Dungarwal
requested review from @dgruzd and removed review request for @sdungarwal
requested review from @sdungarwal and removed review request for @dgruzd
removed review request for @sdungarwal
reset approvals from @tbulva by pushing to the branch
requested review from @sdungarwal
requested review from @dgruzd
removed review request for @sdungarwal
added workflowin review label
started a merge train
mentioned in commit 8dfec65b
added workflowstaging-canary label and removed workflowin review label
added workflowcanary label and removed workflowstaging-canary label
added workflowstaging label and removed workflowcanary label
added workflowproduction label and removed workflowstaging label
added releasedcandidate label
mentioned in merge request kubitus-project/kubitus-installer!3354 (merged)
added releasedpublished label and removed releasedcandidate label