testflows / TestFlows-GitHub-Hetzner-Runners

Autoscaling Self-Hosted GitHub Actions Runners on Hetzner Cloud.
https://testflows.com
Other
37 stars 3 forks source link

Add support to include UID in server names to allow cost traceability when servers are recycled #17

Closed vzakaznikov closed 8 months ago

vzakaznikov commented 8 months ago

Add support to include UID in server names to allow cost traceability when servers are recycled.

New names could look like:

github-hetzner-runners-<uid>-<workflow_id>-<job_id>

and the <uid> needs to be preserved when the server is moved to be recyclable and it should be propagated to the new server name.

vzakaznikov commented 8 months ago

We also need to include current cost per hour.

github-hetzner-runners-<uid>-<cost_per_hour>-<workflow_id>-<job_id>
vzakaznikov commented 8 months ago

We should probably add a new command to get an approximate cost for a given workflow run or job.

github-hetzner-runners estimate workflow <workflow_id>

and

github-hetzner-runners estimate job <job_id>
vzakaznikov commented 8 months ago

Need to look into GitHub API:

vzakaznikov commented 8 months ago

Server id idea is dropped for now given that it will be hard to track cost even if we keep track of server id. For now only worst and best cases are estimated and this does not require server id.

Cost estimator works by looking at server type and location that is added to the name of the runner.