elastic / elastic/connectors

Slack connector does not sync expected messages

Open
#2,131 1 comment 0 reactions 0 assignees View on GitHub
bug slack
Dominant language
Python
Stars
133
Forks
205
Avg merge
16h 3m
Merged PRs (30d)
102

Description

## Bug Description

When I configure the Slack connector to fetch `1` day of message history for a channel that has several messages posted in the last 24h, it finds no messages and creates no docs representing those messages (apart from one doc representing the channel in question).

When I reconfigure the connector to fetch `2` days of message history, it does then find messages posted to the channel in the last 24h. It seems like there might be a bug here.

First sync (`1` day):
```
[FMWK][15:15:26][INFO] [Connector id: REDACATED, index name: search-slack1, Sync job id: REDACATED] Fetching messages between 2024-02-06 23:15:18.246105 and 2024-02-07 23:15:18.246105 from channel: 'REDACTED'
[FMWK][15:16:08][INFO] [Connector id: REDACATED, index name: search-slack1, Sync job id: REDACATED] Sync ended with status completed -- created: 1 | updated: 0 | deleted: 0 (took 62 seconds)
```

Second sync (`2` days):

```
[FMWK][15:18:27][INFO] [Connector id: REDACATED, index name: search-slack1, Sync job id: REDACATED] Fetching messages between 2024-02-05 23:18:19.743619 and 2024-02-07 23:18:19.743619 from channel: 'REDACTED'
[FMWK][15:18:29][INFO] [Connector id: REDACATED, index name: search-slack1, Sync job id: REDACATED] Sync progress -- created: 99 | updated: 1 | deleted: 0

[FMWK][15:20:14][INFO] [Connector id: REDACATED, index name: search-slack1, Sync job id: REDACATED] Sync ended with status completed -- created: 126 | updated: 1 | deleted: 0 (took 126 seconds)
```

### To Reproduce
Steps to reproduce the behavior:

(see above)

## Expected behavior

Messages from the last 24h are synced when we specify `1` day of message history to sync.

## Environment

I'm using the latest connectors (`038e4724d9c1471c8df893a4f595c0da6e07fc4c`) with Elasticsearch 8.11.1.

Contributor guide

Open the contributing guide

Research direction

No source files or tests are named. Start by reproducing the Slack connector sync with 1-day and 2-day history windows, then trace the message time-range handling; done means messages from the last 24 hours are synced when 1 day is configured.

Written by the indexing model from the issue text.

Assessment

Tech stack
elasticsearch, python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.