KSP-CKAN / CKAN

The Comprehensive Kerbal Archive Network
https://forum.kerbalspaceprogram.com/index.php?/topic/197082-*
Other
1.98k stars 347 forks source link

NetKAN grabs wrong release from KerbalStuff #214

Closed Starstrider42 closed 9 years ago

Starstrider42 commented 9 years ago

I was testing a CKAN config for Custom Asteroids, and encountered a new bug. Fortunately, it should come up fairly rarely.

When uploading Custom Asteroids to KerbalStuff, I first uploaded the latest version (1.1), then an old version (1.0) for KSP 0.24. Since this made the older version the default release, I asked the KerbalStuff staff to change things on their end. They did so, and if you check the download link target on the KerbalStuff page, you'll see that it indeed leads to 1.1, as it should.

However, when NetKAN tries to download information on Custom Asteroids, it (I presume) goes for the latest version, rather than the KerbalStuff-determined default, and returns data for 1.0.

pjf commented 9 years ago

Oh my. Nicely spotted!

The metadata from KerbalStuff is what the NetKAN uses to inflate files, and it indeed picks the "latest" vesion.

I also see there's a default_version_id which I've not looked at before, which presumably marks what we should be downloading.

Promoting this to a bug. I'll take a stab at it now, as I don't think it'll be too tricky to fix. Thank you so much for spotting this!

pjf commented 9 years ago

Have a working patch for this, but writing tests so it may never return to haunt us again. :)

pjf commented 9 years ago

Fixed in #216 (which will automatically close this issue when merged with master). Many thanks again!