Use workhorse pattern for Orbit graph queries

Summary

Moves GKG bidirectional gRPC stream orchestration from Rails/Puma to Workhorse using the SendData/Injecter pattern. Puma workers drop from 500ms-8s blocking to two short calls (~10ms auth + ~50ms redaction).

  • New workhorse/internal/orbit/ Go package with gRPC client, SendData injecter, and Rails redaction callback
  • Gitlab::Workhorse.send_orbit_query builds the SendData header with JWT, GKG address, and query params
  • POST /api/v4/internal/orbit/redaction endpoint for Workhorse mid-stream authorization checks
  • Gated behind ORBIT_WORKHORSE_ENABLED env var for testing (will use knowledge_graph flag in final version)

Before: Rails handles everything

After: Workhorse handles gRPC stream

E2E tested on GDK VM

All 5 query types pass through Workhorse:

  • search, traversal, aggregation, path_finding, neighbors
Edited by Michael Angelo Rivera

Merge request reports

Loading
Loading