Skip to content

Comments

Switch client to scaleset library for the listener and update mocks#4383

Open
nikola-jokic wants to merge 11 commits intomasterfrom
nikola-jokic/scaleset-listener
Open

Switch client to scaleset library for the listener and update mocks#4383
nikola-jokic wants to merge 11 commits intomasterfrom
nikola-jokic/scaleset-listener

Conversation

@nikola-jokic
Copy link
Collaborator

Start using the scaleset library as a driver for the listener.
Use mockery config instead of //go:generate way.

@nikola-jokic nikola-jokic added the gha-runner-scale-set Related to the gha-runner-scale-set mode label Feb 20, 2026
Copilot AI review requested due to automatic review settings February 20, 2026 23:28
@github-actions
Copy link
Contributor

Hello! Thank you for your contribution.

Please review our contribution guidelines to understand the project's testing and code conventions.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the listener to use the external scaleset library from https://github.com/actions/scaleset and updates the mock generation strategy from inline //go:generate directives to a centralized .mockery.yaml configuration file.

Changes:

  • Migrates from internal actions client to external github.com/actions/scaleset library
  • Switches from go:generate mockery directives to .mockery.yaml configuration
  • Refactors package structure: renames worker to scaler, removes app package, restructures main.go

Reviewed changes

Copilot reviewed 31 out of 32 changed files in this pull request and generated no comments.

Show a summary per file
File Description
go.mod, go.sum Adds scaleset library dependency and updates Go to 1.25.3
.mockery.yaml Adds centralized mockery configuration for mock generation
github/actions/*.go Removes //go:generate directives for mocks
github/actions/mocks_test.go New auto-generated test mocks using mockery
cmd/ghalistener/scaler/ Renamed from worker package, updated to use scaleset library
cmd/ghalistener/main.go Refactored to directly initialize components instead of using app package
cmd/ghalistener/config/config.go Updated to use slog logger and scaleset client, renamed RunnerScaleSetId to RunnerScaleSetID
cmd/ghalistener/metrics/ Updated to use slog logger and scaleset types, renamed Publisher to Recorder
cmd/ghalistener/app/ Deleted - functionality moved to main.go
cmd/ghalistener/listener/ Deleted - replaced by scaleset library
controllers/actions.github.com/resourcebuilder.go Updated field reference from RunnerScaleSetId to RunnerScaleSetID
Comments suppressed due to low confidence (1)

cmd/ghalistener/scaler/scaler.go:246

  • Typo in the TODO comment: "MinRunenrs" should be "MinRunners".

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

1 participant