fix(slack-ingestor): detect lookback_days config changes and trigger full re-ingestion#1035
Merged
sriaradhyula merged 1 commit intomainfrom Mar 24, 2026
Conversation
Contributor
|
✅ No proprietary content detected. This PR is clear for review! |
…full re-ingestion Signed-off-by: Kevin Kantesaria <kkantesaria@splunk.com>
Contributor
📊 Test Coverage ReportMain Tests Coverage
📁 Coverage Artifacts
|
d21a707 to
337e314
Compare
Contributor
|
✅ No proprietary content detected. This PR is clear for review! |
Contributor
📊 Test Coverage ReportMain Tests Coverage
📁 Coverage Artifacts
|
sriaradhyula
approved these changes
Mar 24, 2026
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.
Description
When
lookback_daysis changed in the Slack ingestor config (e.g., 7→14 or 14→7), the change had no effect because the ingestor always used the storedlast_tsfor incremental sync after the first run.This fix compares the stored
lookback_days(already saved in datasource metadata) against the current config value on each sync cycle. If they differ,last_tsis reset toNone, forcing a full re-fetch with the new lookback window. Documents are upserted (no destructive delete), so there is zero downtime during re-ingestion. For decreases (14→7), old documents outside the new window age out naturally viafresh_until.Changes:
slack/ingestor.py: Build astored_lookback_mapfrom existing datasource metadata and compare against current config before fetching. Resetlast_tson mismatch.tests/slack/test_lookback_days.py: 5 tests covering unchanged, increased, decreased, first sync, and legacy (no stored lookback_days) scenarios.Type of Change
Checklist