-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat: add streaming support #119
base: main
Are you sure you want to change the base?
Conversation
Luacheck Report27 tests 2 ✅ 0s ⏱️ For more details on these failures, see this check. Results for commit bec7666. ♻️ This comment has been updated with latest results. |
cbd40a4
to
a735ed1
Compare
40ec8b2
to
4c5300d
Compare
Just FYI, we might need to adjust the validation logic after upgrading SDK version.(I've tried before in #72, but didn't get back to this since then) And a related ticket: https://konghq.atlassian.net/browse/KAG-3834 |
@windmgc Yeah I wondered why the tests randomly failing, I can look at that shortly if you want. Do you know why I am totally prepared to re-test by hand the AWS vault, auth, and other stuff too btw in Kong(/EE) if you want me to... |
@Tieske Yeah I missed up the release process completely, now the branch is stuck. Ignore it, check this one instead. |
String buffer does not exist in older LuaJIT versions, in the |
@@ -6,7 +6,7 @@ | |||
# It will convert the service descriptions of the specified SDK version | |||
# (see SDK_VERSION_TAG) into Lua modules and generate a rockspec. | |||
|
|||
SDK_VERSION_TAG=v2.751.0 | |||
SDK_VERSION_TAG=v2.1353.0 |
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.
This is a tricky change. We have way too little test coverage over different AWS services to find potential issues.
wdyt @windmgc ?
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.
I'm afraid so... I do not have much confidence in upgrading it directly
tostring(signed_request.host), | ||
tostring(signed_request.port), | ||
tostring(err)) | ||
if response.headers["application/vnd.amazon.eventstream"] then |
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 this be if response.headers["Content-Type"] == "application/vnd.amazon.eventstream" then
?
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.
I fixed this locally in my test environment and applied other changes from f0ac80e , works like a charm in my lambda streaming case.
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.
@DiscreteTom I have made changes to the header format in the stream handler, otherwise we are wasting CPU by scanning for "header_key == x"
Can you check your plugin code again?
Minor change, now headers are:
{
body = "...",
headers = {
key = "value",
key2 = "value2",
},
}
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.
No problem. I updated my code locally against this change and it is ok. Gonna push to my PR when this lib is released.
Any update on this? |
Adds:
v2.1353.0
to add missing Invoke Lambda with Streaming Response shapes