KSP-CKAN / NetKAN

Metadata files used by the NetKAN/CKAN indexer for KSP
Creative Commons Zero v1.0 Universal
70 stars 337 forks source link

Stable solution to IXSWarpship-Blueshift versioning #9942

Closed HebaruSan closed 5 months ago

HebaruSan commented 5 months ago

Problem

This error persists:

image

Cause

This mod's intended version format is v.X.Y.Z, with a leading dot after the v, but the dot is missing in the most recent version:

https://github.com/Araym-KSP/IXS-Warship-for-Blueshift/releases

image

Typically authors use vX.Y.Z, so normally we'd use a version-editing property to remove the dot, but in this case the omission of the leading period is the exception.

The GitHub releases API fails to return the most recent release in about 0.005% of cases (that's what the message means by "unreliable server"). Instead, it presents the NetKAN bot the release before that as if it was the most recent. There's no way to detect that this has happened, so we need to establish rules that handle it smoothly.

When this glitch happens for this mod, this glitch causes the v.1.0.6 release to be redundantly re-indexed, because v.1.0.6 is considered later than v1.0.7.1 thanks to the dot after its v. We already have an epoch to put these versions in the right order, but that just causes 1:v.1.0.6 to be generated, which is still considered later than 1:v1.0.7.1 due to the dot:

https://github.com/KSP-CKAN/CKAN-meta/tree/master/IXSWarpship-Blueshift

image

This has happened before, and I've just been deleting the extra versions, but if that's all we do, we'll have to keep deleting them ad infinitum:

Changes

Now we use a version-editing property to add the missing dot for this mod's versions. Once we clean up the mess in CKAN-meta, the redundant version won't come back this time.