Inconsistent log levels for test names
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 62/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- go
- 領域
- cli, testing-qa
調査の方向性
pkg/types/v2/file_existence.go、file_content.go、command.go、licenses.go、metadata.go のロギング箇所から始めます。提供された container-structure-test コマンドを --verbosity info とサンプル設定で実行し、現在の出力を比較します。完了とは、debug 出力を引き続き利用できる状態で、一覧にあるすべてのテスト名が info レベルで一貫して表示されることです。
索引モデルが issue の本文から書いたものです。
説明
Description
Different tests log their name at different log levels:
Infolevel logging:Debuglevel logging:- command: https://github.com/GoogleContainerTools/container-structure-test/blob/main/pkg/types/v2/command.go#L84
- licenses: https://github.com/GoogleContainerTools/container-structure-test/blob/main/pkg/types/v2/licenses.go#L66
- Metadata: https://github.com/GoogleContainerTools/container-structure-test/blob/main/pkg/types/v2/metadata.go#L93
If container-structure-test runs with --verbosity info and --output <json, junit> --test-report <outfile>, we can't see all the tests that are being run.
Not knowing what tests will run is a possibility in complex build environments where the configuration for container-structure-tests is generated at test time. Therefore it is helpful for all of this information to be available in a consistent manner without having to
I think it would make sense to make all the tests log their name at info level; this way it doesn't affect anyone was using --verbosity debug, whilst allowing those at --verbosity info to see all the tests being run.
Replication
With the following config.yml:
schemaVersion: "2.0.0"
fileExistenceTests:
- name: "sh existence"
path: "/bin/sh"
metadataTest:
entrypoint: []
Running with the flags info --image docker.io/library/alpine:latest --config config.yml --output junit --test-report out.xml will give us the following results:
-
with
--verbosity info$ container-structure-test test --verbosity info --image docker.io/library/alpine:latest --config config.yml --output junit --test-report out.xml INFO[0000] container-structure-test &{Version:1.19.1 GitVersion: BuildDate:2024-07-22T18:56:16Z GoVersion:go1.22.5 Compiler:gc Platform:linux/amd64} INFO[0000] File Existence Test: sh existence -
with
--verbosity debug:$ container-structure-test test --verbosity debug --image docker.io/library/alpine:latest --config config.yml --output junit --test-report out.xml INFO[0000] container-structure-test &{Version:1.19.1 GitVersion: BuildDate:2024-07-22T18:56:16Z GoVersion:go1.22.5 Compiler:gc Platform:linux/amd64} INFO[0000] File Existence Test: sh existence DEBU[0000] Metadata Test
- 主要言語
- Go
- スター
- 2.5k
- フォーク
- 213
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
GoogleContainerTools/container-structure-test のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
allstar
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
GoogleContainerTools/container-structure-test#393 · コメント 639 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
GoogleContainerTools/container-structure-test#280 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
Windows: structure_test binary missing .exe extension causes "Open With" dialog instead of running tests対応中かも @peakschris が 145 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
GoogleContainerTools/container-structure-test の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
cloudflare/cloudflared#1783 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
orchestration.migration.data.tasks.retry values are ignored by the 8.8 data migration job対応中かも @irisfield が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
camunda/camunda-platform-helm#7773 ·
メンテナーはふだん 1 日以内に返信
-
Add missing unit tests for IsAdmissionPolicyName and IsCertManagerResourceName対応中かも @a1h8 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
kubernetes-sigs/security-profiles-operator#3644 ·
メンテナーはふだん 1 日以内に返信