Inconsistencies in displaying bucket and file metadata
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Python
- スター
- 638
- フォーク
- 138
- 平均マージ
- 8時間 27分
- マージ済み PR(30日)
- 8
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Backblaze/B2_Command_Line_Tool のほかの issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
Backblaze/B2_Command_Line_Tool#553 · コメント 2 件 · リアクション 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Adopt the AI-native SDLC playbook and repository policies対応中かも @goanpeca が 18 日前に担当しました。 オープンenhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
Backblaze/B2_Command_Line_Tool#1192 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
Backblaze/B2_Command_Line_Tool#1168 ·
メンテナーはふだん 1 日以内に返信
-
Add to MacPortsオープン
難易度 3/5 1〜2日 初心者へのやさしさ 50/100
Backblaze/B2_Command_Line_Tool#1161 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 56/100
Backblaze/B2_Command_Line_Tool#1155 ·
メンテナーはふだん 1 日以内に返信
Backblaze/B2_Command_Line_Tool の issue をすべて見る
似ている issue
-
ライブラリを追加オープンpriority middle
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
KATO-Hiro/AtCoderClans#13015 ·
メンテナーはふだん 1 日以内に返信
-
StringLiteral to IntegerType/LongType silently truncates fractional strings, changing predicate meaning対応中かも @Shahzeb-DataEngineer が今日担当しました。 オープンkind:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
apache/iceberg-python#4382 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
request-theme
難易度 2/5 1時間未満 初心者へのやさしさ 62/100
LizardByte/ThemerrDB#10024 · コメント 2 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
btclib-org/btclib-node#2505 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
open-webui/open-webui#34462 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信