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

CDN providers not syncing plugin manifest as expected #400

Open
Or1g3n opened this issue Sep 28, 2024 · 8 comments
Open

CDN providers not syncing plugin manifest as expected #400

Or1g3n opened this issue Sep 28, 2024 · 8 comments

Comments

@Or1g3n
Copy link
Contributor

Or1g3n commented Sep 28, 2024

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
Copy link
Contributor Author

Or1g3n commented Sep 29, 2024

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
Copy link
Member

jjw24 commented Sep 30, 2024

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
Copy link
Contributor Author

Or1g3n commented Sep 30, 2024

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
Copy link
Contributor Author

Or1g3n commented Oct 1, 2024

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
Copy link
Member

jjw24 commented Oct 1, 2024

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
Copy link
Contributor Author

Or1g3n commented Oct 1, 2024

@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.
#401

@Or1g3n
Copy link
Contributor Author

Or1g3n commented Oct 12, 2024

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
image

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:
image

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
Copy link
Member

jjw24 commented Oct 17, 2024

Happy to deprioritise cdn.jsdelivr.net also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants