slackapi / slackapi/python-slack-sdk

Retrying internal errors in files_upload_v2

Offen
#1,730 3 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

auto-triage-skip enhancement web-client
Vorherrschende Sprache
Python
Sterne
4k
Forks
857
Ø Merge
22 Std. 21 Min.
Gemergte PRs (30 T.)
16

Beschreibung

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)

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne bei der Implementierung von WebClient.files_upload_v2 im Python SDK und verfolge den Aufruf von files.completeUploadExternal. Ermittle, wie vorübergehende interne Fehler wie file_update_failed erneut versucht werden können, ohne den Upload zu wiederholen, und überprüfe anschließend, dass der abgeschlossene Upload weiterhin über den bestehenden WebClient-Einstiegspunkt erfolgreich ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
api
Issue-Typ
Feature
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
42/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.