Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Crashed launched plugins are difficult to debug

Open
#162 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
go
Domain
testing

Research direction

Start in dummy.go at PluginCommand and inspect the caller that receives PluginResult and error values. Trace how launched plugin output is currently buffered or discarded, then make stdout and stderr available for logging or comparison checks while keeping the existing plugin tests passing.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Go
Stars
91
Forks
16
Avg merge
9h 3m
Merged PRs (30d)
24

Getting set up

We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from docker/secrets-engine

All issues in docker/secrets-engine

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.