Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Testing the existence of a directory is very slow

オープン
#326 コメント 0 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
go
領域
cli, performance

調査の方向性

示されている container-structure.yaml、nginx イメージ、および / に対する fileExistenceTests チェックを使い、issue に記載されたコマンドとデバッグロギングで報告を再現する。ファイル存在テストのエントリーポイントを追跡し、ディレクトリをチェックすると入れ子になった内容まで走査するかどうかを確認する。完了の条件は、挙動を理解し、報告された不要な遅延なしに存在チェックが完了し、このケースのカバレッジがあることである。

索引モデルが issue の本文から書いたものです。

説明

When testing the existence of a directory it appears that if the directory contains many (nested) files, the test takes a considerable amount of time to complete. Is this expected? My assumption is that this test would complete quite quickly. For example, the following test takes 9 seconds to complete on my arm64 macOS 12.6.1 system against the community nginx image:

Test:

fileExistenceTests:
  - name: Root
    path: /
    shouldExist: true

Output (w/ time):

$ time container-structure-test -v debug test --image nginx --config container-structure.yaml
INFO[0000] container-structure-test &{Version:1.14.0 GitVersion: BuildDate:2022-11-22T13:04:18Z GoVersion:go1.19.3 Compiler:gc Platform:darwin/arm64}

=================================================
====== Test file: container-structure.yaml ======
=================================================
INFO[0000] File Existence Test: Root
DEBU[0009] Skipping empty metadata test
=== RUN: File Existence Test: Work dir exists
--- PASS
duration: 0s

=================================================
==================== RESULTS ====================
=================================================
Passes:      1
Failures:    0
Duration:    0s
Total tests: 1

PASS
container-structure-test -v debug test --image nginx --config   0.16s user 0.62s system 7% cpu 9.943 total
主要言語
Go
スター
2.5k
フォーク
213
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

GoogleContainerTools/container-structure-test のほかの issue

GoogleContainerTools/container-structure-test の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。