Skip to content

Commit cb76a49

Browse files
quay-develclaude
andcommitted
feat: add custom runner image support to ProjectSettings
Allow workspace admins to configure a custom runner container image per project, with registry allowlist validation, pull secret support, and feature flag gating across all layers. Image selection precedence: ProjectSettings > agent registry > operator default. Includes API input validation, gRPC presenter fields, frontend settings UI with port/adapter pattern, conformance test suite, and comprehensive imageref unit tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent bcb3623 commit cb76a49

53 files changed

Lines changed: 1706 additions & 246 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/components-build-deploy.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,15 @@ jobs:
121121
username: ${{ secrets.REDHAT_USERNAME }}
122122
password: ${{ secrets.REDHAT_PASSWORD }}
123123

124+
- name: Read runner contract version
125+
id: runner-version
126+
run: |
127+
if [ -f components/runners/ambient-runner/VERSION ]; then
128+
echo "version=$(cat components/runners/ambient-runner/VERSION | tr -d '[:space:]')" >> "$GITHUB_OUTPUT"
129+
else
130+
echo "version=0.0.0" >> "$GITHUB_OUTPUT"
131+
fi
132+
124133
- name: Build and push ${{ matrix.component.name }} (${{ matrix.arch.suffix }})
125134
if: github.event_name != 'pull_request'
126135
uses: docker/build-push-action@v7
@@ -133,6 +142,7 @@ jobs:
133142
build-args: |
134143
AMBIENT_VERSION=${{ github.sha }}
135144
GIT_COMMIT=${{ github.sha }}
145+
RUNNER_CONTRACT_VERSION=${{ steps.runner-version.outputs.version }}
136146
cache-from: type=gha,scope=${{ matrix.component.name }}-${{ matrix.arch.suffix }}
137147
cache-to: type=gha,mode=max,scope=${{ matrix.component.name }}-${{ matrix.arch.suffix }}
138148

@@ -148,6 +158,7 @@ jobs:
148158
build-args: |
149159
AMBIENT_VERSION=${{ github.sha }}
150160
GIT_COMMIT=${{ github.sha }}
161+
RUNNER_CONTRACT_VERSION=${{ steps.runner-version.outputs.version }}
151162
cache-from: type=gha,scope=${{ matrix.component.name }}-${{ matrix.arch.suffix }}
152163
cache-to: type=gha,mode=max,scope=${{ matrix.component.name }}-${{ matrix.arch.suffix }}
153164

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@ build-runner: ## Build Claude Code runner image
194194
-t $(RUNNER_IMAGE) .
195195
@echo "$(COLOR_GREEN)$(COLOR_RESET) Runner built: $(RUNNER_IMAGE)"
196196

197+
test-runner-conformance: ## Run conformance tests against runner image
198+
@echo "$(COLOR_BLUE)$(COLOR_RESET) Running runner conformance tests against $(RUNNER_IMAGE)..."
199+
@bash components/runners/conformance/run-conformance.sh $(RUNNER_IMAGE)
200+
197201
build-state-sync: ## Build state-sync image for S3 persistence
198202
@echo "$(COLOR_BLUE)$(COLOR_RESET) Building state-sync with $(CONTAINER_ENGINE)..."
199203
@cd components/runners/state-sync && $(CONTAINER_ENGINE) build $(PLATFORM_FLAG) $(BUILD_FLAGS) \

components/ambient-api-server/openapi/openapi.projectSettings.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,10 @@ components:
221221
type: string
222222
repositories:
223223
type: string
224+
runner_image:
225+
type: string
226+
runner_image_pull_secret:
227+
type: string
224228
created_at:
225229
type: string
226230
format: date-time
@@ -245,6 +249,10 @@ components:
245249
type: string
246250
repositories:
247251
type: string
252+
runner_image:
253+
type: string
254+
runner_image_pull_secret:
255+
type: string
248256
parameters:
249257
id:
250258
name: id

components/ambient-api-server/pkg/api/grpc/ambient/v1/inbox_grpc.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/ambient-api-server/pkg/api/grpc/ambient/v1/project_settings.pb.go

Lines changed: 88 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/ambient-api-server/pkg/api/grpc/ambient/v1/project_settings_grpc.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/ambient-api-server/pkg/api/grpc/ambient/v1/projects.pb.go

Lines changed: 26 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/ambient-api-server/pkg/api/grpc/ambient/v1/projects_grpc.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/ambient-api-server/pkg/api/grpc/ambient/v1/sessions_grpc.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/ambient-api-server/pkg/api/grpc/ambient/v1/users_grpc.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)