You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an outgrowth of KSP-CKAN/CKAN#2789 (comment). I assume that the initial functionality of the queue-based bot will be identical to NetKAN-bot, so ideas for further improvements should be submitted here for better tracking.
Motivation
When a mod author uploads a new release to SpaceDock for a CKAN-indexed mod, SpaceDock uses the NetKAN-bot's web hooks to inflate that module immediately. This provides quicker indexing for such modules.
For this to work, someone needs to translate from a SpaceDock mod ID to a netkan module identifier. Surprisingly, this is currently done by SpaceDock (I searched for it in vain in our web hooks for a long time)! SpaceDock has an internal web app that searches a local copy of the NetKAN repo for modules matching a given $kref, which are then passed to the actual CKAN web hook:
This architecture is a bit fishy. It means that if we make certain kinds of netkan-related changes to the spec (replace $kref with something else, add an optional suffix to the format for SpaceDock $krefs, add an alternate $kref format that works differently somehow, etc.), the SpaceDock web hook could stop working, and we could not fix it without collaborating with the SpaceDock team.
Suggestion
Add a /update/spacedock/<number> web hook route that searches our own local copy of the NetKAN repo for a matching $kref and inflates it, essentially just like the above. This would better encapsulate the functionality, and it would allow SpaceDock to only worry about the ID numbers that it knows, while the CKAN team would maintain the mapping to identifiers.
The text was updated successfully, but these errors were encountered:
This is an outgrowth of KSP-CKAN/CKAN#2789 (comment). I assume that the initial functionality of the queue-based bot will be identical to NetKAN-bot, so ideas for further improvements should be submitted here for better tracking.
Motivation
When a mod author uploads a new release to SpaceDock for a CKAN-indexed mod, SpaceDock uses the NetKAN-bot's web hooks to inflate that module immediately. This provides quicker indexing for such modules.
For this to work, someone needs to translate from a SpaceDock mod ID to a netkan module identifier. Surprisingly, this is currently done by SpaceDock (I searched for it in vain in our web hooks for a long time)! SpaceDock has an internal web app that searches a local copy of the NetKAN repo for modules matching a given
$kref
, which are then passed to the actual CKAN web hook:https://github.com/KSP-SpaceDock/SpaceDock-Notify/blob/e7c2881d01948b5fc98e06de04df59af3763a23d/app.py#L31-L47
This architecture is a bit fishy. It means that if we make certain kinds of netkan-related changes to the spec (replace
$kref
with something else, add an optional suffix to the format for SpaceDock$kref
s, add an alternate$kref
format that works differently somehow, etc.), the SpaceDock web hook could stop working, and we could not fix it without collaborating with the SpaceDock team.Suggestion
Add a
/update/spacedock/<number>
web hook route that searches our own local copy of the NetKAN repo for a matching$kref
and inflates it, essentially just like the above. This would better encapsulate the functionality, and it would allow SpaceDock to only worry about the ID numbers that it knows, while the CKAN team would maintain the mapping to identifiers.The text was updated successfully, but these errors were encountered: