-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
Read json from request BODYFILE instead of BODY. #1731
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for plone-restapi canceled.
|
@mauritsvanrees thanks for creating this Pull Request and helping to improve Plone! TL;DR: Finish pushing changes, pass all other checks, then paste a comment:
To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically. Happy hacking! |
This fixes a regression due to a low Zope form memory limit of 1MB used since Plone 6.0.7. See `CMFPlone issue 3848 <https://github.com/plone/Products.CMFPlone/issues/3848>`_ and `Zope PR 1142 <https://github.com/zopefoundation/Zope/pull/1142>`_.
649b198
to
5bc5145
Compare
@davisagli This might be the good direction, but lots of tests fail. |
@mauritsvanrees Okay, let's go with #1729 for now and come back to this. |
I have pushed a fix which helps: we need to make sure we read the bodyfile from the beginning. |
4 failures, 1 error. Not bad, but still needs some work. And it could mean just a few more test fixes, or it may mean possible breakage in third party code. So even if we go for this, it may mean a major release. I stop for today. |
The "too many open files" error is gone at least. |
@mauritsvanrees Not sure if this is the reason for the remaining test failures, but I think what we need to do is not always seek back to 0, but make sure that we restore the file pointer to the position it was before reading. The ValueDescriptor in Zope does this: https://github.com/zopefoundation/Zope/blob/master/src/ZPublisher/HTTPRequest.py#L1377-1379 |
Passing an empty bodyfile to json.load gives a ValueError.
@davisagli I restore the file position now, but that was not it. Yes, I said I would stop for today. ;-) |
@jenkins-plone-org please run jobs |
Okay, so this needs fixes in Let's go with PR #1729 for now and use that in Plone 6.0.8. It is approved already. If no one merges and releases it, I intend to do so myself Monday, and make 6.0.8 final. Afterwards we can continue on the current PR. |
@mauritsvanrees I merged #1729 and released it with plone.restapi 9.1.2. Feel free to ping me if there is anything else you would like me to do. |
Thanks! |
This fixes a regression due to a low Zope form memory limit of 1MB used since Plone 6.0.7. See
CMFPlone issue 3848 <https://github.com/plone/Products.CMFPlone/issues/3848>
_ andZope PR 1142 <https://github.com/zopefoundation/Zope/pull/1142>
_.Fixes #1730