Inconsistencies in displaying bucket and file metadata
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 22/100
Línea de trabajo
Start by comparing the JSON output of b2 ls --json and b2 get-file-info, then b2 list-buckets --json, b2 get-bucket and b2 update-bucket, to see where fileRetention, legalHold and defaultServerSideEncryption diverge. The issue says b2 ls --json builds FileVersionInfo objects before serialising, so check that conversion. Done would mean one agreed output shape for each field, which needs a maintainer decision on the proposed "mode": "unknown" value first.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
As of now there are several inconsistencies when it comes to displaying:
- bucket default encyrption
- file retention
in
b2 ls --jsonandb2 get-file-infob2 list-buckets --json,b2 get-bucketandb2 update-bucket
The inconsistencies are:
- FILE INCONSISTENCIES
b2 get-file-infodisplays raw data from server, thereforefileRetentionandlegalHoldcontain authorization data, and are of the form:
"fileRetention": {
"isClientAuthorizedToRead": true,
"value": {
"mode": null,
"retainUntilTimestamp": null
}
},
"legalHold": {
"isClientAuthorizedToRead": true,
"value": null
}
or
"fileRetention": {
"isClientAuthorizedToRead": false,
"value": null
},
"legalHold": {
"isClientAuthorizedToRead": false,
"value": null
}
b2 ls --jsondisplays data by converting it toFileVersionInfoobjects and then serialising it to dicts, thereforefileRetentionandlegalHolddo not explicitly containisClientAuthorizedToRead. Instead, information about permission to read can be inferred from the displayed value.
For an application key authorized to read these attributes the output looks like:
"fileRetention": {
"mode": null,
"retainUntilTimestamp": null
},
"legalHold": "off"
and for an unauthorized one like:
"fileRetention": {
"mode": "unknown",
"retainUntilTimestamp": null
},
"legalHold": "unknown",
- BUCKET INCONSISTENCIES
A very similar inconsistency is visible in b2 get-bucket and b2 update-bucket. The latter one returns raw data as received from server (with isClientAuthorizedToRead).
- BUCKET AMBIGUITY
displaying default bucket encryption can be vague depending on key capabilities.
For a key that does not have the permissions to read bucket default encryption the output looks like:
"defaultServerSideEncryption": {
"mode": null
}
And for a bucket with no default encryption and a key with reading capabilities it looks like:
"defaultServerSideEncryption": {
"mode": "none"
},
The difference is hard to spot, but it's there.
I suggest treating these inconsistencies as bugs and fix them without releasing a major version of the CLI. The solutions I suggest:
- use the
b2 ls --jsonformat everywhere - use the
b2 get-bucketandb2 list-buckets --jsonformat everywhere
3.. introduce a possible value of"mode": "unknown"and for buckets with no default encryption use"mode": null.
- Lenguaje dominante
- Python
- Estrellas
- 638
- Forks
- 138
- Merge medio
- 8 h 27 min
- PR fusionados (30 d)
- 8
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_Command_Line_Tool
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Backblaze/B2_Command_Line_Tool#553 · 2 comentarios · 3 reacciones ·
Los mantenedores suelen responder en 1 día
-
Adopt the AI-native SDLC playbook and repository policiesPosiblemente ocupada @goanpeca la tomó hace 18 días. Abiertoenhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Backblaze/B2_Command_Line_Tool#1192 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Backblaze/B2_Command_Line_Tool#1168 ·
Los mantenedores suelen responder en 1 día
-
Add to MacPortsAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 50/100
Backblaze/B2_Command_Line_Tool#1161 ·
Los mantenedores suelen responder en 1 día
-
b2 ls timestamps human readableAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 56/100
Backblaze/B2_Command_Line_Tool#1155 ·
Los mantenedores suelen responder en 1 día
Todos los issues de Backblaze/B2_Command_Line_Tool
Issues similares
-
ライブラリを追加Abiertopriority middle
Dificultad 1/5 Menos de una hora Aptitud para principiantes 62/100
KATO-Hiro/AtCoderClans#13015 ·
Los mantenedores suelen responder en 1 día
-
StringLiteral to IntegerType/LongType silently truncates fractional strings, changing predicate meaningPosiblemente ocupada @Shahzeb-DataEngineer la tomó hoy. Abiertokind:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
apache/iceberg-python#4382 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
request-theme
Dificultad 2/5 Menos de una hora Aptitud para principiantes 62/100
LizardByte/ThemerrDB#10024 · 2 comentarios ·
-
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