slackapi / slackapi/python-slack-sdk

Retrying internal errors in files_upload_v2

Aperta
#1,730 3 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

auto-triage-skip enhancement web-client
Lingua principale
Python
Stelle
4k
Fork
857
Merge medio
22h 21m
PR unite (30g)
16

Descrizione

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)

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia dall’implementazione di WebClient.files_upload_v2 del Python SDK e segui la sua chiamata a files.completeUploadExternal. Determina come sia possibile ritentare gli errori interni transitori, come file_update_failed, senza ripetere l’upload, quindi verifica che l’upload completato abbia ancora esito positivo tramite il punto di ingresso esistente di WebClient.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
api
Tipo di issue
Funzionalità
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.