-
Notifications
You must be signed in to change notification settings - Fork 6
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
Handle multiple download URLs per module #306
Conversation
9e54d4b
to
323c842
Compare
I don't know what's wrong with the Coverage check, but it doesn't look like it's related to these changes. I meant to push 75acc13 to this branch but accidentally put it on master instead. 😳 |
4f58f18
to
0e76896
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really only some minor feedback, looks like the coverage action is currently a bit busted. It is actually reporting the coverage, but maybe GitHub have changed something in terms of scoping the permissions.
If you'd like I can add some branch protection rules? We can still override them when required, but gives the ability to avoid accidentally pushing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks @HebaruSan !
We can fix the coverage separately, it's failing for issues unrelated to this PR |
Motivation
As of KSP-CKAN/CKAN#3877 and the next release of the CKAN client, it will be possible for the
download
property to contain a list of multiple URLs. A few places in the Infra assume it will be a single value.Changes
Ckan.download
property is updated to preserve backwards compatibility by always returning the first URL if there are multiple. This will ensure that all old code using this property will continue to work as previously. For example, theMirrorer
doesn't really need to check multiple URLs to do its job, so it will continue using this property.Ckan.downloads
property is added that always returns a list, which includes the archive.org fallback URLs for modules that have them. TheDownloadCounter
is updated to use this property to count and sum all of the downloads for modules that have multiple URLs.