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

Oca port from 16.0 to 17.0 pr 440 443 442 #460

Merged

Conversation

lmignon
Copy link
Contributor

@lmignon lmignon commented Oct 3, 2024

No description provided.

lmignon and others added 7 commits October 3, 2024 08:20
…ith body content.

In case of retry we must ensure that the stream pass to the Fastapi application is reset to the beginning to be sure it can be consumed again. Unfortunately , the stream object from the werkzeug request is not always seekable. In such a case, we wrap the stream into a new SeekableStream object that it become possible to reset the stream at the begining without having to read the stream first into memory.
These minimal versions ensure that the retrying mechanism from odoo is working fine with the way the werkezeug request is pass from odoo to the fastapi app.
The use of a BytesIO in place of our specialized SeekableStream class to keep the input stream in case we need to process the request again due to a retryable error outperforms both in terms of speed and memory consumption.

see OCA#440 (comment) for more info.
@lmignon lmignon force-pushed the oca-port-from-16.0-to-17.0-pr-440-443-442 branch from 5f231e7 to c056a16 Compare October 3, 2024 06:37
@lmignon
Copy link
Contributor Author

lmignon commented Oct 3, 2024

/ocabot merge major

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 17.0-ocabot-merge-pr-460-by-lmignon-bump-major, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 116f44a into OCA:17.0 Oct 3, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at cdfaa31. Thanks a lot for contributing to OCA. ❤️

@lmignon lmignon deleted the oca-port-from-16.0-to-17.0-pr-440-443-442 branch October 3, 2024 06:44
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.

4 participants