Repository navigation
fix: exit with error code when Rulekeeper index run gives up on lock - #2810
Draft
github-actions[bot] wants to merge 1 commit into
Draft
github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
…closes #2809 When an index run cannot acquire the database lock within 30 minutes, it previously exited with code 0 (success), causing Container Apps and the workflow to show green even though nothing was actually indexed. Now it exits with code 1 (failure), so the Container Apps execution ends Failed and the workflow shows red. This will ensure failure alerts fire for unintended lock timeouts, making manual re-embed operations more transparent to users watching results. The fix preserves the existing logging and allows the hourly runs to safely time out during long first-time indexes or re-embeds without making the alert noisy. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
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.
Summary
When an index run cannot acquire the database lock within 30 minutes, it previously exited with code 0 (success), causing Container Apps and the workflow to show green even though nothing was actually indexed. This is problematic when users manually trigger re-embeds and watch the results — they see a successful workflow when the index was never actually updated.
Changes
scripts/rules-chat/index-rules.mjsline 202 to setprocess.exitCode = 1when the lock times out (whensp_getapplockreturns -1)Impact
Related Issues
Closes #2809