[fix][r2][SHI-458] Fix rr.gitServer.separate.enabled=true: blob storage env vars - #359
Conversation
…storage env vars and git v2 ingress routing SHI-458: retool.gitServer.commonEnv (blob storage vars) was only included in the embedded-git-server branch. Move it outside the if/else so RR_BLOB_STORAGE_PROVIDER / RR_DEFAULT_* are always rendered on the backend when gitServer is enabled, regardless of separate mode. SHI-459: Add /api/ai/rr/git/v2 path rule to both Ingress and HTTPRoute when rr.gitServer.separate.enabled=true, routing git v2 traffic to the git-server service before the catch-all backend rule. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
| Filename | Overview |
|---|---|
| charts/retool/templates/deployment_backend.yaml | Moves common git-server environment rendering outside the embedded-only branch while retaining separate-mode host and port configuration. |
| charts/retool/templates/httproute.yaml | Adds a correctly gated git-v2 PathPrefix rule targeting the separate git-server service, but without automated rendering coverage. |
| charts/retool/templates/ingress.yaml | Adds the git-v2 prefix to both Ingress host forms using the established Kubernetes-version branches, but leaves the new behavior untested. |
Reviews (1): Last reviewed commit: "[fix][SHI-458][SHI-459] Fix rr.gitServer..." | Re-trigger Greptile
| {{- if include "retool.gitServer.separateEnabled" $ }} | ||
| - path: /api/ai/rr/git/v2 | ||
| {{- if (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.Version) }} | ||
| pathType: Prefix | ||
| {{- end }} | ||
| backend: | ||
| {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.Version }} | ||
| service: | ||
| name: {{ template "retool.gitServer.name" $ }} | ||
| port: | ||
| number: {{ include "retool.gitServer.port" $ | int }} | ||
| {{- else }} | ||
| serviceName: {{ template "retool.gitServer.name" $ }} | ||
| servicePort: {{ include "retool.gitServer.port" $ | int }} | ||
| {{- end }} | ||
| {{- end }} |
There was a problem hiding this comment.
Add routing regression coverage
The new separate-git-server routes span both Ingress forms and HTTPRoute, but no automated rendering assertions verify their prefix, ordering, or backend target. Add template coverage for these forms so later chart changes do not silently restore the git-v2 404 behavior or emit an invalid backend reference.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…routing) The backend fix (PR #82965) proxies /api/ai/rr/git/v2/* internally when RR_GIT_SERVER_HOST is set, so ingress-level routing to the git-server service is not needed and would bypass backend middleware. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
Fixes a bug affecting self-hosted deployments using
rr.gitServer.separate.enabled=true.SHI-458 — Backend missing blob storage env vars (Linear)
retool.gitServer.commonEnv(which emitsRR_BLOB_STORAGE_PROVIDER/RR_DEFAULT_S3_*/RR_DEFAULT_GCS_*/RR_DEFAULT_AZURE_*) was gated inside theelsebranch of theseparateEnabledcheck indeployment_backend.yaml. When the git server was separate, onlyRR_GIT_SERVER_HOSTandRR_GIT_SERVER_PORTwere set on the backend — causing/api/ai/rr/snapshotsto fail withRequired environment variable RR_DEFAULT_S3_BUCKET is not set.Fix: Move
retool.gitServer.commonEnvoutside the if/else so it renders unconditionally whenevergitServer.enabled=true, in both embedded and separate modes.Test plan
helm templatewithrr.gitServer.separate.enabled=true+ S3 blob storage: verifyRR_GIT_SERVER_HOST,RR_GIT_SERVER_PORT, andRR_BLOB_STORAGE_PROVIDER/RR_DEFAULT_S3_*all appear on the backend deploymenthelm templatewithrr.gitServer.separate.enabled=false(embedded): verify noRR_GIT_SERVER_HOSTon backend, blob storage vars still renderrr.gitServer.separate.enabled=trueandrr.blobStorage.s3configured —/api/ai/rr/snapshotsreturns 201🤖 Generated with Claude Code