Bucket information is sometimes unavailable from api instance
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 22/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 214
- Fork
- 68
- Merge medio
- 51m
- PR unite (30g)
- 6
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Backblaze/b2-sdk-python
-
Download and copy sync actions print remote file names without escape_control_charsForse già presa @dreyfus92 l’ha presa 15 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Backblaze/b2-sdk-python#631 ·
I maintainer di solito rispondono entro 1 giorno
-
SqliteAccountInfo profile name validation uses "re.match", so only the first character is checkedForse già presa @nazarli-shabnam l’ha presa 9 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Backblaze/b2-sdk-python#629 ·
I maintainer di solito rispondono entro 1 giorno
-
Adopt the AI-native SDLC and repository policiesForse già presa @goanpeca l’ha presa 18 giorni fa. Apertaenhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
Backblaze/b2-sdk-python#634 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 50/100
Backblaze/b2-sdk-python#630 ·
I maintainer di solito rispondono entro 1 giorno
-
ci: cli-compat fails — 4 sse/sync integration tests broken in B2_Command_Line_Tool (all environments)Forse di nuovo libera @ffumero2003 l’ha presa 37 giorni fa e non c’è nessuna pull request aperta. Apertabug testing
Backblaze/b2-sdk-python#627 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Backblaze/b2-sdk-python
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
btclib-org/btclib-node#2505 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
open-webui/open-webui#34462 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
gorakhargosh/watchdog#1462 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
openwisp/openwisp-monitoring#889 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
IETF-Hackathon/pqc-certificates#351 ·
I maintainer di solito rispondono entro 2 giorni