Skip to content

fix(codeapi-chart): support sandbox runner scale to zero#11

Merged
rschlaefli merged 1 commit into
mainfrom
codeapi-scale-zero-chart-fix
Jul 3, 2026
Merged

fix(codeapi-chart): support sandbox runner scale to zero#11
rschlaefli merged 1 commit into
mainfrom
codeapi-scale-zero-chart-fix

Conversation

@rschlaefli

@rschlaefli rschlaefli commented Jul 3, 2026

Copy link
Copy Markdown
Member

What This Fixes

This PR lets the service-worker start when codeapi-sandbox-runner is owned by an external autoscaler.

The chart already has workerSandbox.sandboxRunner.externalAutoscaler=true for KEDA-style ownership. With this PR, that existing setting also skips the service-worker init container that waits for a live sandbox runner. Default installs are unchanged.

Branch Coverage

  • Base: main
  • Head: 607e019
  • Reviewed: 1 commit, 1 file changed, 2 insertions.
  • Covered: conditional rendering of wait-for-sandbox-runner based on existing workerSandbox.sandboxRunner.externalAutoscaler.

Verification

Current head:

  • helm template codeapi helm/codeapi -n codeapi --set executionManifest.privateKey=dummy --set executionManifest.publicKey=dummy --show-only templates/worker-sandbox-deployment.yaml | rg "name: wait-for-" -> renders wait-for-redis and wait-for-sandbox-runner.
  • helm template codeapi helm/codeapi -n codeapi --set executionManifest.privateKey=dummy --set executionManifest.publicKey=dummy --set workerSandbox.sandboxRunner.externalAutoscaler=true --show-only templates/worker-sandbox-deployment.yaml | rg "name: wait-for-" -> renders wait-for-redis only.
  • git diff --check uzh/main...HEAD -> pass.

GitHub Actions:

  • API Unit Tests on 607e019 -> running after force-push.
  • Service Unit Tests on 607e019 -> running after force-push.

Earlier branch verification:

  • The previous head passed both GitHub Actions jobs before the simplification; current head is smaller and rerunning.

Security / Privacy

  • Review: chart-only deployment behavior change.
  • Result: no new images, secrets, RBAC, permissions, network paths, or runtime code.
  • Sensitive data: no secret values included.

Blocking Before Merge

  • GitHub Actions pass on 607e019.
  • Reviewer accepts using existing workerSandbox.sandboxRunner.externalAutoscaler as the scale-to-zero signal.

Follow-Up After Merge

  • Update df-cloud CodeAPI target revision to the merged commit.
  • Merge the helm-charts companion change that adds BullMQ active KEDA triggers.

@rschlaefli rschlaefli force-pushed the codeapi-scale-zero-chart-fix branch from dc1e56a to 607e019 Compare July 3, 2026 16:43
@rschlaefli rschlaefli marked this pull request as ready for review July 3, 2026 16:44
Copilot AI review requested due to automatic review settings July 3, 2026 16:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@rschlaefli rschlaefli merged commit 2665489 into main Jul 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants