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

Crashed launched plugins are difficult to debug

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
go
領域
testing

調査の方向性

dummy.go の PluginCommand から始め、PluginResult と error の値を受け取る呼び出し元を調べます。起動されたプラグインの出力が現在どのようにバッファリングまたは破棄されているかを追跡し、その後、既存のプラグインテストを通過させたまま、ロギングや比較チェックに stdout と stderr を利用できるようにします。

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

説明

It would be nice to have a way to get the stdout and stderr of a launched plugin. At the moment we just have the exit code, which isn't very useful to debug with.

To get any sort of indication of what failed, we need to manually short circuit the test plugins in dummy.go.

func PluginCommand(t *testing.T, cfg PluginCfg) (*exec.Cmd, func() (*PluginResult, error)) {
	t.Helper()
	cfgStr, err := cfg.toString()
	assert.NoError(t, err)
	cmd := exec.Command(os.Args[0]) // run the test binary again
	var stdoutBuf, stderrBuf bytes.Buffer
-       cmd.Stdout = stdoutBuf
-       cmd.Stderr = stderrBuf
+       cmd.Stdout = os.Stdout
+       cmd.Stderr = os.Stdout
	cmd.Env = append(os.Environ(),
		"RUN_AS_DUMMY_PLUGIN=1",
		dummyPluginCfgEnv+"="+cfgStr,
	)

It would be best to get the output of the buffer returned to the caller so that the caller can log/comparison check the output.

主要言語
Go
スター
95
フォーク
18
平均マージ
7時間 52分
マージ済み PR(30日)
31

環境構築

はじめの一歩

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

docker/secrets-engine のほかの issue

docker/secrets-engine の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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