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

cpToPod passes an async function into exec's statusCallback, but the promise is never awaited #1767

Closed
Moggers opened this issue Jul 2, 2024 · 3 comments

Comments

@Moggers
Copy link

Moggers commented Jul 2, 2024

cpToPod passes an async function as the statusCallback; but exec does not await the function
Once upon a time it was declared as an asynchronous function but even in that case, the function wasn't awaited.
This appears to result in the throw within cptopod (in cases where stderr is populated or the websocket connection fails) coercing into a promise which never gets handled; resulting ultimately in an uncaught promise rejection.

@Moggers Moggers changed the title cpToPod passes an async function into exec, but the promise is never awaited cpToPod passes an async function into exec's statusCallback, but the promise is never awaited Jul 2, 2024
@brendandburns
Copy link
Contributor

We'd be happy to take a PR with a test demonstrating the problem, along with the fix.

As it stands right now, I'm not sure this is that easy to reproduce without a unit test (and I'm not certain that this is actually what is causing your problem)

@cjihrig
Copy link
Contributor

cjihrig commented Sep 27, 2024

Should this issue be closed since #1880 was merged?

@mstruebing
Copy link
Member

Actually yes, thank you.
The keyword in the pull request was wrong so it did not automatically close.

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

No branches or pull requests

4 participants