Bucket information is sometimes unavailable from api instance
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 22/100
Rechercherichtung
The inconsistency sits between b2sdk/bucket.py, where the server response is parsed (around line 970 in the linked v1.9.0 code), and b2sdk/api.py, where a bucket is built from only its id and name when read from the cache (around line 325). Start by reproducing the missing bucketType in as_dict() for a cached bucket. Done means cached and server-fetched buckets report the same fields, or the maintainers pick a design such as caching the full bucket data or fetching on demand. The thread has had no comments in about five years, so confirm the approach with maintainers first.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
I have observed application behaviour wherein I'm unable to determine if my bucket is private or not.
If I look at the bucket.as_dict() I can see that "bucketType" as a property is missing.
{'accountId': 'ececece343434', 'bucketId': 'aoeuaoeuaoeu', 'bucketName': 'some-public-bucket', 'bucketInfo': {}, 'corsRules': [], 'lifecycleRules': [], 'revision': None, 'options': set(), 'defaultServerSideEncryption': {'mode': None}, 'isFileLockEnabled': None, 'defaultRetention': {'mode': 'unknown'}}
This is confusing because when retrieving a server response, it looks like this information is checked: https://github.com/Backblaze/b2-sdk-python/blob/v1.9.0/b2sdk/bucket.py#L970
Yet from the cache, it's constructed with solely id and name: https://github.com/Backblaze/b2-sdk-python/blob/v1.9.0/b2sdk/api.py#L325
This leads to an inconsistent experience when interacting with a bucket instance as pulled from the api.
Perhaps the entire bucket dict should be cached? Alternatively that data retrieved on-demand? Not sure.
For now my workaround is to call:
b2_api.session.cache.clear() and retry the call to get_bucket to refresh the data, although I'll have to leave it for some time to see if it fully works.
- Vorherrschende Sprache
- Python
- Sterne
- 214
- Forks
- 68
- Ø Merge
- 51 Min.
- Gemergte PRs (30 T.)
- 6
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
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 Backblaze/b2-sdk-python
-
Download and copy sync actions print remote file names without escape_control_charsEvtl. vergeben @dreyfus92 hat das vor 15 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Backblaze/b2-sdk-python#631 ·
Maintainer antworten meist innerhalb von 1 Tag
-
SqliteAccountInfo profile name validation uses "re.match", so only the first character is checkedEvtl. vergeben @nazarli-shabnam hat das vor 9 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Backblaze/b2-sdk-python#629 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Adopt the AI-native SDLC and repository policiesEvtl. vergeben @goanpeca hat das vor 18 Tagen übernommen. Offenenhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 20/100
Backblaze/b2-sdk-python#634 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 50/100
Backblaze/b2-sdk-python#630 ·
Maintainer antworten meist innerhalb von 1 Tag
-
ci: cli-compat fails — 4 sse/sync integration tests broken in B2_Command_Line_Tool (all environments)Evtl. wieder frei @ffumero2003 hat das vor 37 Tagen übernommen, und es ist kein Pull Request offen. Offenbug testing
Backblaze/b2-sdk-python#627 · 2 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in Backblaze/b2-sdk-python
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
btclib-org/btclib-node#2505 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
open-webui/open-webui#34462 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
gorakhargosh/watchdog#1462 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
openwisp/openwisp-monitoring#889 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
IETF-Hackathon/pqc-certificates#351 ·
Maintainer antworten meist innerhalb von 2 Tagen