-
Notifications
You must be signed in to change notification settings - Fork 1
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
Poll GitHub API instead of using webhooks #14
Comments
It would certainly be possible to poll Github periodically, but I would be concerned about running into API rate limits unless we allow rather high latency between a CI job triggering and slurmactiond launching a job. Have you considered running the reverse proxy on a separate, publicly reachable server and forwarding a port to the SLURM headnode / slurmactiond host through your local network? |
I checked the documentation, unauthenticated fetches are limited to 60 per hour, authenticated fetches to 5000 per hour, and authenticated fetches with Enterprise Cloud to 15000 per hour. As you need 3 fetches per poll, in the worst case you are limited to 20 fetches per hour (every 3 minutes), which sounds reasonable.
I have to check this option, but I'm afraid it may not be possible in my case. |
I took a look at the code again this afternoon and doing what you propose is unfortunately a bit more complex than adding a timer loop around the update function (which I hoped could suffice), because we also need to know about jobs completing / failing, not just new ones arriving. Unfortunately I do not have the capacity at the moment to make this happen. Nonetheless, having a polling feature would be neat even when a webhook is present, because webhook updates can spuriously drop due to a bad network connection. For these setups, a polling period of ~10 minutes or similar would suffice. For reference: slurmactiond maintains a |
Extending an event-driven paradigm with a polled-state one is not trivial indeed. I guess your current |
This project sounds very interesting for the needs of my lab. Unfortunately, opening a port plus having a reverse-proxy running on a machine that submits SLURM jobs is not really an option for me. As an alternative to using a webhook, would it be possible to poll the GitHub API instead?
I dug a little bit, sounds like you get the worflows of a repository with:
then you get the latest runs of a workflow with:
filter the queuing runs, then you get the jobs of a run with:
filter the self-hosted jobs and you get the expected labels for the runner to spawn.
I'd love to contribute to this, but I'm not familiar with Rust.
The text was updated successfully, but these errors were encountered: