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

Refactoring listener app with configurable fallback #3096

Merged
merged 21 commits into from
Dec 8, 2023

Conversation

nikola-jokic
Copy link
Contributor

Listener app has been working well, but navigating through it is can be hard sometimes.

This PR aims to split the listener functionality into multiple testable packages:

  • app: Actual listener app responsible for wiring listener, worker and metrics server together. Reads configuration and instantiates components.
  • config: Shared package between the controller and the listener.
  • listener: Package responsible for communicating with the actions service and calling worker methods when needed
  • worker: Actual k8s worker doing patches on resources
  • metrics: Package exposing metrics server and metrics publishers (interface used to translate actions service message to an actual metric)

This change does not include any new features. It is just a refactor of the original app. In case of an issue, users can set LISTENER_ENTRYPOINT to /github-runnerscaleset-listener in order to use older listener app.

NOTE: Even with the ability to fall back to the previous implementation, please submit issues related to the newer implementation so we can fix them and later have only one listener app.

@nikola-jokic nikola-jokic added the gha-runner-scale-set Related to the gha-runner-scale-set mode label Nov 21, 2023
@Link- Link- self-assigned this Nov 21, 2023
Copy link
Member

@Link- Link- left a comment

Choose a reason for hiding this comment

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

To be continued

cmd/ghalistener/listener/listener.go Outdated Show resolved Hide resolved
main.go Show resolved Hide resolved
Dockerfile Show resolved Hide resolved
Copy link
Member

@Link- Link- left a comment

Choose a reason for hiding this comment

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

Awesome work @nikola-jokic <3 let's get this rolling! 🚀

@nikola-jokic nikola-jokic merged commit b78cadd into master Dec 8, 2023
14 checks passed
@nikola-jokic nikola-jokic deleted the nikola-jokic/listener branch December 8, 2023 12:41
This was referenced Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gha-runner-scale-set Related to the gha-runner-scale-set mode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants