-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Automation API] - asyncio errors in python inline programs #6228
Comments
Fairly certain something's gone awry in https://github.com/pulumi/pulumi/blob/master/sdk/python/lib/pulumi/x/automation/server.py#L61-L83 |
@komalali I think we need to turn off logging for pulumi/sdk/python/cmd/pulumi-language-python-exec Lines 66 to 82 in 0594024
|
Yeah, I'm aware of that comment and that is certainly a way to paper over the issue. That was how I was first handling it here too. But I see 2 problems with that:
So, I'm not convinced that just turning off the logging is the "right" answer. But it could be a "good enough" answer since it's what we've been doing for the past 2 years anyway 🤷 |
The "right" answer would be to fix |
This is a quality issue, I would ask Alex/Lee Zen for guidance.
…On Sun, Jan 31, 2021 at 10:45 AM Komal ***@***.***> wrote:
The "right" answer would be to fix run_pulumi_func to handle errors
correctly.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#6228 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE35UALIU6RBSVIVDBMGKLS4WCJHANCNFSM4W2SSP7Q>
.
|
Yeah I'll bring this up in planning on Tuesday. |
Definitely want to make sure we exit cleanly and don't leave the GRPC server running in the case of an error. Luckily, since this is all in one process we should be able to attach a debugger and step through to see exactly what's going on (in the inline case). Happy to pair on that if it would be helpful. |
In my spelunking through the code, I noticed that there are a number of places in the python runtime code where we When the process exits within an RPC, run_pulumi_func never completes, resulting in outstanding tasks that can eventually also error with the same I noticed that the initial PR that added the exits did this in both the typescript and python runtimes. However, @EvanBoyle updated the typescript runtime to absorb these errors and disconnect cleanly rather than exit the process. We should do the same for the python runtime. |
There is an issue with error-handling in python inline programs.
Expected Behavior
Error is returned gracefully without asyncio error messages.
Current Behavior
asyncio errors with
Task exception was never retrieved
.Full output:
The text was updated successfully, but these errors were encountered: