Fix feature categories in the Sidekiq routing rules example
What does this MR do?
The Sidekiq routing example sends feature_category=search jobs to a search queue.
No worker has that feature category, so the rule never matches and the queue gets no jobs.
Someone who copies the example to give search indexing its own pod gets a pod that stays idle, and the search jobs that are not CPU-bound run on the default pod.
This MR changes the rule to feature_category=global_search, which the search workers declare.
The queue name search stays as it is.
It also drops feature_category=memory from the memory rule.
No feature category is named memory, so the rule matched only on resource_boundary=memory, and that is now all it says.
flowchart TD
J["Job: Search::Elastic::MetricsUpdateCronWorker<br/>feature_category: global_search<br/>resource_boundary: unknown"] --> C["Rule 1<br/>resource_boundary=cpu"]
C -- "no match" --> P["Rule 2<br/>feature_category=pages"]
P -- "no match" --> S["Rule 3"]
S -- "feature_category=global_search<br/>(this MR): match" --> SP["search queue, search pod"]
S -- "feature_category=search<br/>(before): no match" --> M["Rule 4<br/>memory rule"]
M -- "no match" --> W["Rule 5<br/>*"]
W -- "match" --> DP["default queue, default pod"]Evidence
config/feature_categories.ymllistsglobal_search(line 93) and has neithersearchnormemory, atv19.5.3-ee.Search::Workersetsfeature_category :global_search(app/workers/concerns/search/worker.rb:8), andSearch::Elastic::CommitIndexerWorkerincludes it (ee/app/workers/search/elastic/commit_indexer_worker.rb:7).- The Advanced Search docs already route
feature_category=global_search(doc/integration/advanced_search/elasticsearch.md:1344). - On a self-managed GitLab 19.5.3 install (chart 10.5.4) with
cpu-boundary,search,memory-boundanddefaultSidekiq pods and the example's five rules:- As the example stands,
Search::Elastic::CommitIndexerWorkerand 65 otherglobal_searchworkers route todefault, and aSearch::Elastic::MetricsUpdateCronWorkerjob ran in the default pod and left the search pod idle. - With this MR's rules, those 66 workers route to
search, and a job of the same worker ran in the search pod. The 9 CPU-boundglobal_searchworkers route tocpu-boundarywith the old and the new rules, because Rule 1 matches first. - The same 24 workers route to
memory-boundwith the old and the new memory rule.
- As the example stands,
global_search also covers the Zoekt and active context workers.
With this rule in GitLab 19.5.3, all 33 Zoekt workers and 9 of the 14 active context workers move to the search pod.
The other 5 active context workers are CPU-bound and route to cpu-boundary.
Related issues
None.
Author's checklist
- Ensure the branch name starts with
docs-,docs/or ends with-docs, so only the docs-related CI jobs are included - Consider taking the GitLab Technical Writing Fundamentals course
- Follow the:
- Merge Request Title and Description are up to date, accurate, and descriptive
- MR targeting the appropriate branch
- MR has a green pipeline on GitLab.com
- When ready for review, MR is marked as ready (not a draft) and assigned to a reviewer
If you are only adding documentation, do not add any of the following labels:
~"feature"~"frontend"~"backend"~"bug"~"database"
These labels cause the MR to be added to code verification QA issues.
Review checklist
Documentation-related MRs should be reviewed by a Technical Writer for a non-blocking review, based on Documentation Guidelines and the Style Guide.
- As soon as you begin reviewing, select Start a review on your first comment so the MR shows Reviewer started review.
- If the content requires it, ensure the information is reviewed by a subject matter expert.
- Technical writer review items:
- Ensure docs metadata is present and up-to-date.
- Ensure the appropriate labels are added to this MR.
- If relevant to this MR, ensure content topic type principles are in use, including:
- The headings should be something you'd do a Google search for. Instead of
Default behavior, say something likeDefault behavior when you close an issue. - The headings (other than the page title) should be active. Instead of
Configuring GDK, say something likeConfigure GDK. - Any task steps should be written as a numbered list.
- If the content still needs to be edited for topic types, you can create a follow-up issue with the docs-technical-debt label.
- The headings should be something you'd do a Google search for. Instead of
- Review by assigned maintainer, who can always request/require the above reviews. Maintainer's review can occur before or after a technical writer review.
- Ensure a release milestone is set.
An AI coding assistant wrote this change. The assistant also checked each claim against the GitLab source files cited above, ran Vale and markdownlint on the changed page on a local checkout of the chart repository, and ran the search rule's routing, before and after, and the memory rule's routing on a self-managed GitLab 19.5.3 instance (chart 10.5.4) on a test VM.