You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(ingestion): document and validate extractor timeout env - #21119
Make the Extractor's existing EXTRACTOR_CHAT_TIMEOUT setting discoverable in docker/.env and use the shared environment-variable constant. Reject seconds that overflow time.Duration: previously, 9223372037 wrapped into a negative timeout instead of falling back to the 180-second default.
Add common.EnvExtractorChatTimeout and use it in the Extractor and its tests.
Document integer seconds, the 180-second default, invalid-value fallback, and the scope: keywords, questions, summary, and metadata. The budget includes retries and backoff; tags use a separate timeout.
Parse seconds as a signed 64-bit integer and validate the representable duration range before conversion.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
Adds EXTRACTOR_CHAT_TIMEOUT as a shared environment variable. The extractor accepts positive integer seconds when the value fits in a time.Duration; otherwise, it uses the 180-second default. The environment documentation and timeout tests are updated.
Changes: Extractor LLM timeout
Layer / File(s)
Summary
Define and validate the timeout internal/common/environments.go, internal/ingestion/component/extractor.go, internal/ingestion/component/extractor_call_timeout_test.go, docker/.env
Adds the shared environment variable constant and validates positive integer seconds against duration overflow. Tests cover valid values, fallback cases, and use of the shared constant. The environment documentation describes the timeout scope, default, and fallback.
The configured timeout safely falls back for invalid or oversized values and covers the documented extraction operations. Tags use their separate timeout; no actionable merge risk remains.
Pre-merge checks: 5
Check name
Status
Explanation
Description check
The description includes the required Summary section and clearly explains the purpose, background, implementation, validation, and test results. Additional sections provide useful review context.
Title check
The title clearly and concisely describes the main changes: documenting and validating the extractor timeout environment variable.
Docstring Coverage
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 4 files.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit checks the timeout sign, And counts the seconds in a line. Too large, too small, or not quite right, Returns the default, calm and bright. The extractor hops along tonight.
Comment @coderabbitai help to get the list of available commands.
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
bugciContinue IntegrationgoPull requests that update go codeparsingsize:SThis PR changes 10-29 lines, ignoring generated files.
2 participants
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
Make the Extractor's existing
EXTRACTOR_CHAT_TIMEOUTsetting discoverable indocker/.envand use the shared environment-variable constant. Reject seconds that overflowtime.Duration: previously,9223372037wrapped into a negative timeout instead of falling back to the 180-second default.Related Issue
Follow-up to #21003. No linked issue.
Changes
common.EnvExtractorChatTimeoutand use it in the Extractor and its tests.Test Plan
bash build.sh --test ./internal/ingestion/component/passed, including the script's native unit tests.git diff --checkpassed.