-
Notifications
You must be signed in to change notification settings - Fork 18
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
Manifest fetching sometimes fails on new plugin release #1297
Comments
I have been able to reproduce this locally now by releasing a plugin and then immediately (within less than 5 seconds) fetching it. Rerunning the |
Based on the behaviour we're seeing I'm pretty confident this is a race condition with PyPI and occurs when a plugin has been updated, but the plugin's project JSON doesn't yet contain the latest version in the I think it's possible we're not really seeing this error in In terms of how we can address this, there are a couple of options. I'll list them here for discussion:
{
"StartAt": "Delay",
"Comment": "Invoke Lambda with delay",
"States": {
"Delay": {
"Type": "Wait",
"Seconds": 60,
"Next": "Invoke Plugins Lambda"
},
"Invoke Plugins Lambda": {
"Type": "Task",
"Resource": "arn:aws:states:::lambda:invoke",
"Parameters": {
"FunctionName": "arn:aws:lambda:us-east-1:123456789012:function:plugins",
"InvocationType": "Event",
},
"End": true
}
}
}
Option 1 is likely to work, but introduces an additional aws component and does not guarantee we can retrieve the manifest (if for whatever reason the delay in availability is longer than the delay we use). Option 2 introduces some complexity and will require rerunning the plugins lambda. However, it doesn't introduce external dependencies. Since we're only retrying once, it's technically possible we still end up missing the manifest. Option 3 should be very simple to implement, and guarantees eventually the manifest is populated. However it introduces a dependency on @manasaV3 @richaagarwal curious on your thoughts on the above options or any options I may not have considered! |
Thank you for such a detailed write-up of solution options. I like the setup of us reacting to the error and fixing it, over us reprocessing periodically. What are your thoughts on using an SQS for triggering reprocessing? We could add an SQS that triggers the lambda instead of directly invoking the lambda as we currently do. We could configure the SQS to have a |
Great, even better than a step function. Such a configuration for SQS sounds like exactly what we need. Thanks for the suggestion @manasaV3 |
Description
When a new plugin is released, fetching the manifest sometimes fails due to this line in the
npe2
fetch code.Because we never retry fetching a manifest, these plugins must have their manifests manually reprocessed. Currently this is done via this script.
This doesn't occur for all new releases (see for example MouseCHD) which was recently released and had its manifest processed correctly.
This also doesn't seem to happen (at least as frequently), in
npe2api
which alsonpe2 fetch
. When this error was first discovered, there were some instances of this error logged in this errors file, but I have not been able to find recent instances of this happening innpe2api
, even for plugins that failed for the napari hub. This could be becausenpe2api
indexes every 10 minutes, rather than every 5 (giving the PyPI API time to settle?), or could be due to a quirk where the "latest" plugin version is available in search results on PyPI before its dedicated version json is available?Expected Results
A fix for this issue would mean that all new plugin releases have their manifest processed.
The text was updated successfully, but these errors were encountered: