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

Do not set tty on stdin if no tty available #6281

Closed
wants to merge 1 commit into from

Conversation

@jpetitcolas
Copy link

jpetitcolas commented Jun 20, 2019

What did you implement?

I am using serverless into a Docker container without an attached tty (no option -t). When I invoke my lambda using AWS SDK (AWS.lambda().invoke().send()), I got the following error:

Proxy Handler could not detect JSON:     sys.stdin = open('/dev/tty')
OSError: [Errno 6] No such device or address: '/dev/tty'

How did you implement it:

This PR just ignores the opening of the TTY in case there is none. As far as I checked, this is only useful for some CI issue reasons.

How can we verify it:

Create a basic lambda within a Docker container, and invoke it locally (without API Gateway).

I can provide a basic repo if required. :)

Todos:

  • Write tests
  • Write documentation
  • Fix linting errors
  • Make sure code coverage hasn't dropped
  • Provide verification config / commands / resources
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES
Is it a breaking change?: NO

@pmuens pmuens self-assigned this Jun 21, 2019
@pmuens pmuens added this to In progress in Serverless via automation Jun 21, 2019
@pmuens pmuens added this to the 1.46.0 milestone Jun 21, 2019
Copy link
Member

pmuens left a comment

Hey @jpetitcolas thanks for working on this 👍

I'm not entirely sure how I can reproduce / test this behavior. Can you provide some more information about your setup so that I can replicate and validate that this PR fixes the problem?

Thanks in advance!

@jpetitcolas

This comment has been minimized.

Copy link
Author

jpetitcolas commented Jun 24, 2019

Weird: I can't reproduce the issue today, even without using my fork. I'll investigate and keep you posted. Feel free to close the PR meanwhile. :)

@pmuens

This comment has been minimized.

Copy link
Member

pmuens commented Jun 25, 2019

Weird: I can't reproduce the issue today, even without using my fork. I'll investigate and keep you posted. Feel free to close the PR meanwhile. :)

Great. Thanks for looking into this @jpetitcolas 👍

Just let us know if you can re-produce it and we can re-open it.

@pmuens pmuens closed this Jun 25, 2019
Serverless automation moved this from In progress to Done Jun 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Serverless
  
Done
2 participants
You can’t perform that action at this time.