swiftly icon indicating copy to clipboard operation
swiftly copied to clipboard

Drop usage of GitHub API

Open patrickfreed opened this issue 1 year ago • 5 comments

#153 updates swiftly to use swift.org-based APIs for most queries, but it still falls back to GitHub for pre-6.0 snapshots. I think we should consider just dropping GitHub API support altogether so that we don't have to maintain two different ways of getting toolchain information. Of course, the cost would be missing information older snapshots, but in my opinion that's worth for the simplification / consolidation it would provide. It's also possible (is it?) that swift.org could start returning results for those older snapshots in the future.

patrickfreed avatar Aug 23 '24 04:08 patrickfreed

Since we control Swift.org I don't see why we can't add that info, it should be there in the data

0xTim avatar Aug 23 '24 11:08 0xTim

Do we control the bot that updates that data though? I think that's more where the issue is, at least for 5.0 snapshots. For older branches, yeah we could just fill in that data once ourselves.

patrickfreed avatar Aug 26 '24 14:08 patrickfreed

Do you have a link to the API? I can find out

0xTim avatar Aug 26 '24 15:08 0xTim

How back does swiftly support dev snapshots? I don't think people should be using dev snapshots after the first release of the given version.

For example, you would need to only add dir for each version. https://github.com/swiftlang/swift-org-website/tree/main/api/v1/install/dev

shahmishal avatar Aug 27 '24 04:08 shahmishal

Also, yes please 😅

Run swiftly install "${REQUESTED_TOOLCHAIN}"
Error: received status "403 Forbidden" when reaching https://api.github.com/repos/apple/swift/releases?per_page=100&page=1: {"message":"API rate limit exceeded for 20.253.152.177. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"}

0xTim avatar Sep 03 '24 12:09 0xTim

The GitHub API has been dropped in swiftly. Closing this issue.

cmcgee1024 avatar Nov 25 '24 15:11 cmcgee1024