Skip to content

fix/redis: set Redis endpoints on the code-intel workers - #1004

Merged
marcleblanc2 merged 3 commits into
mainfrom
syntactic-worker-redis-endpoints
Nov 13, 2026
Merged

marcleblanc2 merged 3 commits into
mainfrom
syntactic-worker-redis-endpoints

Conversation

@marcleblanc2

@marcleblanc2 marcleblanc2 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

precise-code-intel-worker and syntactic-code-intel-worker never got the chart's Redis settings, so they always connected to the default redis-store:6379. With external Redis that host doesn't exist. Both workers use Redis for a periodic lock around their queue metrics.

This adds the same sourcegraph.redisConnection env vars and checksum/redis annotation that frontend, gitserver, searcher, and worker already use.

If you set REDIS_*_ENDPOINT in preciseCodeIntel.env or syntacticCodeIntel.env as a workaround, remove it when upgrading.

Checklist

Test plan

  • helm unittest: the Redis connection tests now cover both workers, including existingSecret. They fail without the template changes.
  • helm template with external Redis secrets renders both env vars and the annotation on each worker.
  • On a live instance with external Redis, the precise worker logged lookup redis-store errors. After the env vars were added by hand to the syntactic worker, traces showed it taking its Redis lock. Not deployed from this branch.

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

@marcleblanc2 marcleblanc2 changed the title sourcegraph: set Redis endpoints on syntactic-code-intel-worker sourcegraph: set Redis endpoints on the code-intel workers Nov 11, 2026
@marcleblanc2 marcleblanc2 changed the title sourcegraph: set Redis endpoints on the code-intel workers fix/redis: set Redis endpoints on the code-intel workers Nov 11, 2026
@marcleblanc2
marcleblanc2 enabled auto-merge (squash) November 11, 2026 03:39
@marcleblanc2
marcleblanc2 requested a review from a team November 11, 2026 03:39
marcleblanc2 and others added 3 commits November 12, 2026 23:28
The syntactic-code-intel-worker Deployment did not set REDIS_CACHE_ENDPOINT
or REDIS_STORE_ENDPOINT, so it always fell back to its built-in default
redis-store:6379 and ignored redisCache.connection / redisStore.connection.
On instances with external Redis that host does not exist.

Use the sourcegraph.redisConnection helper and the sourcegraph.redisChecksum
pod annotation, matching frontend, gitserver, searcher, and worker.

Amp-Thread-ID: https://ampcode.com/threads/T-5e703d95-d3ee-4486-9b11-630a3ae8b3e2
Co-authored-by: Amp <amp@ampcode.com>
Checkov's CKV_SECRET_6 flagged external-redis-cache / external-redis-store
as high-entropy strings.

Amp-Thread-ID: https://ampcode.com/threads/T-5e703d95-d3ee-4486-9b11-630a3ae8b3e2
Co-authored-by: Amp <amp@ampcode.com>
Same gap as syntactic-code-intel-worker: the Deployment set no
REDIS_*_ENDPOINT, so the worker used redis-store:6379 regardless of
redisCache.connection / redisStore.connection. Its dbworker queue metrics
reporter takes a Redis lock, which failed on instances with external Redis.

Amp-Thread-ID: https://ampcode.com/threads/T-5e703d95-d3ee-4486-9b11-630a3ae8b3e2
Co-authored-by: Amp <amp@ampcode.com>
@marcleblanc2
marcleblanc2 force-pushed the syntactic-worker-redis-endpoints branch from 997bdf2 to a9252d5 Compare November 13, 2026 05:29
@marcleblanc2
marcleblanc2 merged commit 43ca654 into main Nov 13, 2026
6 checks passed
@marcleblanc2
marcleblanc2 deleted the syntactic-worker-redis-endpoints branch November 13, 2026 05:30
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.

3 participants