Loading
Return 404 from Orbit skills routes when GKG is not configured
What does this MR do and why?
The Orbit skills routes (GET /orbit/skills, /orbit/skills/:name, /orbit/skills/:name/*path) now return 404 Skills are not available when the knowledge graph service isn't configured on the instance. The check runs before the gRPC call, so we no longer try to reach a service that isn't there.
This is the same response clients already get from an older service without skill RPCs. The routes stay entitlement-free: no check on the Orbit killswitch or feature flag.
References
Related to gitlab-org/orbit/knowledge-graph#1353 (closed)
How to set up and validate locally
Set orbit.enabled: false and call GET /api/v4/orbit/skills with a read_api token. Expect 404 with Skills are not available.
Agent context
- Added
require_skills_available!helper inee/lib/api/orbit/data.rb, called first in each of the three skill routes (before rate limiting and gRPC). - Existing specs that stubbed
knowledge_graph.enabled: falseand expected 200 now stub it as enabled; added a spec covering all three routes when unconfigured. - Ran
data_skills_spec.rb(70 examples, all passing after the message fix), rubocop, markdownlint.
Edited by Dmitry Gruzd