Skip to content
Snippets Groups Projects

Fix bug with label_name search filter

Merged Terri Chu requested to merge tchu-fix-label_name-global-level into master
All threads resolved!

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 to LabelsFinder
  • project - project_id (s) and group_id (if provided) are sent to LabelsFinder

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

image

Filtering applied: https://gdk.test:3000/search?scope=issues&search=sed&label_name%5B%5D=Afterpod

User Before After
admin image image
non-admin image image
anonymous image image

How to set up and validate locally

  1. setup gdk for elasticsearch
  2. make sure you have issues with labels assigned to them
  3. perform a global issues search, manually add a label param to the URL
  1. ensure that the filtering applies to the result
  2. also test with non-admin and anonymous users
Edited by Terri Chu

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Author Maintainer

    applying label backportskip because the frontend is not consuming the backend param label_name yet

  • Tomas Bulva approved this merge request

    approved this merge request

  • Tomas Bulva removed review request for @tbulva

    removed review request for @tbulva

  • 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: :x: test report for 88f2620c

    expand 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: :white_check_mark: test report for 5d5a4957

    expand 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   | ✅     |
    +----------------+--------+--------+---------+-------+-------+--------+
  • Siddharth Dungarwal approved this merge request

    approved this merge request

  • Siddharth Dungarwal requested review from @dgruzd and removed review request for @sdungarwal

    requested review from @dgruzd and removed review request for @sdungarwal

  • Siddharth Dungarwal requested review from @sdungarwal and removed review request for @dgruzd

    requested review from @sdungarwal and removed review request for @dgruzd

  • Siddharth Dungarwal unapproved this merge request

    unapproved this merge request

  • Siddharth Dungarwal removed review request for @sdungarwal

    removed review request for @sdungarwal

  • Terri Chu added 1 commit

    added 1 commit

    • e20200d6 - Require search_scope for label filter

    Compare with previous version

  • Terri Chu reset approvals from @tbulva by pushing to the branch

    reset approvals from @tbulva by pushing to the branch

  • Terri Chu added 1 commit

    added 1 commit

    • 88f2620c - Require search_scope for label filter

    Compare with previous version

  • Terri Chu requested review from @sdungarwal

    requested review from @sdungarwal

  • Siddharth Dungarwal approved this merge request

    approved this merge request

  • requested review from @dgruzd

  • Siddharth Dungarwal removed review request for @sdungarwal

    removed review request for @sdungarwal

  • Dmitry Gruzd approved this merge request

    approved this merge request

  • Dmitry Gruzd resolved all threads

    resolved all threads

  • Dmitry Gruzd enabled automatic add to merge train when checks pass

    enabled automatic add to merge train when checks pass

  • merged

  • Dmitry Gruzd mentioned in commit 8dfec65b

    mentioned in commit 8dfec65b

  • added workflowstaging label and removed workflowcanary label

  • Please register or sign in to reply
    Loading