Repository navigation
fix: give the pre-upgrade index check AI_QUEUE_WORKER_ENABLED when the AI worker is on [ENG-2181] - #76
Merged
Conversation
…e AI worker is on [ENG-2181] The app declares the AI collections' MongoDB indexes only with AI_QUEUE_WORKER_ENABLED set. The chart set it on the scheduler but not on the pre-upgrade index Job, so with aiQueueWorker.enabled the check's estimate and its build mode left those indexes out. The flag now comes from one helper, currents.indexDeclarationEnv, used by both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Owner: @twk3
Linear: ENG-2181
The app declares the MongoDB indexes on
aiSessions,aiSessionMessagesandaiSlackCallbacks(including the TTLs that expire AI sessions) only whenAI_QUEUE_WORKER_ENABLED=true. #74 set the variable on the scheduler whenaiQueueWorker.enabledis on, inline in its template. #72's pre-upgrade index Job runs the samemigrateCLI and never got it. So with the AI worker on:gateestimate leaves out the AI indexes, so a release that adds one to a largeaiSessionMessageswould pass the check unestimated;buildmode doesn't build them, and the scheduler builds them at startup instead.Changes
currents.indexDeclarationEnvin_common.tpl: rendersAI_QUEUE_WORKER_ENABLED=truewhenaiQueueWorker.enabledis on, and nothing otherwise.Checked
helm lintwithci/lint-values.yamlpasses.helm templateagainstmain, withaiQueueWorker.enabledfalse and true: identical when false. When true, the only differences are the variable on the Job and the moved comment on the scheduler.aiSessionsexpiresAt_1index dropped:main's hook had noAI_QUEUE_WORKER_ENABLEDand logged "No index builds pending.";migrate index-planin the scheduler pod listedaiSessionsexpiresAt_1as pending with the variable, and left the AI collections out without it.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.