Organization-level runner controller scoping — project-level
Overview
Implement the full vertical slice for project-level scoping. A controller with this scope applies only to jobs in the specified project.
Database Schema
org_ci_runner_controller_scopings_project
| Column | Type | Notes |
|---|---|---|
id |
bigint | Primary key |
runner_controller_id |
bigint | FK → org_ci_runner_controllers
|
project_id |
bigint | FK → projects
|
organization_id |
bigint | Sharding key |
-
gitlab_schema=gitlab_ci(sharding key:organization_id)
External REST API
Implement REST API endpoints for creating, listing, and deleting this scoping type.
Note: The exact API path structure is TBD — to be decided as part of implementation.
Requirements:
- Service layer with invariant validation
- Authorization checks
- API documentation
Internal REST API (Job Router)
Update the Job Router internal API to query project-level scopings. When a job is dequeued, check if any org-level controllers are scoped to the specific project the job belongs to.
Audit Events
- Project-level scoping created
- Project-level scoping deleted
PDI Events
-
Internal Event:
org_runner_controller_project_scoping_created -
Internal Event:
org_runner_controller_project_scoping_deleted
Acceptance Criteria
-
Database migration and model with FK to
projects - External REST API endpoints with authorization
- Internal API updated for Job Router evaluation
- Audit events implemented
- PDI events implemented
- API documentation updated
Related
Edited by 🤖 GitLab Bot 🤖