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 timeouts for invocations on the command line. #558

Merged
merged 1 commit into from
Oct 25, 2017
Merged

Conversation

ttung
Copy link
Member

@ttung ttung commented Oct 17, 2017

When we use the chalice app in tests, we override the timeout. When we use the chalice app on lambda, the timeout is valid.

However, in the current version of chalice we're using, calling get_remaining_time_in_millis() throws an exception when not run in a lambda.

This diff:

  1. Sets the timeout in config.
  2. Overrides the timeout set in config due to a chalice bug (see Scale the lambda_timeout parameter correctly. aws/chalice#579)

@ttung ttung requested a review from kislyuk October 17, 2017 10:29
@ghost ghost assigned ttung Oct 17, 2017
@ghost ghost added code review labels Oct 17, 2017
@ttung ttung force-pushed the tonytung-networking branch from a7f3bc6 to 713fce9 Compare October 17, 2017 16:12
@ttung ttung force-pushed the tonytung-cmdline branch 4 times, most recently from 79b1d78 to 609f207 Compare October 19, 2017 20:33
@kozbo kozbo added the Q4 label Oct 23, 2017
@kozbo kozbo added this to the DSS Sprint 11 (10/23 - 11/5) milestone Oct 23, 2017
@kislyuk
Copy link
Member

kislyuk commented Oct 24, 2017

Sorry about the delay with this review. This PR does not seem to stack correctly - it has a number of extraneous changes. Could you rebase it to stack correctly?

Also, Chalice 1.0.2+ should not crash when get_remaining_time_in_millis() is called in local mode.

@ttung ttung changed the base branch from tonytung-networking to master October 24, 2017 21:20
chalice/app.py Outdated
@@ -85,6 +85,8 @@ def wrapper(*args, **kwargs):
future = executor.submit(method, *args, **kwargs)
time_remaining_s = chalice_app._override_exptime_seconds # type: typing.Optional[float]
if time_remaining_s is None:
import pdb
pdb.set_trace()
Copy link
Member

Choose a reason for hiding this comment

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

One last change: please deactivate the pdb tracer :)

@ttung ttung merged commit c3b4ae1 into master Oct 25, 2017
@ghost ghost removed the in progress label Oct 25, 2017
@ttung ttung deleted the tonytung-cmdline branch October 25, 2017 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants