slackapi / slackapi/python-slack-sdk
Retrying internal errors in files_upload_v2
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 4k
- Forks
- 857
- Merge medio
- 22 h 21 min
- PR fusionados (30 d)
- 16
Descripción
Hi there,
We occasionally see transient errors from the Slack API in calls to files.completeUploadExternal that are done within the SDK's implementation of files_upload_v2. The error we see most frequently error we encounter is file_update_failed, which has more or less no useful explanation on the API docs. Support has also not been very helpful in understanding the nature of these issues: they just said there is a temporary server error, and we should retry the call to completeUploadExternal
Can the Python SDK implement that retr? It doesn't seem like the caller of files_upload_v2 (i.e. our code) could, since that would redo the entire upload. The caller also doesn't have enough information to retry the files.completeUploadExternal call, since the ID is lost when the SDK throws an exception.
I suppose a workaround is to install a custom RetryHandler on the WebClient. But like in #1715, shouldn't that just be part of the SDK?
Category
- slack_sdk.web.WebClient (sync/async) (Web API client)
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.
Línea de trabajo
Comienza en la implementación de WebClient.files_upload_v2 del Python SDK y sigue su llamada a files.completeUploadExternal. Determina cómo se pueden reintentar errores internos transitorios, como file_update_failed, sin repetir la carga; después, verifica que la carga completada siga teniendo éxito a través del punto de entrada existente de WebClient.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- api
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 42/100