Marketplace: Paid plugins are not running sync actions
When you install a paid plugin, it does not run sync actions on Jetpack but it runs on free plugins.
P2 post: pb5gDS-1L1-p2
Possible solutions: pb5gDS-1L1-p2#comment-2685
Steps to reproduce
In calypso, it can only be reproduced with the Sensei Pro banner.
- Install
Sensei LMSplugin. - On load
/plugins, you will see a banner at the top of the plugins page (screenshot) - Install
Sensei Proplugin. - You should not see the banner but it shows when sync fails.
Hey @cpapazoglou. I tried your suggestion but the wp activate command runs perfectly but still does not sync and there is no CLI command to sync just whatever I want.
One solution is to run wp jetpack sync start and sync the jetpack site after a plugin is installed/uninstalled
@lupus2k is there WIP diff where can explore the initial suggestion? I feel that wp jetpack sync start might not be so performant especially in big sites. @fgiannar does wp jetpack sync start run incrementally?
@cpapazoglou I'm not sure what your suggestion was :)
Running wp jetpack sync start, aka performing a Full Sync, is indeed very expensive and we'd still miss any events triggered in WPCOM by syncing the individual jetpack_plugin_installed and deleted_plugin actions (eg Activity Log).
is there WIP diff where can explore the initial suggestion?
💯
@cpapazoglou No WIP diff yet, I tested your suggestion but nothing changes because both actions are running without problem (plugin activation / plugin installation), the problem es none of these actions calls for a sync.
My solution is to make a third action to call for a sync but there is no action to sync only the selected plugin.
I enter on parental leave, I copy my team to take a look into this @Automattic/explorers
The marketplace_post_transfer_manage_software runs a WP CLI command (via SSH) to activate the plugin. In this command we skip all already installed plugins from loading (except the required) so that there is no conflict while activating the plugin. The idea here is avoiding to skip Jetpack, so that the sync code is loaded and runs when the plugin is activated as suggested here pb5gDS-1L1-p2#comment-2686.
Let's try that in a WIP diff to see if it's working or not.
From planning: Add another post-transfer manage_software async job. Timebox investigation: half a day, or remove from sprint.
From backlog grooming: alternatively, we could use a workaround hack using front-end plugin data. See p1658813074856179/1658765131.121169-slack-C03FE3T479R
From same thread: Wondering if these planned changes have an impact on this as it will mess with the way plugins get installed / activated and the timing of it. pdh6GB-1FC-p2
Might be able to avoid the workaround but need more time to investigate.
Linking the debug issue https://github.com/Automattic/wp-calypso/issues/23565#issuecomment-1198952641
And the 20% time p2 pb5gDS-1Vj-p2 about D85060-code and D85066-code