Switch client to scaleset library for the listener and update mocks#4383
Open
nikola-jokic wants to merge 11 commits intomasterfrom
Open
Switch client to scaleset library for the listener and update mocks#4383nikola-jokic wants to merge 11 commits intomasterfrom
nikola-jokic wants to merge 11 commits intomasterfrom
Conversation
Contributor
|
Hello! Thank you for your contribution. Please review our contribution guidelines to understand the project's testing and code conventions. |
Contributor
There was a problem hiding this comment.
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/scalesetlibrary - Switches from
go:generatemockery directives to.mockery.yamlconfiguration - Refactors package structure: renames
workertoscaler, removesapppackage, restructuresmain.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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Start using the scaleset library as a driver for the listener.
Use mockery config instead of
//go:generateway.