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

Add items_total to linkintegrity endpoint #1636

Merged
merged 17 commits into from Aug 25, 2023
Merged

Conversation

davisagli
Copy link
Sponsor Member

@davisagli davisagli commented May 16, 2023

This will be used by the linkintegrity check when an object is deleted, to add the number of contained items that will be deleted.

It is a backwards-incompatible change, because current versions of volto expect that the result will include items only if there were some linkintegrity breaches.

Also fixes #1511 by adding the missing documentation for this endpoint

@mister-roboto
Copy link

@davisagli 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!

@netlify
Copy link

netlify bot commented May 16, 2023

Deploy Preview for plone-restapi ready!

Name Link
🔨 Latest commit 37c2452
🔍 Latest deploy log https://app.netlify.com/sites/plone-restapi/deploys/64e7b0bdfcb8c100081f6e4c
😎 Deploy Preview https://deploy-preview-1636--plone-restapi.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@davisagli
Copy link
Sponsor Member Author

@jenkins-plone-org please run jobs

@davisagli
Copy link
Sponsor Member Author

@stevepiercy Could you please review the doc updates here?

Copy link
Contributor

@stevepiercy stevepiercy left a comment

Choose a reason for hiding this comment

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

Thank you! One minor style suggestion. Either way, I approve.

docs/source/endpoints/linkintegrity.md Outdated Show resolved Hide resolved
@tisto
Copy link
Sponsor Member

tisto commented Aug 23, 2023

@davisagli am I correct assuming that we just add an "items_total" attribute to the response here? Then I'd say we can merge that and release it as a feature release.

@tisto
Copy link
Sponsor Member

tisto commented Aug 23, 2023

@jenkins-plone-org please run jobs

@tisto tisto mentioned this pull request Aug 23, 2023
14 tasks
@tisto tisto added this to the 9.x.x milestone Aug 24, 2023
@@ -12,6 +12,30 @@ myst:
This upgrade guide lists all breaking changes in `plone.restapi`.
It explains the steps that are needed to upgrade to the latest version.

## Upgrading to `plone.restapi` 9.x
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

@davisagli can you check that what I wrote here is correct?

Copy link
Sponsor Member Author

@davisagli davisagli Aug 25, 2023

Choose a reason for hiding this comment

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

@tisto yes, basically, but one nuance: The endpoint accepts multiple UIDs. Before, objects with no breaches were left out of the result. Now they are always included, so that we can also show how many items are contained. So, the old result might not be an empty list if multiple UIDs were requested (I.e. multiple checkboxes selected to delete in folder contents) and some of them have breaches

Copy link
Sponsor Member

Choose a reason for hiding this comment

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

@davisagli not sure I fully get this. Could you add this to the upgrade guide?

Copy link
Sponsor Member

Choose a reason for hiding this comment

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

@davisagli I merged this PR, feel free to add to main or create a new PR.

@tisto
Copy link
Sponsor Member

tisto commented Aug 25, 2023

@jenkins-plone-org please run jobs

@tisto
Copy link
Sponsor Member

tisto commented Aug 25, 2023

@jenkins-plone-org please run jobs

1 similar comment
@tisto
Copy link
Sponsor Member

tisto commented Aug 25, 2023

@jenkins-plone-org please run jobs

@tisto tisto merged commit 1c08b5c into main Aug 25, 2023
17 checks passed
@tisto tisto deleted the linkintegrity-items-total branch August 25, 2023 16:06
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.

linkintegrity documentation missing a response file
5 participants