Bucket information is sometimes unavailable from api instance
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 22/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 214
- Forks
- 68
- Merge medio
- 51 min
- PR fusionados (30 d)
- 6
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Backblaze/b2-sdk-python
-
Download and copy sync actions print remote file names without escape_control_charsPosiblemente ocupada @dreyfus92 la tomó hace 15 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Backblaze/b2-sdk-python#631 ·
Los mantenedores suelen responder en 1 día
-
SqliteAccountInfo profile name validation uses "re.match", so only the first character is checkedPosiblemente ocupada @nazarli-shabnam la tomó hace 9 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Backblaze/b2-sdk-python#629 ·
Los mantenedores suelen responder en 1 día
-
Adopt the AI-native SDLC and repository policiesPosiblemente ocupada @goanpeca la tomó hace 18 días. Abiertoenhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
Backblaze/b2-sdk-python#634 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 50/100
Backblaze/b2-sdk-python#630 ·
Los mantenedores suelen responder en 1 día
-
ci: cli-compat fails — 4 sse/sync integration tests broken in B2_Command_Line_Tool (all environments)Quizá libre de nuevo @ffumero2003 la tomó hace 37 días y no hay ningún pull request abierto. Abiertobug testing
Backblaze/b2-sdk-python#627 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de Backblaze/b2-sdk-python
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
btclib-org/btclib-node#2505 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
open-webui/open-webui#34462 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
gorakhargosh/watchdog#1462 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
openwisp/openwisp-monitoring#889 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
IETF-Hackathon/pqc-certificates#351 ·
Los mantenedores suelen responder en 2 días