GitHub download fallbacks for applicable mods #125
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In KSP-CKAN/CKAN#3877 we added the ability to list multiple download hosts per mod. This was released in CKAN v1.34.0 about 17 days ago. KSP-CKAN/NetKAN#9882 was the first usage of this about 15 days ago, and so far there have been no reports of problems.
Now all KSP2 mods that have GitHub repos with releases with assets have both SpaceDock and GitHub downloads listed. One mod that formerly only had a GitHub link now has a SpaceDock link as well. In all cases the GItHub section is listed before SpaceDock to account for SpaceDock's lower reliability and typically slower download speeds.
x_version_edit
is used to create consistent version strings as needed (typically to remove av
prefix on GitHub that is absent from SpaceDock).x_netkan_override
is used to simulate the current value of SpaceDock's game version compatibility field for GitHub as needed. I think we should make this unnecessary by updatingnetkan.exe
to merge game versions more intelligently, but I wanted to get this set up with the current code first. An alternative approach would be to remove the$vref
from the GitHub section, but this isn't great practice and would generate warnings aboutswinfo.json
existing without a$vref
.These mods have inconsistent latest versions between the two hosts, which causes inflation to fail or trip the auto-epoch logic, so they're omitted:
HUMANS
,IWishTheyMadeUICustomizable
,K2D2
,KerbalView
,LazyOrbitBoosted
,MicroEngineer
,NodeManager
,SORRY
,ShowKSP2Events
,CustomFlags
,Starhopper
,SkipSplashScreen
,WASDForVAB
.SORRY
andStarhopper
are not included here because theirswinfo.json
files' invalidversion_check
links cause inflation errors.Note that the
spec_version
is updated, so if users complain about not seeing the latest updates for any of these mods, make sure they're on the latest CKAN.