Skip to content

[feat] Add codeExecutor.enabled to decouple code-executor from workflows - #419

Merged
jmhwang7 merged 5 commits into
mainfrom
claude/executor-services-setup-04e85a
Nov 5, 2026
Merged

jmhwang7 merged 5 commits into
mainfrom
claude/executor-services-setup-04e85a

Conversation

@jmhwang7

@jmhwang7 jmhwang7 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

What

Adds a top-level codeExecutor.enabled flag so the code-executor service can be deployed (or disabled) independently of workflows.

Until now, code-executor rendering was gated solely on workflows.enabled, so the service could only run as part of the workflows stack. The code executor is actually a standalone sandbox service — workflows need it, but it also serves other use cases (e.g. custom auth and firebase raw mode).

Semantics

codeExecutor.enabled mirrors the existing rr.* component switches:

value behavior
null (default) inherit workflows.enabled — back-compat: existing installs that only toggle workflows.enabled are unaffected
true deploy the code executor regardless of workflows
false never deploy the code executor
non-bool fail loudly

Changes

  • retool.codeExecutor.enabled helper (_helpers.tpl) with null-inherit semantics; gates deployment_code_executor.yaml and configmap_code_executor.yaml.
  • Backend env split (deployment_backend.yaml): CODE_EXECUTOR_INGRESS_DOMAIN now follows codeExecutor.enabled so the backend knows the executor's address even with workflows off; WORKFLOW_BACKEND_HOST stays on workflows.enabled.
  • AppArmor installer (retool.appArmorNsjailInstaller.enabled): the code-executor branch now gates on codeExecutor.enabled, so the shared nsjail DaemonSet still renders for a standalone code executor.
  • retool.codeExecutor.validateEnabled guard: fails the render when workflows.enabled: true + codeExecutor.enabled: false, which would ship a workflows stack with no executor.
  • values.yaml: codeExecutor.enabled: null documented at the top of the codeExecutor block.
  • CI test ci/test-code-executor-enabled-option.yaml: exercises the standalone path (workflows off + code-executor on, with seccomp/AppArmor/PDB branches).
  • Chart version bumped to 6.13.6.

Reviewer notes

  • Default behavior is unchanged: with enabled: null, the helper returns exactly what retool.workflows.enabled returns, at every call site.
  • Verified with helm template across: workflows-on/null, workflows-off/null (not rendered), workflows-off/true (rendered, CODE_EXECUTOR_INGRESS_DOMAIN only), workflows-on/false (loud fail), and non-bool (loud fail). helm lint is clean aside from the pre-existing PDB document-separator false-positive that the existing js-executor test also produces.

🤖 Generated with Claude Code

@greptile-apps

greptile-apps Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with no new actionable issues found.

Reviews (3) · Last reviewed commit: "Address review comments: trim comments a..." · Reviewed by Greptile

@jmhwang7 jmhwang7 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Re: Greptile's "Missing executor still passes" finding on ci/test-code-executor-enabled-option.yaml —

Good catch, addressed in 9c4db99. The kubeconform fixture is schema-only, so I added .github/test_code_executor.py (a unittest suite wired into the lint-chart CI job, matching the existing test_mcp_*.py tests) with behavioral assertions:

  • test_standalone_renders_with_workflows_off: with workflows off + codeExecutor.enabled=true, asserts the code-executor Deployment and ConfigMap render, CODE_EXECUTOR_INGRESS_DOMAIN is present in the backend env, and the workflow workloads (deployment_workflows.yaml) + WORKFLOW_BACKEND_HOST are absent — so restoring the old workflows-only gate would fail this test.
  • Plus coverage for enabled: null inheriting workflows.enabled both ways, explicit-false disabling, the workflows-on + false loud failure, non-bool rejection, and the AppArmor installer still rendering for a standalone executor.

Comment thread charts/retool/templates/_helpers.tpl Resolved
Comment thread charts/retool/templates/_helpers.tpl Resolved
@jmhwang7
jmhwang7 marked this pull request as ready for review November 5, 2026 19:25
@jmhwang7
jmhwang7 marked this pull request as draft November 5, 2026 19:25

@jmhwang7 jmhwang7 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

add comments

@jmhwang7
jmhwang7 marked this pull request as ready for review November 5, 2026 20:16
Comment thread charts/retool/templates/_helpers.tpl Resolved
jmhwang7 and others added 4 commits November 5, 2026 12:18
The code executor is a standalone sandbox service, but until now its
rendering was welded to workflows.enabled, so it could only run as part of
the workflows stack. Add a top-level codeExecutor.enabled flag, co-located
with the rest of the codeExecutor config, so the service can be deployed on
its own (e.g. for custom auth and firebase raw mode) or turned off
independently.

Semantics mirror the rr component switches:
- null (default) -> inherit workflows.enabled (back-compat: existing installs
  that only toggle workflows.enabled are unaffected)
- true/false     -> override
- non-bool       -> fail loudly

Also:
- Split the backend env block so CODE_EXECUTOR_INGRESS_DOMAIN follows the new
  flag (the backend learns the executor's address even with workflows off),
  while WORKFLOW_BACKEND_HOST stays on workflows.enabled.
- Gate the shared nsjail AppArmor installer's code-executor branch on
  codeExecutor.enabled so it still renders for a standalone code executor.
- Add retool.codeExecutor.validateEnabled: fail when workflows are enabled but
  codeExecutor.enabled is false, which would ship a broken workflows stack.
- Add ci/test-code-executor-enabled-option.yaml exercising the standalone path.
- Bump chart version to 6.13.6.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Addresses Greptile review: the ci/ option fixture is only schema-validated by
kubeconform, so a regression that re-couples code-executor rendering to
workflows.enabled would drop the executor while the fixture still passes.

Add .github/test_code_executor.py (run in the lint-chart CI job, like the
existing MCP tests) asserting the actual behavior:
- standalone executor (workflows off + codeExecutor.enabled=true) renders the
  Deployment + ConfigMap, wires CODE_EXECUTOR_INGRESS_DOMAIN into the backend,
  and leaves the workflow workloads / WORKFLOW_BACKEND_HOST absent
- enabled: null inherits workflows.enabled both ways (back-compat)
- explicit false disables; workflows-on + false fails loudly; non-bool fails
- the AppArmor installer still renders for a standalone executor

Bump chart version to 6.13.7 (6.13.6 was released).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Drop the unnecessary "(e.g. ...)" parenthetical from the
  retool.codeExecutor.enabled helper doc comment.
- Restore the "legacy" descriptor on code-executor in the AppArmor installer
  helper comment.
- Trim ci/test-code-executor-enabled-option.yaml to the minimal case
  (workflows off + codeExecutor enabled + seccomp + AppArmor installer);
  behavioral assertions live in .github/test_code_executor.py.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jmhwang7
jmhwang7 force-pushed the claude/executor-services-setup-04e85a branch from aa44d5e to 6658c98 Compare November 5, 2026 20:19
The values-yaml-synced CI check requires values.yaml and
charts/retool/values.yaml to be byte-identical.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jmhwang7
jmhwang7 merged commit 7502e7c into main Nov 5, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants