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
Describe the bug
Slack Trigger, iterates all slack channels returned from the API (via pagination) to find appropriate channel ID - that implementation makes incorrect assumption - it expects the count of returned items to always be equal to pagination limit, unless last page is returned.
Such assumption clearly goes again the Slack API design - see link, which states that returned chunk of data may be smaller than pagination limit, even if that is not the last page or results.
With large enough and dynamic enough Slack Workspace, aforementioned implementation leads to 'failed to get channelID of %s' exceptions, even if channel with appropriate name exists - the pagination simply stops, before it can reach proper item.
To Reproduce
Steps to reproduce the behavior:
Have Slack API return list of channels which does not neatly have 200 items per page
Choose channel to sent message to, which is at the end of the pagination
Attempt to run Slack Trigger
See error 'failed to get channelID of %s'
Expected behavior
I would expect the Slack Trigger to work as long as the channel with given name exists and is returned by the API pagination, irrespectively of pages size.
Environment (please complete the following information):
Kubernetes: v1.19.6
Argo: v2.12.7
Argo Events: v1.2.2
Additional context
Proposed fix: Simply paginate until returned cursor is empty.
Message from the maintainers:
If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.
The text was updated successfully, but these errors were encountered:
Describe the bug
Slack Trigger, iterates all slack channels returned from the API (via pagination) to find appropriate channel ID - that implementation makes incorrect assumption - it expects the count of returned items to always be equal to pagination limit, unless last page is returned.
Such assumption clearly goes again the Slack API design - see link, which states that returned chunk of data may be smaller than pagination limit, even if that is not the last page or results.
With large enough and dynamic enough Slack Workspace, aforementioned implementation leads to 'failed to get channelID of %s' exceptions, even if channel with appropriate name exists - the pagination simply stops, before it can reach proper item.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect the Slack Trigger to work as long as the channel with given name exists and is returned by the API pagination, irrespectively of pages size.
Environment (please complete the following information):
Additional context
Proposed fix: Simply paginate until returned cursor is empty.
Message from the maintainers:
If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.
The text was updated successfully, but these errors were encountered: