Skip to content
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

feat(runner): implement runner registration with gocast #1490

Merged
merged 7 commits into from
Feb 5, 2025

Conversation

joschahenningsen
Copy link
Member

@joschahenningsen joschahenningsen commented Feb 2, 2025

Motivation and Context

As discussed, let's break down further development of the runner into smaller independent PRs.

Description

This PR implements the registration of the runner with gocast. This is achieved by:

  • Cleaning up the gRPC services in runner.proto (FromRunner is nowRunnerManagerService)
  • Creating a new package, runner_manager in gocast, which implements RunnerManagerService -> gocast is the runners manager
  • Creating a new database model Runner with the fields hostname and port. The hostname is the primary key, on insert conflicts, the port is updated.
  • On startup, the runner connects to this service to make itself known to gocast.

Steps for Testing

  1. start gocast
  2. start runner
  3. observe logs
  4. check database for inserted runner.

Screenshots

image

grafik

@joschahenningsen joschahenningsen self-assigned this Feb 2, 2025
@joschahenningsen joschahenningsen marked this pull request as draft February 2, 2025 12:53
@joschahenningsen joschahenningsen force-pushed the feat/runner-registration-with-gocast branch from 56cd658 to 244cc5e Compare February 2, 2025 15:07
@joschahenningsen joschahenningsen force-pushed the feat/runner-registration-with-gocast branch from a0e31ed to 229dd3f Compare February 2, 2025 15:09
@joschahenningsen joschahenningsen marked this pull request as ready for review February 2, 2025 15:12
@joschahenningsen joschahenningsen force-pushed the feat/runner-registration-with-gocast branch from 0e7d164 to edd1a89 Compare February 4, 2025 16:19
Copy link
Member

@carlobortolan carlobortolan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two small nits, but everything else looks good to me 👍
Tested the Runner registration locally and it works as expected (the deregistration doesn't work yet, but that's intended, right?)

runner/runner.proto Outdated Show resolved Hide resolved
runner/serverhandler.go Show resolved Hide resolved
@joschahenningsen
Copy link
Member Author

the deregistration doesn't work yet, but that's intended, right?

There is no deregistration, when we get to task scheduling on the runner, the last heartbeat should be considered to determine whether a runner is available. Heartbeat is not implemented yet though :D

@carlobortolan
Copy link
Member

the deregistration doesn't work yet, but that's intended, right?

There is no deregistration, when we get to task scheduling on the runner, the last heartbeat should be considered to determine whether a runner is available. Heartbeat is not implemented yet though :D

Ah ok; thanks for clarifying this 👍

@joschahenningsen joschahenningsen merged commit 738c22a into dev Feb 5, 2025
9 checks passed
@joschahenningsen joschahenningsen deleted the feat/runner-registration-with-gocast branch February 5, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants