Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(windows): prevent infinite run. Fixes #11810 #11993

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

mweibel
Copy link
Contributor

@mweibel mweibel commented Oct 13, 2023

windows based workflows already call .Wait() in signal_windows.go, calling it twice will result in not exiting at all.

Unix based workflows prevent that by releasing the process early on and checking exit code of all running processes.

Windows workflows don't do this and without knowing in-depth how windows processes work, I didn't find a way to achieve a similar "wait for all processes" syscall.

Fixes #11810

Motivation

The windows-only bug got introduced with PR #11368 but wasn't catched because seemingly windows tests aren't run automatically.

Modifications

simpleStart is now os specific code and does not attach a WaitDelay nor a Wait to the closer function.

Verification

Ran the changed code locally and ran the windows emissary command tests locally which now run through again.

windows based workflows already call .Wait() in signal_windows.go,
calling it twice will result in not exiting at all.

Unix based workflows prevent that by releasing the process early on
and checking exit code of all running processes.

Windows workflows don't do this and without knowing in-depth how windows
processes work, I didn't find a way to achieve a similar "wait for all
processes" syscall.

Signed-off-by: Michael Weibel <[email protected]>
@mweibel
Copy link
Contributor Author

mweibel commented Oct 13, 2023

FYI this fix would need to go into 3.4.x and next release too.
Pinging @terrytangyuan to review since you reviewed #11368, too.

Copy link
Member

@terrytangyuan terrytangyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@terrytangyuan terrytangyuan enabled auto-merge (squash) October 13, 2023 11:33
@terrytangyuan terrytangyuan merged commit bf735a2 into argoproj:master Oct 13, 2023
25 checks passed
terrytangyuan pushed a commit that referenced this pull request Oct 19, 2023
dpadhiar pushed a commit to dpadhiar/argo-workflows that referenced this pull request May 9, 2024
)

Signed-off-by: Michael Weibel <[email protected]>
Signed-off-by: Dillen Padhiar <[email protected]>
@agilgur5 agilgur5 added the area/windows Windows Container support label Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/executor area/windows Windows Container support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows-based pod runs indefinitely
3 participants