Skip to content

Conversation

@Marc-Roig
Copy link
Contributor

What does it do?

We introduced a regression after the relations performance feature.

We were not populating relation fields when creating/updating/... an entity, and now the content manager handles relations fields in a separate (and paginated) way.

A side effect of that is the webhooks are not receiving populated relations, and this PR aims to provide a solution for it.

We introduced a configuration variable so, by default, webhooks receive populated relations. But for performance reasons we let users disable this configuration.

We should also recommend to disable it.

Why is it needed?

To fix the regression and let users disable this behaviour to get increased performance on the Content Manager when creating,updating,deleting entities.

Related issue(s)/PR(s)

strapi/strapi#15363

@Marc-Roig Marc-Roig requested review from petersg83 and pwizla January 19, 2023 14:09
@vercel
Copy link

vercel bot commented Jan 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
documentation ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 6, 2023 at 4:58PM (UTC)
documentation-docu-mvp ❌ Failed (Inspect) Feb 6, 2023 at 4:58PM (UTC)

@pwizla
Copy link
Collaborator

pwizla commented Jan 19, 2023

LGTM minus the formatting change. Thanks, Marc!
By next major release, you mean Strapi v5, right?

…ons/required/server.md

Co-authored-by: Pierre Wizla <pwizla@users.noreply.github.com>
@Marc-Roig
Copy link
Contributor Author

LGTM minus the formatting change. Thanks, Marc! By next major release, you mean Strapi v5, right?

yes :), we plan on removing / setting to false by default in v5

@pwizla
Copy link
Collaborator

pwizla commented Jan 20, 2023

LGTM minus the formatting change. Thanks, Marc! By next major release, you mean Strapi v5, right?

yes :), we plan on removing / setting to false by default in v5

OK, thanks. So I suggest we explicitly mention Strapi v5 :)

@Marc-Roig
Copy link
Contributor Author

LGTM minus the formatting change. Thanks, Marc! By next major release, you mean Strapi v5, right?

yes :), we plan on removing / setting to false by default in v5

OK, thanks. So I suggest we explicitly mention Strapi v5 :)

We discussed about this and finally we agreed we will not be removing this in v5, as it can be used in other features as Audit logs. So I removed that bit of text :D

@Marc-Roig
Copy link
Contributor Author

I added a migration guide for people to know we encourage to disable having populated relations in the webhooks.
Disabling will increase API and Content manager performance.

@Marc-Roig Marc-Roig requested a review from pwizla January 25, 2023 14:36
Copy link
Collaborator

@pwizla pwizla left a comment

Choose a reason for hiding this comment

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

Thanks, @Marc-Roig.
I guess this should be merged for the v4.6 release? (we're releasing in a few minutes now)

Edit: Nevermind, I've just seen the corresponding strapi/strapi PR assigned to v4.6.1.

@pwizla pwizla added this to the 4.6.0 milestone Jan 25, 2023
@pwizla pwizla self-assigned this Jan 25, 2023
@pwizla pwizla added the internal PRs created by the Strapi core team label Jan 25, 2023
@pwizla pwizla modified the milestones: 4.6.0, 4.6.1 Jan 25, 2023
Marc-Roig and others added 3 commits February 1, 2023 12:24
…ons/required/server.md

Co-authored-by: Pierre Noël <petersg83@users.noreply.github.com>
…uides/v4/migration-guide-4.5.1-to-4.6.1.md

Co-authored-by: Pierre Noël <petersg83@users.noreply.github.com>
…uides/v4/migration-guide-4.5.1-to-4.6.1.md

Co-authored-by: Pierre Noël <petersg83@users.noreply.github.com>
…uides/v4/migration-guide-4.5.1-to-4.6.1.md

Co-authored-by: Pierre Noël <petersg83@users.noreply.github.com>
* move sizeLimit one level above in upload provider

* add sizeLimit deprecation warning

* minor change

* minor change

* checkFileSize upload provider

* Update docs/developer-docs/latest/update-migration-guides/migration-guides/v4/migration-guide-4.3.x-to-4.4.x.md

Co-authored-by: Pierre Wizla <pwizla@users.noreply.github.com>

* Update docs/developer-docs/latest/update-migration-guides/migration-guides/v4/migration-guide-4.3.x-to-4.4.x.md

Co-authored-by: Pierre Wizla <pwizla@users.noreply.github.com>

* Update docs/developer-docs/latest/update-migration-guides/migration-guides/v4/migration-guide-4.3.x-to-4.4.x.md

Co-authored-by: Pierre Wizla <pwizla@users.noreply.github.com>

* Update docs/developer-docs/latest/update-migration-guides/migration-guides/v4/migration-guide-4.3.x-to-4.4.x.md

Co-authored-by: Pierre Wizla <pwizla@users.noreply.github.com>

* Update docs/developer-docs/latest/update-migration-guides/migration-guides/v4/migration-guide-4.3.x-to-4.4.x.md

Co-authored-by: Pierre Wizla <pwizla@users.noreply.github.com>

* Update docs/developer-docs/latest/update-migration-guides/migration-guides/v4/migration-guide-4.3.x-to-4.4.x.md

Co-authored-by: Pierre Wizla <pwizla@users.noreply.github.com>

* Update docs/developer-docs/latest/update-migration-guides/migration-guides/v4/migration-guide-4.3.x-to-4.4.x.md

Co-authored-by: Pierre Wizla <pwizla@users.noreply.github.com>

* move migration steps to 4.5.1 to 4.6.1

---------

Co-authored-by: Pierre Wizla <pwizla@users.noreply.github.com>
@Marc-Roig Marc-Roig dismissed petersg83’s stale review February 6, 2023 16:57

Proposed changes are implemented and we release this on wednesday :)

@Marc-Roig Marc-Roig merged commit 8dbed9b into main Feb 6, 2023
@Marc-Roig Marc-Roig deleted the dev/webhook-populated-relations branch February 6, 2023 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal PRs created by the Strapi core team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants