Skip to content

Add a test to show that when PATCHing an object with current data, doesn't fire any modification events#2028

Open
erral wants to merge 6 commits into
mainfrom
fix-image-scale-bloat
Open

Add a test to show that when PATCHing an object with current data, doesn't fire any modification events#2028
erral wants to merge 6 commits into
mainfrom
fix-image-scale-bloat

Conversation

@erral

@erral erral commented Jun 25, 2026

Copy link
Copy Markdown
Member
  • I signed and returned the Plone Contributor Agreement, and received and accepted an invitation to join a team in the Plone GitHub organization.
  • I verified there aren't any other open pull requests for the same change.
  • I followed the guidelines in Contributing to Plone.
  • I successfully ran code quality checks on my changes locally.
  • I successfully ran tests on my changes locally.
  • If needed, I added new tests for my changes.
  • If needed, I added documentation for my changes.
  • I included a change log entry in my commits.

See plone/plone.namedfile#216 and plone/plone.scale#148 and related PRs.

We are using the REST API to import content to a given site.

When importing the lead image of a content, we have seen that our site's Data.fs is growing and growing.

We have traced this down to plone.namedfile lacking a __eq__ method, which is to be used when comparing field value equality before setting the content

This test shows that no modification events are fired when trying to PATCH a image field with the same image.

The tests should fail, but pass when run together with plone/plone.namedfile#216 in Jenkins

@mister-roboto

Copy link
Copy Markdown

@erral thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants