You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
b2 ls --json displays data by converting it to FileVersionInfo objects and then serialising it to dicts, therefore fileRetention and legalHold do not explicitly contain isClientAuthorizedToRead. 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:
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:
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 --json format everywhere
use the b2 get-bucket and b2 list-buckets --json format everywhere
3.. introduce a possible value of "mode": "unknown" and for buckets with no default encryption use "mode": null.
The text was updated successfully, but these errors were encountered:
"none" thing is also error prone. Eliminating that from interface will be a lot of work.
Same with "unknown"; IMO we should omit it from dict if we don't know it, otherwise the disparities between internal data structures and API lead to some weird errors.
I don't think we should omit field if we don't know its value. The contract should be crystal clear to users, and if they receive different structures based on some conditions, it would be a hell.
Maybe it would be hard to implement or something, but here we're talking about user experience with the product, it's more important than difficulty of implementation.
As of now there are several inconsistencies when it comes to displaying:
in
b2 ls --json
andb2 get-file-info
b2 list-buckets --json
,b2 get-bucket
andb2 update-bucket
The inconsistencies are:
b2 get-file-info
displays raw data from server, thereforefileRetention
andlegalHold
contain authorization data, and are of the form:or
b2 ls --json
displays data by converting it toFileVersionInfo
objects and then serialising it to dicts, thereforefileRetention
andlegalHold
do 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:
and for an unauthorized one like:
A very similar inconsistency is visible in
b2 get-bucket
andb2 update-bucket
. The latter one returns raw data as received from server (withisClientAuthorizedToRead
).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:
And for a bucket with no default encryption and a key with reading capabilities it looks like:
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:
b2 ls --json
format everywhereb2 get-bucket
andb2 list-buckets --json
format everywhere3.. introduce a possible value of
"mode": "unknown"
and for buckets with no default encryption use"mode": null
.The text was updated successfully, but these errors were encountered: