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

Doesn"t cut request body with size >= 10000 #1635

Merged
merged 5 commits into from Sep 19, 2022
Merged

Conversation

mukhamux
Copy link
Contributor

@mukhamux mukhamux commented Sep 15, 2022

What does this pull request do?

b4edea3 has errors, if body size has more than 10000 bytes, it writes 10000 bytes message to elastic and call await self.app(scope, receive, wrapped_send) with same receive and invalid body,

Comment:

I separate receivers and now, if request has body more than 10000 bytes -> it will send to elastic only 10000 bytes and continue handle as normal request without cutting

last push to master has errors, if body size more than 10000, it writes 10000 message to elastic and call await self.app(scope, receive, wrapped_send) with same receive and invalid body, I separate receivers and now, if request has body more than 10000 -> it will send to elastic only 10000 and continue handle as normal request without cutting
@cla-checker-service
Copy link

cla-checker-service bot commented Sep 15, 2022

💚 CLA has been signed

@github-actions github-actions bot added agent-python community Issues opened by the community triage Issues awaiting triage labels Sep 15, 2022
@apmmachine
Copy link
Collaborator

apmmachine commented Sep 15, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-09-15T19:12:16.839+0000

  • Duration: 32 min 48 sec

Test stats 🧪

Test Results
Failed 0
Passed 4986
Skipped 3338
Total 8324

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /test linters : Run the Python linters only.

  • /test full : Run the full matrix of tests.

  • /test benchmark : Run the APM Agent Python benchmarks tests.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@mukhamux
Copy link
Contributor Author

/test

@mukhamux
Copy link
Contributor Author

/test full

@mukhamux
Copy link
Contributor Author

mukhamux commented Sep 15, 2022

Find strange bug in API related with apm agent is more easier than make a pull request...

@mukhamux
Copy link
Contributor Author

/test benchmark

@mukhamux
Copy link
Contributor Author

run elasticsearch-ci/docs

mukhamux referenced this pull request Sep 15, 2022
* Fixes capture_body flag not being respected and improves performance of body reader.

* Adds a test to ensure non-UTF-8 data is not triggering errors in ignored paths.

* Apply encoding.long_field to starlette body

Also update encoding.long_field to handle bytes

* CHANGELOG

Co-authored-by: Colton Myers <colton.myers@gmail.com>
Co-authored-by: Colton Myers <colton@myers.fm>
@mukhamux mukhamux changed the title feat: doesn"t cut request body with size >= 10000 Doesn"t cut request body with size >= 10000 Sep 15, 2022
@basepi
Copy link
Contributor

basepi commented Sep 15, 2022

/test

@basepi
Copy link
Contributor

basepi commented Sep 15, 2022

Sorry for the confusion, but only people with write access to the repo can trigger the tests. I'll take a look at this today.

@apmmachine
Copy link
Collaborator

apmmachine commented Sep 15, 2022

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (66/66) 💚
Files 100.0% (225/225) 💚
Classes 100.0% (225/225) 💚
Lines 89.807% (17472/19455) 👎 -0.005
Conditionals 77.144% (3193/4139) 👍

@basepi
Copy link
Contributor

basepi commented Sep 15, 2022

/test linters

Copy link
Contributor

@basepi basepi left a comment

Choose a reason for hiding this comment

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

Wow this definitely was broken, thank you for the catch and the fix! 😅

@basepi
Copy link
Contributor

basepi commented Sep 15, 2022

/test linters

@basepi basepi enabled auto-merge (squash) September 15, 2022 18:01
@basepi
Copy link
Contributor

basepi commented Sep 15, 2022

I opened a PR to add a CHANGELOG entry and fix the test: mukhamux#1

@mukhamux
Copy link
Contributor Author

I opened a PR to add a CHANGELOG entry and fix the test: mukhamux#1

merged

@basepi basepi merged commit d529e29 into elastic:main Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-python community Issues opened by the community triage Issues awaiting triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants