Skip to content

refactor: remove atlassian K8s secret and sandbox env injection#45

Merged
robbycochran merged 6 commits into
mainfrom
rc-phase1-atlassian-simplification
Jun 7, 2026
Merged

refactor: remove atlassian K8s secret and sandbox env injection#45
robbycochran merged 6 commits into
mainfrom
rc-phase1-atlassian-simplification

Conversation

@robbycochran

@robbycochran robbycochran commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Completes Phase 1 of the provider simplification: removes the last parallel env injection path and fixes all pre-existing test failures across the full validation matrix.

What's removed:

  • ProviderEnvVars() and its call sites in up.go and create.go
  • Sandbox bool field on Input struct
  • ensureCreds() + openshell-atlassian K8s secret (creds.go, creds_test.go)
  • sandbox = true flags from providers.toml
  • openshell-atlassian from gateways/ocp/gateway.toml [secrets] (no longer created)

What stays (intentional interim):

  • BuildSandboxEnv() — keeps JIRA_URL/JIRA_USERNAME in sandbox.env until Phase 2 payload renderer ships
  • injectAtlassianEnv() — adds atlassian config vars from environment into cfg.Env before staging

Also fixed in this PR:

  • SANDBOX_IMAGE env var now respected by upLocal() (direct-mode gateways like kind) — was only read by upRemote()
  • Idempotent gateway registration on harness deploy: re-deploying to existing named gateway no longer fails with 'already exists'
  • sandbox exec rejects newline characters — collapsed multi-line curl in test_gws to single line
  • sandbox_wait() helper in test-flow.sh with fast-fail on ImagePullBackOff/CrashLoopBackOff
  • validate-kind / validate-ocp targets now use dev images (quay.io/rcochran/openshell) with pull secret pre-creation

Test plan

All targets pass clean:

Target Mode Result
validate-local ci 14/14
validate-local default 24/24
validate-kind-ci ci 10/10
validate-kind default 21/21
validate-ocp-ci ci 10/10
validate-ocp default 18/18

Generated with Claude Code

robbycochran and others added 6 commits June 7, 2026 11:01
Eliminates the parallel env injection path for atlassian non-secret
config (JIRA_URL, JIRA_USERNAME). These vars remain in sandbox.env
via BuildSandboxEnv() as a transition bridge until Phase 2 payload
renderer ships.

Removes:
- ProviderEnvVars() and its call sites in up.go and create.go
- sandbox = true flag on Input struct (now unused)
- ensureCreds() and the openshell-atlassian K8s secret it created
- cmd/creds.go and cmd/creds_test.go

providers.toml: JIRA_URL/JIRA_USERNAME inputs are no longer marked
sandbox = true since the Sandbox field is gone.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Add NO_PROVIDERS support to test_ocp so --ci mode works the same as
local and kind (skip provider registration, use ci profile). OCP ci
uses harness create instead of harness up to avoid auto-registration.

Add validate-ocp and validate-ocp-ci Makefile targets.

Remove openshell-atlassian from gateway.toml [secrets] — the K8s secret
is no longer created (removed in the atlassian simplification).

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…ars removal

Phase 1 removed ProviderEnvVars() which was adding JIRA_URL and JIRA_USERNAME
to cfg.Env at runtime. Without this, BuildSandboxEnv() / StageHarnessDir()
produced sandbox.env without those vars, breaking startup.sh in the atlassian
MCP server setup and causing sandboxes to fail to reach Ready.

Add injectAtlassianEnv() as the explicit interim path: reads JIRA_URL and
JIRA_USERNAME from the local environment and adds them to cfg.Env before
any staging or configmap creation. Remove when Phase 2 payload renderer ships.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…potent deploy

Three fixes for validate-kind/validate-ocp with dev images:

1. SANDBOX_IMAGE override in upLocal(): direct-mode sandbox creation
   was not reading SANDBOX_IMAGE env var, so the profile private image
   was always used. Add same override that upRemote already had.

2. Idempotent gateway registration: re-deploying to existing kind
   gateway failed with 'already exists'. Now removes by name before
   re-adding so deploy is idempotent.

3. validate-kind Makefile: pass SANDBOX_IMAGE and SANDBOX_PULL_SECRET
   so kind can pull from quay.io/rcochran. Pre-creates quay-pull
   secret in openshell namespace using local docker credentials.

Also adds sandbox_wait() helper with fast-fail on ImagePullBackOff.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… env leak

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…le line

openshell sandbox exec rejects command arguments containing newline or
carriage return characters (gRPC InvalidArgument). The test_gws Gmail API
curl was split across lines with backslash continuation inside single quotes,
which passes a literal newline to the sandbox exec API and fails.

Collapse the curl commands to single lines. Also remove leftover sleep 2
and diagnostic code added during investigation.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@robbycochran robbycochran merged commit 68420c9 into main Jun 7, 2026
6 checks passed
@robbycochran robbycochran deleted the rc-phase1-atlassian-simplification branch June 13, 2026 14:02
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.

1 participant