Closed linonymous closed 11 months ago
Thank you for reporting this issue @linonymous . The current release (0.2.42) uses the new endpoint conversations.history
(https://github.com/chaoss/grimoirelab-perceval/pull/657). You should create a slack app and use its user token.
However, the upcoming release 0.2.43 will revert back this change to use the old endpoints. This is due to the fact that the endpoint https://api.slack.com/methods/conversations.history
doesn't behave as the old https://api.slack.com/methods/channels.history
, in particular all messages of type reply
are not returned anymore (check https://github.com/chaoss/grimoirelab-perceval/pull/677 for further details).
We started a conversation with the Slack folks, they acknowledged the limitation with the new endpoint and said that they will evaluate the possibility to implement the old behavior (e.g., an endpoint were all type of messages are returned in a incremental way).
Which slack endpoint is used by the master branch? Because we're using master branches from the following repos:
@valeriocos Thanks for the quick response! One more question, How to configure specific version of perceval backend with grimoire elk?
Which slack endpoint is used by the master branch?
channels.history (ref https://github.com/chaoss/grimoirelab-perceval/commit/fb075a88ce495e65a1e87462f9dd7e662300ddad), @lukaszgryglicki . You shouldn't have any problem since (old) legacy tokens will keep working (https://api.slack.com/legacy/custom-integrations/legacy-tokens). The problem appears when you need to track the data of a new slack instance (as reported by @linonymous).
.., How to configure specific version of perceval backend with grimoire elk?
You're welcome @linonymous! There is no specific support for this and the Perceval pypi package isn't up-to-date. I guess (I have never tried this before) you can:
Thanks for the approach @valeriocos. Seems like slack has provided a separate API for replies. https://api.slack.com/methods/conversations.replies so are we going to implement this new API or slack is going to return to their old behavior anytime soon?
The https://api.slack.com/methods/conversations.replies isn't that good for GrimoireLab since:
ts
) of the parent message to get the replies and A solution could be to iterate over all messages we have in ElasticSearch and constantly get their replies, however this would make the process inefficient.
On the other hand, Slack provides the https://api.slack.com/events-api which allows to get all messages that occurr on a channel in real time. The main limitations here are that:
are we going to implement this new API or slack is going to return to their old behavior anytime soon?
ATM the decision is to use the old endpoints and wait for Slack's feedback. As commented at https://github.com/chaoss/grimoirelab-elk/issues/918#issuecomment-660928175, Slack folks are aware of this limitation, however I ignore how feature requests and corresponding ETAs are handled by them. Said that, it seems that the lack of replies in the conversations.history is a problem reported by others too (https://www.bakejam.com/slacks-conversationshistory-api-ignores-replies/).
If you find it convenient, you can interact with the Slack support and try to gather more information about this limitation and ETA (https://slack.com/intl/en-es/help).
Hope this helps!
This was changed at https://github.com/chaoss/grimoirelab-perceval/commit/fb075a88ce495e65a1e87462f9dd7e662300ddad and reverted at https://github.com/chaoss/grimoirelab-perceval/commit/67ba5042ba1882b28b56588af311cb524e423014. It looks like it is using the right end-point.
Grimoire elk run for slack channel errors out with following error stack.
Further investigated, certain slack APIs are officially deprecated and can not be used for new slack apps. as mentioned here: https://api.slack.com/changelog
For example: perceval uses https://api.slack.com/methods/channels.history api call to fetch channel data which is now deprecated and is moved to https://api.slack.com/methods/conversations.history