Skip to content

fix: move exec inside loop#1183

Open
QxBytes wants to merge 1 commit intocontainernetworking:mainfrom
QxBytes:alew/run-exec-inside-loop
Open

fix: move exec inside loop#1183
QxBytes wants to merge 1 commit intocontainernetworking:mainfrom
QxBytes:alew/run-exec-inside-loop

Conversation

@QxBytes
Copy link
Copy Markdown

@QxBytes QxBytes commented Apr 21, 2026

Aims to resolve #855

Moves exec command into the for loop so each retry gets a new instance of the command. Previously, we would retry using the same exec command which would always fail due to https://cs.opensource.google/go/go/+/refs/tags/go1.26.2:src/os/exec/exec.go;l=146 (command cannot be reused after calling Run on it).

Reran the unit test several dozen times without any flakiness.

@QxBytes QxBytes force-pushed the alew/run-exec-inside-loop branch 2 times, most recently from 508d95f to 1439246 Compare April 21, 2026 21:53
aims to resolve containernetworking#855

Signed-off-by: QxBytes <39818795+QxBytes@users.noreply.github.com>
@QxBytes QxBytes force-pushed the alew/run-exec-inside-loop branch from 1439246 to fdc67a2 Compare April 21, 2026 21:57
@QxBytes QxBytes marked this pull request as ready for review April 21, 2026 22:40
@MikeZappa87
Copy link
Copy Markdown
Contributor

@squeed @LionelJouin this might have been under the radar for awhile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run c := exec.CommandContext(ctx, pluginPath) inside the for loop

2 participants