Graceful continuation on NOT_FOUND
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 30/100
Rechercherichtung
Beginne bei der v3.apps-Iteration und den im Bericht gezeigten Aufrufen app.space() und space.organization(), und verfolge dann, wie InvalidStatusCode-Antworten behandelt werden. Erledigt ist die Aufgabe, wenn ein NOT_FOUND für eine App oder einen Space übersprungen werden kann, während die lang andauernde Traversierung fortgesetzt wird, wobei das Verhalten für die verbleibenden Ressourcen definiert ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Hi - We are using cf-python-client as part of a task which downloads each app-blob in turn. As we have tens of thousands of containers, this job takes 8-10 hours to complete.
The job is theoretically quite straightforward...
for app in cfClient.v3.apps:
space_name=app.space()['name']
org_name=app.space().organization()['name']
...
More often than not, during the running of this task, we'll encounter an error along the lines of...
cloudfoundry_client.errors.InvalidStatusCode: NOT_FOUND = {"errors": [{"detail": "Space not found", "title": "CF-ResourceNotFound", "code": 10010}]}
or
cloudfoundry_client.errors.InvalidStatusCode: NOT_FOUND = {"errors": [{"detail": "App not found", "title": "CF-ResourceNotFound", "code": 10010}]}
Given the number of orgs/spaces/apps we have in service, it is not too surprising that an app or space which was present at the start of the task is no longer around 6-8 hours later.
When we encounter an error like this we have no options but to restart the 8-10 hour task from the beginning again and hope that it manages to make it through without an error.
I was just wondering if there are any options to allow for more graceful continuation when objects are no longer found? This doesn't seem to be something that I can handle with a try: except: - Are there any options to make errors like this non-fatal?
Cheers!!
- Vorherrschende Sprache
- Python
- Sterne
- 55
- Forks
- 53
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus cloudfoundry-community/cf-python-client
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
cloudfoundry-community/cf-python-client#218 · 3 Kommentare ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
cloudfoundry-community/cf-python-client#180 · 2 Kommentare ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
cloudfoundry-community/cf-python-client#177 · 2 Kommentare ·
Alle Issues in cloudfoundry-community/cf-python-client
Ähnliche Issues
-
documentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
ianktoo/project-monitor#14 ·
-
security
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
btclib-org/btclib-wallet#478 ·
Maintainer antworten meist innerhalb von 1 Tag
-
security
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
btclib-org/btclib#2727 ·
Maintainer antworten meist innerhalb von 1 Tag
-
good first issue lead variant:container
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
radialmonster/orf-cleanroom#10 ·
Maintainer antworten meist innerhalb von 1 Tag
-
gdsa opencode: keep-alive cleanup trap fails with 'keepalive_pid: unbound variable'Evtl. vergeben @darribas hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100