Crashed launched plugins are difficult to debug
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from docker/secrets-engine
-
Linux keychain dials a new D-Bus connection per operation, defeating per-entry access confirmationOpen
Difficulty 5/5 Over a week Newbie friendliness 42/100
docker/secrets-engine#648 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
docker/secrets-engine#584 · 1 comment · 2 reactions ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
docker/secrets-engine#551 · 2 comments · 3 reactions ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
docker/secrets-engine#534 · 16 comments · 4 reactions ·
-
Dynamic ScopesMay be free again @joe0BAB claimed this 289 days ago, and no pull request is open. Open
docker/secrets-engine#393 · 1 assignee ·
All issues in docker/secrets-engine
Similar issues
-
enhancement low priority
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
eugenioenko/ttt#674 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
GoogleCloudPlatform/k8s-config-connector#13462 ·
Maintainers usually reply within 1 day
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
vavallee/bindery#2793 · 1 comment ·
Maintainers usually reply within 1 day