Trigger Orbit auto-index on settings update
What does this MR do and why?
Follow-up to !253942 (merged), based on the agreement in !253942 (comment 3815706910).
This MR enqueues Analytics::KnowledgeGraph::AutoIndexWorker when orbit_auto_index_root_namespace changes to true, so enrollment starts right after an admin saves the setting instead of waiting for the next cron tick. The cron is relaxed from every 5 minutes to hourly and becomes a safety net (direct table edits, missed triggers) and the enrollment path for newly created top-level groups. deduplicate :until_executed, if_deduplicated: :reschedule_once keeps the cron and the trigger to a single pending job.
References
Database
No database changes.
Screenshots or screen recordings
No UI changes.
How to set up and validate locally
- Enable Orbit (
knowledge_graph.enabledingitlab.yml, theorbitlicensed feature, and theknowledge_graph_infrafeature flag). - In the Rails console, flip the setting:
ApplicationSetting.current.update!(orbit_auto_index_root_namespace: true) - Confirm
Analytics::KnowledgeGraph::AutoIndexWorkerwas enqueued. Updating another setting, or changing this one back tofalse, should not enqueue it.
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.