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

feat(plugins): enable ai plugins to read request body from buffered file #13158

Merged
merged 3 commits into from
Jul 11, 2024

Conversation

fffonion
Copy link
Contributor

@fffonion fffonion commented Jun 4, 2024

Summary

Checklist

Issue reference

AG-39

#13211

Copy link
Contributor

@liverpool8056 liverpool8056 left a comment

Choose a reason for hiding this comment

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

Do we need update removed_fields correspondingly?

@fffonion
Copy link
Contributor Author

@liverpool8056 yes, i didn't notice removed_fields is also present on CE, will fix.

@fffonion fffonion force-pushed the pdk-read-buffered-request branch 3 times, most recently from 1df6c4c to fafc988 Compare June 24, 2024 05:40
@fffonion fffonion force-pushed the pdk-read-buffered-request branch 2 times, most recently from 0c82e34 to 92eefed Compare July 4, 2024 12:40
@fffonion fffonion force-pushed the pdk-read-buffered-request branch 2 times, most recently from e197020 to 2f7d8d8 Compare July 10, 2024 06:45
@fffonion
Copy link
Contributor Author

I did a force push to port the backward compat tests from EE PR.

@jschmid1 jschmid1 merged commit bc27ffd into master Jul 11, 2024
27 checks passed
@jschmid1 jschmid1 deleted the pdk-read-buffered-request branch July 11, 2024 09:05
@team-gateway-bot
Copy link
Collaborator

Cherry-pick failed for master, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git remote add upstream https://github.com/kong/kong-ee
git fetch upstream master
git worktree add -d .worktree/cherry-pick-13158-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-13158-to-master-to-upstream
git checkout -b cherry-pick-13158-to-master-to-upstream
ancref=$(git merge-base 4664b907c86cf95d8ad98c7f51dce768c52070c3 eba070f49480b40d6c3449a80aeea8e3c88cc64b)
git cherry-pick -x $ancref..eba070f49480b40d6c3449a80aeea8e3c88cc64b

@github-actions github-actions bot added the incomplete-cherry-pick A cherry-pick was incomplete and needs manual intervention label Jul 11, 2024
@locao
Copy link
Contributor

locao commented Jul 16, 2024

@fffonion could you take care of the manual cherry-pick, please?

@AndyZhang0707 AndyZhang0707 removed the incomplete-cherry-pick A cherry-pick was incomplete and needs manual intervention label Aug 1, 2024

else
return ""
local file, err = io.open(body_file, "r")
Copy link
Contributor

Choose a reason for hiding this comment

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

IMHO it's safer to read the file content as binary. local file, err = io.open(body_file, "rb"). Just to be safe. https://www.lua.org/pil/21.2.2.html

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.

7 participants