-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Improve handling of LDM shutdowns during invocations #13002
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
Conversation
LocalStack Community integration with Pro 2 files ± 0 2 suites ±0 1h 20m 19s ⏱️ - 24m 47s Results for commit 594a9a1. ± Comparison against base commit a1ae8f0. This pull request removes 1249 tests.
♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for improving the general user experience when Lambda invocations are interrupted (e.g., when manually destroying the container during an invocation).
lgtm once CI is 🟢
@@ -212,6 +213,16 @@ def invoke(self, *, invocation: Invocation) -> InvocationResult: | |||
self.store_logs( | |||
invocation_result=invocation_result, execution_env=ldm_execution_environment | |||
) | |||
except CancelledError: | |||
# Timeouts for invocation futures are managed by LDM, a cancelled error here is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a debug log with exception details (stack trace only in debug mode following #12989), in case we need to troubleshoot cancellations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, makes sense!
@@ -212,6 +213,16 @@ def invoke(self, *, invocation: Invocation) -> InvocationResult: | |||
self.store_logs( | |||
invocation_result=invocation_result, execution_env=ldm_execution_environment | |||
) | |||
except CancelledError: | |||
# Timeouts for invocation futures are managed by LDM, a cancelled error here is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We set a timeout, right? it's just a very long one, but it still might have actually run out. Maybe we can include this in the error message?
Test Results (amd64) - Integration, Bootstrap 5 files ± 0 5 suites ±0 1h 50m 6s ⏱️ - 31m 6s Results for commit 594a9a1. ± Comparison against base commit a1ae8f0. This pull request removes 1584 tests.
|
Motivation
The current Lambda version manager invocation logic for LDM does not handle cases correctly when an LDM configuration is removed during invocation. These changes improve the process to ensure such scenarios are handled more gracefully.
Changes