API Cursor Pagination Performance : conversations.list
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- python
- Área
- api, backend-api-design
Línea de trabajo
Comienza con los puntos de entrada de slack_sdk.web.WebClient para conversations.list, chat.update y chat.postMessage, y luego inspecciona cómo se exponen la paginación mediante cursor y el manejo de nombres de canales. El issue presenta varias soluciones posibles, por lo que, para darlo por terminado, hay que elegir y especificar si el SDK debe resolver los nombres directamente, optimizar la paginación o alinear los métodos de mensajes, con pruebas que cubran el comportamiento seleccionado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
The behavior characteristics and performance of iterating the cursor through conversations.list is truly awful when it is being used to resolve a channel name to a channel id.
For example, if I create a new channel in an org that's been around for a while, with limit=200, that channel is returned on page 135, and the pagination sequence takes 7m38.503s to resolve with 20 calls per minute (tier 2 rate limit).
When inspecting the responses, it can be seen that the channels returned never reach the limit count, and progressively diminish, eventually returning no results across cursors, sometimes 2, sometimes 10, etc., until finally resolving.
Please, either create a new class of methods that support resolving user or channel names directly to their IDs, or optimize the data that feeds the pagination to enable the methods to return valuable data earlier in the pagination sequence.
This is related to the last bullet under Just The Facts:
It's possible to receive fewer results than your specified limit, even when there are additional results to retrieve.
Note
This started when looking at chat.update and seeing that it required a channel id rather than a channel name (I tested it and it's not just a docs issue...). Rather than fixing the above situation, if you can align the chat.postMessage and chat.update methods to both accept a channel name, then that would satisfy my original problem. Though, the above deficiency will still exist. I've made a separate issue for this here.
Category (place an x in each of the [ ])
- [X ] slack_sdk.web.WebClient (sync/async) (Web API client)
- slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
- slack_sdk.models (UI component builders)
- slack_sdk.oauth (OAuth Flow Utilities)
- slack_sdk.socket_mode (Socket Mode client)
- slack_sdk.audit_logs (Audit Logs API client)
- slack_sdk.scim (SCIM API client)
- slack_sdk.rtm (RTM client)
- slack_sdk.signature (Request Signature Verifier)
- Lenguaje dominante
- Python
- Estrellas
- 4k
- Forks
- 857
- Merge medio
- 22 h 21 min
- PR fusionados (30 d)
- 16
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de slackapi/python-slack-sdk
-
needs info server-side-issue
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
slackapi/python-slack-sdk#1961 · 3 comentarios ·
-
Use logger.isEnabledFor(logging.DEBUG) instead of logger.level <= logging.DEBUG for debug guards Abiertoauto-triage-skip bug
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
slackapi/python-slack-sdk#1957 ·
-
auto-triage-skip discussion
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
slackapi/python-slack-sdk#1940 · 2 comentarios ·
-
chat_postMessage silently forwards thread_id to the API, so a threaded reply posts to the channel Abiertoauto-triage-skip enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
slackapi/python-slack-sdk#1923 · 2 comentarios ·
-
SocketModeClient.connect() retries forever against a permanently closed aiohttp ClientSession Abiertoauto-triage-skip bug socket-mode
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
slackapi/python-slack-sdk#1922 · 2 comentarios ·
Todos los issues de slackapi/python-slack-sdk
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
stephrobert/dsoxlab#238 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
sublimehq/package_control#1780 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
nwg-piotr/nwg-displays#145 ·