Repository navigation
Let the files worker boot: make Redis optional in the management-key guard - #1526
Merged
Merged
Conversation
helpcodeai
enabled auto-merge (squash)
November 5, 2026 08:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Since the Cloud deploy of 11-04 19:08 UTC, the File Search worker (
amcp-cloud-files-worker) does not start. It has exited with code 1 more than 740 times:b26c477 (management API keys) put
JwtOrManagementKeyGuardon the settings controllers. The guard needsRedisServicefor its per-key rate limit. The worker importsSettingsModulebut notRedisModule, and Nest builds a controller's guards when it compiles the module, so the worker stops at boot. Since then no File Search sync has run, and "Test connection" on a file source fails ("files-worker /internal/test failed: fetch failed"). The blue/green deploy check only boots the backend, so the deploy passed anyway.Changes
RedisServiceis now@Optional()in the guard. Without Redis, the per-key rate limit falls open, which is what it already did when Redis is disconnected. Nothing changes in the backend, which loadsRedisModuleglobally.jwt-or-management-key.guard.boot.spec.ts: it compiles a module with a guarded controller and noRedisModule. Without the fix it fails with the same error as production.ee/.Type
Testing
packages/backend: the new spec fails without the fix (Nest can't resolve dependencies of the JwtOrManagementKeyGuard (PrismaService, ?)) and passes with it.npx jest src/auth src/settings: 38 suites pass.jwt-or-management-key.guard.spec.tsfails locally only because it needs a real database (prisma.$connect), which CI provides.eslinton the changed files is clean. Locally,tscreports only missing modules in my checkout (picomatchtypes,@aws-sdk/client-s3,basic-ftp,ssh2), none in the changed files. CI runs the full checks.Checklist
Related Issues
Found in the 2026-11-05 daily check: Cloud files-worker crash loop.
Deployment: on Cloud this lets
amcp-cloud-files-workerstart again. On self-hosted it fixes the same crash for anyone who runs thefilesCompose profile on a build that contains b26c477. The backend behaves the same in both.