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

Swagger and static resource support AWS Lambda HTTP, Azure HTTP #9717

Merged
merged 1 commit into from
Jun 3, 2020

Conversation

patriot1burke
Copy link
Contributor

I was not handling static resource correctly in the virtual HTTP layer. This fix will allow swagger support to work with AWS and Azure HTTP extensions as well as any static resource that emits FileRegion's internally.

I also redid the VirtualChannel stuff a bit to avoid context switching. I was having trouble with FileRegions as the VirtualChannel was closing the file before the azure/aws layer could read from the region. Since I was doing too much context switching anyways, I decided to just move message processing to the io loop. This aws/azure message processing is all non-blocking so it should be fine.

@stuartwdouglas Not sure if I handled FileRegions correctly. Can you take a look? They are in a spin loop. It looks like the NioChannel is handling them in the same way.

@patriot1burke patriot1burke force-pushed the lambda-swagger branch 2 times, most recently from 52311f8 to 03dfd8c Compare June 2, 2020 16:00
@patriot1burke
Copy link
Contributor Author

@oztimpower This has resolved the exception stack trace issues when running with test harness.

Copy link
Member

@stuartwdouglas stuartwdouglas left a comment

Choose a reason for hiding this comment

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

LGTM except you have used .transferred() instead of .count()

@patriot1burke patriot1burke force-pushed the lambda-swagger branch 3 times, most recently from e097168 to d91e04c Compare June 3, 2020 14:13
lambda formatting

virtual handler

poll loop error messages

git rid of poll loop

fix transferTo

revert back
@patriot1burke
Copy link
Contributor Author

@stuartwdouglas Approve?

@patriot1burke patriot1burke merged commit 8713226 into quarkusio:master Jun 3, 2020
@stuartwdouglas stuartwdouglas added this to the 1.6.0 - master milestone Jun 3, 2020
@patriot1burke patriot1burke deleted the lambda-swagger branch June 3, 2020 23:45
@gsmet
Copy link
Member

gsmet commented Jun 10, 2020

@patriot1burke I'm considering backporting that one to 1.5.1. Does it make sense to you or is it too risky?

@patriot1burke
Copy link
Contributor Author

There's risk, but go for it. Have to trust our testsuite.

@gsmet gsmet removed this from the 1.6.0 - master milestone Jun 11, 2020
@gsmet gsmet added this to the 1.5.1.Final milestone Jun 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

swagger-ui endpoint not accessible in AWS Lambda
3 participants