Inconsistencies in displaying bucket and file metadata
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 22/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 638
- Fork
- 138
- Merge medio
- 8h 27m
- PR unite (30g)
- 8
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_Command_Line_Tool
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Backblaze/B2_Command_Line_Tool#553 · 2 commenti · 3 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Adopt the AI-native SDLC playbook and repository policiesForse già presa @goanpeca l’ha presa 18 giorni fa. Apertaenhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
Backblaze/B2_Command_Line_Tool#1192 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
Backblaze/B2_Command_Line_Tool#1168 ·
I maintainer di solito rispondono entro 1 giorno
-
Add to MacPortsAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 50/100
Backblaze/B2_Command_Line_Tool#1161 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 56/100
Backblaze/B2_Command_Line_Tool#1155 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Backblaze/B2_Command_Line_Tool
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