Skip to content

Remove actions client#4405

Merged
nikola-jokic merged 5 commits intomasterfrom
nikola-jokic/remove-actions-client
Mar 16, 2026
Merged

Remove actions client#4405
nikola-jokic merged 5 commits intomasterfrom
nikola-jokic/remove-actions-client

Conversation

@nikola-jokic
Copy link
Collaborator

No description provided.

@nikola-jokic nikola-jokic added the gha-runner-scale-set Related to the gha-runner-scale-set mode label Mar 13, 2026
Copilot AI review requested due to automatic review settings March 13, 2026 14: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 removes the github/actions client package, which previously contained the HTTP client for interacting with the GitHub Actions service, and replaces it with the external github.com/actions/scaleset package. The github/actions package is reduced to only contain the GitHubConfig URL parsing logic (in the new actions.go file), which is still used across the codebase for metrics labels and client configuration.

Changes:

  • Deletes the entire Actions HTTP client (Client, MultiClient, ActionsService interface, types, errors, mocks, fakes, test helpers, test data, and tests) from github/actions/.
  • Replaces error handling in controllers to use scaleset.JobStillRunningError and scaleset.RunnerExistsError sentinel errors instead of inspecting ActionsError status codes and exception names.
  • Retains only GitHubConfig URL parsing utilities in the new github/actions/actions.go.

Reviewed changes

Copilot reviewed 34 out of 35 changed files in this pull request and generated no comments.

Show a summary per file
File Description
github/actions/actions.go New file retaining GitHubConfig and ParseGitHubConfigFromURL
github/actions/client.go Deleted: entire Actions HTTP client and service interface
github/actions/multi_client.go Deleted: multi-client caching layer
github/actions/types.go Deleted: request/response types
github/actions/errors.go Deleted: error types
github/actions/sessionservice.go Deleted: SessionService interface
github/actions/mocks_test.go Deleted: generated mocks
github/actions/fake/client.go Deleted: fake client implementation
github/actions/fake/multi_client.go Deleted: fake multi-client
github/actions/testserver/server.go Deleted: test server helper (still referenced elsewhere)
github/actions/testdata/* Deleted: test certificates (still referenced elsewhere)
github/actions/*_test.go (multiple) Deleted: all tests for the removed code
controllers/.../ephemeralrunnerset_controller.go Simplified error handling using scaleset errors, removed ActionsClient field
controllers/.../ephemeralrunner_controller.go Simplified error handling using scaleset errors
Comments suppressed due to low confidence (2)

github/actions/testserver/server.go:1

  • The github/actions/testserver package is deleted in this PR, but it is still imported and used in:
  • apis/actions.github.com/v1alpha1/tls_config_test.go (line 12)
  • cmd/ghalistener/config/config_client_test.go (line 15)

These test files also reference github/actions/testdata files (certificates and keys) that are also being deleted. This will cause compilation failures in those test files.
github/actions/mocks_test.go:1

  • The .mockery.yaml still references github.com/actions/actions-runner-controller/github/actions package with ActionsService and SessionService interfaces (lines 12-20), but both the ActionsService interface (from client.go) and SessionService interface (from sessionservice.go) have been deleted in this PR. The generated mock file mocks_test.go is also being deleted. This stale configuration will cause mockery to fail when run. These entries should be removed from .mockery.yaml.

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

You can also share your feedback on Copilot code review. Take the survey.

@nikola-jokic nikola-jokic force-pushed the nikola-jokic/remove-actions-client branch from cae3aea to 052ac52 Compare March 16, 2026 09:12
@nikola-jokic nikola-jokic merged commit dc7c858 into master Mar 16, 2026
66 of 71 checks passed
@nikola-jokic nikola-jokic deleted the nikola-jokic/remove-actions-client branch March 16, 2026 13:39
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.

3 participants