Terri Chu activity https://gitlab.com/terrichu 2026-03-19T01:02:35Z tag:gitlab.com,2026-03-19:5219962772 Terri Chu commented on merge request !227996 at GitLab.org / GitLab 2026-03-19T01:02:35Z terrichu Terri Chu [email protected]

@sylviashen would you mind a backend review?

tag:gitlab.com,2026-03-19:5219961025 Terri Chu commented on merge request !227996 at GitLab.org / GitLab 2026-03-19T01:01:28Z terrichu Terri Chu [email protected]

note (non-blocking): technically the mcp_server? check is first, so this test is actually testing that (even if ES and zoekt is not enabled)

tag:gitlab.com,2026-03-19:5219956426 Terri Chu commented on merge request !227996 at GitLab.org / GitLab 2026-03-19T00:58:08Z terrichu Terri Chu [email protected]

note (non-blocking): I combined these to make it easier to add future blob/code params. They only need to be added in the constant for validation and all of the search APIs immediately get validation (no changes required)

tag:gitlab.com,2026-03-19:5219954639 Terri Chu commented on merge request !227996 at GitLab.org / GitLab 2026-03-19T00:56:36Z terrichu Terri Chu [email protected]

note (non-blocking): I considered trying to combine these because there is a one to one grape middleware for each param. However, the middleware are not used across all search types equally (global, group, and project) and that falls outside of the scope of this issue

tag:gitlab.com,2026-03-19:5219952728 Terri Chu commented on merge request !227996 at GitLab.org / GitLab 2026-03-19T00:55:09Z terrichu Terri Chu [email protected]

@GitLabDuo this has been fixed in the last commit

tag:gitlab.com,2026-03-19:5219951327 Terri Chu pushed to project branch 583217-add-num-context-lines-to-search-api at GitLab.org / GitLab 2026-03-19T00:54:05Z terrichu Terri Chu [email protected]

Terri Chu (ca6225da) at 19 Mar 00:54

Add value constraints to num_context_lines API param

tag:gitlab.com,2026-03-19:5219923594 Terri Chu commented on merge request !227996 at GitLab.org / GitLab 2026-03-19T00:38:46Z terrichu Terri Chu [email protected]

@GitLabDuo these are auto generated

tag:gitlab.com,2026-03-19:5219877894 Terri Chu opened merge request !227996: Add num_context_lines param to search API for code search at GitLab.org / GitLab 2026-03-19T00:09:23Z terrichu Terri Chu [email protected]

What does this MR do and why?

Adds num_context_lines as an optional API parameter to the global, group, and project search endpoints. The parameter controls how many lines of context are returned around each match in blob search results. It is only available for advanced and exact code search (zoekt), consistent with how the parameter is already used internally.

As part of this MR, the three separate verify_ee_param_* methods for blob search params (regex, exclude_forks, num_context_lines) have been refactored into a single verify_ee_blob_search_params! method driven by a BLOB_SEARCH_PARAM_RULES constant, making it trivial to add new params in future.

References

Screenshots or screen recordings

N/A - API only change.

How to set up and validate locally

  1. Enable advanced search or exact code search (zoekt) in your GDK.
  2. Make a search API request with num_context_lines:
    curl --request GET \
      --header "PRIVATE-TOKEN: <your_access_token>" \
      "https://gdk.test:3443/api/v4/search?scope=blobs&search=monitors&num_context_lines=5"
  3. Verify the response includes more context lines around each match.
  4. Confirm that passing num_context_lines without advanced or exact code search returns a 400 error.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

tag:gitlab.com,2026-03-19:5219875930 Terri Chu closed merge request !227993: Add num_context_lines param to search API for code search at GitLab.org / GitLab 2026-03-19T00:08:22Z terrichu Terri Chu [email protected]

What does this MR do and why?

Adds num_context_lines as an optional API parameter to the global, group, and project search endpoints. The parameter controls how many lines of context are returned around each match in blob search results. It is only available for advanced and exact code search (zoekt), consistent with how the parameter is already used internally.

As part of this MR, the three separate verify_ee_param_* methods for blob search params (regex, exclude_forks, num_context_lines) have been refactored into a single verify_ee_blob_search_params! method driven by a BLOB_SEARCH_PARAM_RULES constant, making it trivial to add new params in future.

References

Screenshots or screen recordings

N/A - API only change.

How to set up and validate locally

  1. Enable advanced search or exact code search (zoekt) in your GDK.
  2. Make a search API request with num_context_lines:
    curl --request GET \
      --header "PRIVATE-TOKEN: <your_access_token>" \
      "https://gdk.test:3443/api/v4/search?scope=blobs&search=monitors&num_context_lines=5"
  3. Verify the response includes more context lines around each match.
  4. Confirm that passing num_context_lines without advanced or exact code search returns a 400 error.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

tag:gitlab.com,2026-03-19:5219869074 Terri Chu opened merge request !227993: Add num_context_lines param to search API for code search at GitLab.org / GitLab 2026-03-19T00:05:46Z terrichu Terri Chu [email protected]

What does this MR do and why?

Adds num_context_lines as an optional API parameter to the global, group, and project search endpoints. The parameter controls how many lines of context are returned around each match in blob search results. It is only available for advanced and exact code search (zoekt), consistent with how the parameter is already used internally.

As part of this MR, the three separate verify_ee_param_* methods for blob search params (regex, exclude_forks, num_context_lines) have been refactored into a single verify_ee_blob_search_params! method driven by a BLOB_SEARCH_PARAM_RULES constant, making it trivial to add new params in future.

References

Screenshots or screen recordings

N/A - API only change.

How to set up and validate locally

  1. Enable advanced search or exact code search (zoekt) in your GDK.
  2. Make a search API request with num_context_lines:
    curl --request GET \
      --header "PRIVATE-TOKEN: <your_access_token>" \
      "https://gdk.test:3443/api/v4/search?scope=blobs&search=monitors&num_context_lines=5"
  3. Verify the response includes more context lines around each match.
  4. Confirm that passing num_context_lines without advanced or exact code search returns a 400 error.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

tag:gitlab.com,2026-03-19:5219865414 Terri Chu closed merge request !227992: Add num_context_lines param to search API for code search at GitLab.org / GitLab 2026-03-19T00:03:48Z terrichu Terri Chu [email protected]

What does this MR do and why?

Adds num_context_lines as an optional API parameter to the global, group, and project search endpoints. The parameter controls how many lines of context are returned around each match in blob search results. It is only available for advanced and exact code search (zoekt), consistent with how the parameter is already used internally.

As part of this MR, the three separate verify_ee_param_* methods for blob search params (regex, exclude_forks, num_context_lines) have been refactored into a single verify_ee_blob_search_params! method driven by a BLOB_SEARCH_PARAM_RULES constant, making it trivial to add new params in future.

References

Screenshots or screen recordings

N/A - API only change.

How to set up and validate locally

  1. Enable advanced search or exact code search (zoekt) in your GDK.
  2. Make a search API request with num_context_lines:
    curl --request GET \
      --header "PRIVATE-TOKEN: <your_access_token>" \
      "https://gdk.test:3443/api/v4/search?scope=blobs&search=monitors&num_context_lines=5"
  3. Verify the response includes more context lines around each match.
  4. Confirm that passing num_context_lines without advanced or exact code search returns a 400 error.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

tag:gitlab.com,2026-03-19:5219852818 Terri Chu opened merge request !227992: Add num_context_lines param to search API for code search at GitLab.org / GitLab 2026-03-19T00:00:35Z terrichu Terri Chu [email protected]

What does this MR do and why?

Adds num_context_lines as an optional API parameter to the global, group, and project search endpoints. The parameter controls how many lines of context are returned around each match in blob search results. It is only available for advanced and exact code search (zoekt), consistent with how the parameter is already used internally.

As part of this MR, the three separate verify_ee_param_* methods for blob search params (regex, exclude_forks, num_context_lines) have been refactored into a single verify_ee_blob_search_params! method driven by a BLOB_SEARCH_PARAM_RULES constant, making it trivial to add new params in future.

References

Screenshots or screen recordings

N/A - API only change.

How to set up and validate locally

  1. Enable advanced search or exact code search (zoekt) in your GDK.
  2. Make a search API request with num_context_lines:
    curl --request GET \
      --header "PRIVATE-TOKEN: <your_access_token>" \
      "https://gdk.test:3443/api/v4/search?scope=blobs&search=monitors&num_context_lines=5"
  3. Verify the response includes more context lines around each match.
  4. Confirm that passing num_context_lines without advanced or exact code search returns a 400 error.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

tag:gitlab.com,2026-03-19:5219851893 Terri Chu pushed new project branch 583217-add-num-context-lines-to-search-api at GitLab.org / GitLab 2026-03-19T00:00:05Z terrichu Terri Chu [email protected]

Terri Chu (106898f1) at 19 Mar 00:00

Refactor blob search param verification into a single method

... and 1 more commit

tag:gitlab.com,2026-03-18:5219786033 Terri Chu commented on merge request !227007 at GitLab.org / GitLab 2026-03-18T23:18:24Z terrichu Terri Chu [email protected]

@tskorupa-gl sorry for the random ping, but I thought you might be able to help me understand why this spec doesn't include gitlab_main_cell_setting in the exempted tables?

tag:gitlab.com,2026-03-18:5219320761 Terri Chu commented on issue #269 at GitLab.org / search-team / Team Tasks 2026-03-18T20:08:02Z terrichu Terri Chu [email protected]

That's fine with me to keep it in. All the others, I'm ok to move out a milestone.

tag:gitlab.com,2026-03-18:5219304070 Terri Chu commented on merge request !227719 at GitLab.org / GitLab 2026-03-18T20:03:44Z terrichu Terri Chu [email protected]

@stefanosxan would you mind an initial review? This is a fix for at least one of the errors I'm seeing in sentry. I'm not sure how to reproduce it manually but testing is added. Can you send it to @rkumar555 or @maddievn for the backend maintainer ( they can also cover Advanced Search Framework )

tag:gitlab.com,2026-03-18:5219188825 Terri Chu commented on merge request !227804 at GitLab.org / GitLab 2026-03-18T19:25:31Z terrichu Terri Chu [email protected]

note (non-blocking): The failed tests were not related to these changes

tag:gitlab.com,2026-03-18:5219188352 Terri Chu commented on merge request !227804 at GitLab.org / GitLab 2026-03-18T19:25:21Z terrichu Terri Chu [email protected]

The ES tests did in fact run after adding the label. Maybe our rules need a tweak?