Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.59k stars 797 forks source link

Boost: Remove providers from critical css state when requesting generation #38984

Open dilirity opened 3 months ago

dilirity commented 3 months ago

When requesting Cloud CSS, we store the providers in the DB and when the cloud returns CSS, we check if a provider exists in the state and update it. Also - what happens to those WP_Errors? I haven't seen them anywhere.

Do we need to keep a list of providers when we request a generation? It seems like we could drop them from the state and just keep the status and timestamps.

haqadn commented 2 months ago

Is it still relevant, @dilirity ?

dilirity commented 2 months ago

I'm not sure.

This is from the related PR:

Considering all this, I wonder - why do we even store the providers in the DB/state? This only leads to headaches like this. I think we could drop the providers check all together and rely on what the Cloud returns to Boost. Also - we could probably avoid sending the providers list in the first place. Why don't we let the Cloud figure that out? Anyway - this is OOS for this PR, so I've created a ticket, so we can take a look at some point - https://github.com/Automattic/jetpack/issues/38984

At the time, what I wrote made sense. Now I'm not sure. What do you think?