Proxy GitHub issue API calls to the registry server
thomashoneyman opened this issue · 0 comments
thomashoneyman commented
Now that we have a registry server available at https://registry.purescript.org we can have GitHub jobs initiated via GitHub issues skip running a full build in GitHub Actions and instead proxy them to the registry server. The GitHub job can be a simple script (not even written in PureScript) that sends the request to the registry server, polls for logs, and — upon encountering a new log message — comments on the GitHub issue with that message.
This has a few advantages:
- It allows us to test the registry server more thoroughly, since jobs are actually hitting the server
- It allows us to tear out some of the GitHub-specific code and treat the GitHub issues as just another "package manager"
- It allows us, if we wish, to tear out the Nix setup for GitHub Actions and just use basic built-in functionality to send the request and process results. A node script, for example, would get the job done just fine, and we don't have to bother managing things like caches on GitHub.
- It will be faster since we don't have to build the whole registry-dev repository and load in its Nix dependencies before processing user issues — we can just immediately send off the request.
- It allows us to disable concurrent jobs, manage the number of package sets releases per day, and otherwise control the incoming jobs we have instead of being forced into the independent actions workflows done by GitHub.
We don't have to move entirely off of Actions; we can, for example, still use it to initiate processes like the legacy importer. It's just that the processing itself will happen on the server.