Flow-Launcher / Flow.Launcher.PluginsManifest

Community-made plugins and submissions
MIT License
38 stars 109 forks source link

CDN providers not syncing plugin manifest as expected #400

Open Or1g3n opened 1 month ago

Or1g3n commented 1 month ago

Per the ReadMe, "Flow downloads the plugins manifest file from various CDN providers, so when your new plugin appears is dependant on when these providers next sync the updated file, and this can be anywhere from one to three hours.

Every three hours the CI in this repository will check for new updates from plugins and automatically update them to the latest version."

The CDN providers do not appear to be syncing as expected. My plugin was updated a week ago but the Flow-Launcher website is still showing the old version of the plugin which currently points to an archived repo: https://www.flowlauncher.com/docs/#/plugins

After inspecting the page, it appears this is the cdn url that is pulling the information. Clicking the link below and inspecting the JSON output shows the outdated version: https://cdn.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@plugin_api_v2/plugins.json

This issue appears to be intermittent as sometimes it randomly shows the correct plugin information (perhaps they have multiple servers and not all of them are in sync).

The point

Wanted to inform of this issue as plugin updates are not being synced within the expected 1-3 hr window. It has been 5 days and cdn providers appear to not have synced fully. In my case its a bit problematic, as the outdated version of the plugin points to an archived repo so I don't want users to think the plugin is no longer maintained.

Or1g3n commented 1 month ago

I checked this morning and the manifest was showing correctly. However, it is now showing the outdated manifest again (see image). So if I had to guess, it would seem the CDN provider has multiple servers on some type of load balancer and for some reason not all of the servers are in sync (sometimes the manifest shows latest information and other times it's showing the manifest over a week ago).

image

jjw24 commented 1 month ago

Thank you for the thorough investigation and write up. I don't know if that's something within our control, likely not, but the way I see minimising this issue is probably implement a mechanism to check GitHub connection first before falling to the CDN alternatives, at least some users who have no issue connecting to GitHub will be able to get the latest updates sooner. At the moment iirc the code downloads the manifest from whichever endpoint returns the fastest, but does not guarantee the latest manifest at all.

Or1g3n commented 1 month ago

Very interesting. Prioritizing GitHub seems like a good option to minimize the issue. I will continue checking randomly each day and post back if it appears that the manifest is stable (or at least reliably showing a version that is no longer from a week ago), this way we can at least document how long it took for the CDN servers to fully sync.

Or1g3n commented 1 month ago

FYI, I have been periodically checking throughout the day, and using Todos plugin as a reference point, the manifest consistently flip flops between 3.06 (latest - released yesterday) and 3.05 (released 3 days ago). So at least the version from 8 days ago which was pointing to the archived repo is no longer showing up. So it would appear that in current state, it takes several days (up to a week) for CDN servers to fully sync.

jjw24 commented 1 month ago

Thank you for the observation, perhaps if you could update readme to fix up the time period until we get around to addressing this issue.

Or1g3n commented 1 month ago

@jjw24 Submitted pull request for update to readme.md which clarifies expected sync time for plugin manifest. Please edit as needed; wasn't sure if you also wanted to mention that efforts are being made to improve sync time. https://github.com/Flow-Launcher/Flow.Launcher.PluginsManifest/pull/401

Or1g3n commented 1 month ago

I investigated this issue a bit further and it appears that one out of the 4 providers is more less consistently the problem child.

Below are the four providers based on the FlowLauncher PluginManifest.cs file: image

Using clipboard+ as a test case given its recent update, below are the responses from each provider: https://[raw.githubusercontent.com/Flow-Launcher/Flow.Launcher.PluginsManifest/plugin_api_v2/plugins.json](https://raw.githubusercontent.com/Flow-Launcher/Flow.Launcher.PluginsManifest/plugin_api_v2/plugins.json) image

https://[gcore.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@plugin_api_v2/plugins.json](https://gcore.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@plugin_api_v2/plugins.json): image

https://[fastly.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@plugin_api_v2/plugins.json](https://fastly.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@plugin_api_v2/plugins.json): image

https://[cdn.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@plugin_api_v2/plugins.json](https://cdn.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@plugin_api_v2/plugins.json): image

As you can see, cdn.jsdelivr.net is the only provider not in sync with GitHub. Based on past testing (see original post), this is the same url that was outdated. Not sure if its within your control to determine why that particular server is consistently lagging, but perhaps a viable solution would be to deprioritize it amongst the 4 options.

jjw24 commented 1 month ago

Happy to deprioritise cdn.jsdelivr.net also.