Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c449ffc50a |
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright GitHub, Inc.
|
||||
Copyright (c) 2025 GitHub
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# GitHub Actions Runner Scale Set Client (Private Preview)
|
||||
# GitHub Actions Runner Scale Set Client (Public Preview)
|
||||
|
||||
> Status: **Private Preview** – While the API is stable, interfaces and examples in this repository may change.
|
||||
> Status: **Public Preview** – While the API is stable, interfaces and examples in this repository may change.
|
||||
|
||||
This repository provides a standalone Go client for the GitHub Actions **Runner Scale Set** APIs. It is extracted from the `actions-runner-controller` project so that platform teams, integrators, and infrastructure providers can build **their own custom autoscaling solutions** for GitHub Actions runners.
|
||||
|
||||
You do *not* need to adopt the full controller (and Kubernetes) to take advantage of scale sets. This package contains all the primitives you need: create/update/delete scale sets, generate just‑in‑time (JIT) runner configs, and manage message sessions.
|
||||
You don't need to adopt the full controller or Kubernetes to take advantage of scale sets. The client supports the same platforms as the GitHub Actions runner, including containers and virtual machines running Windows, Linux, and macOS. This package contains all the primitives you need: create, update, and delete scale sets; generate just-in-time (JIT) runner configs; and manage message sessions.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -126,9 +126,9 @@ type ProxyFunc func(req *http.Request) (*url.URL, error)
|
||||
type SystemInfo struct {
|
||||
// System is the name of the scale set implementation
|
||||
System string `json:"system"`
|
||||
// Version is the version of the client
|
||||
// Version is the version of the controller
|
||||
Version string `json:"version"`
|
||||
// CommitSHA is the git commit SHA of the client
|
||||
// CommitSHA is the git commit SHA of the controller
|
||||
CommitSHA string `json:"commit_sha"`
|
||||
// ScaleSetID is the ID of the scale set
|
||||
ScaleSetID int `json:"scale_set_id"`
|
||||
@@ -222,7 +222,6 @@ type userAgent struct {
|
||||
SystemInfo
|
||||
BuildVersion string `json:"build_version"`
|
||||
BuildCommitSHA string `json:"build_commit_sha"`
|
||||
Kind string `json:"kind"`
|
||||
}
|
||||
|
||||
func (c *Client) newGitHubAPIRequest(ctx context.Context, method, path string, body io.Reader) (*http.Request, error) {
|
||||
|
||||
@@ -137,7 +137,6 @@ func (c *commonClient) setUserAgent() {
|
||||
SystemInfo: c.systemInfo,
|
||||
BuildVersion: buildInfo.version,
|
||||
BuildCommitSHA: buildInfo.commitSHA,
|
||||
Kind: "scaleset",
|
||||
})
|
||||
c.userAgent = string(b)
|
||||
}
|
||||
|
||||
@@ -124,7 +124,6 @@ func TestUserAgent(t *testing.T) {
|
||||
SystemInfo: testSystemInfo,
|
||||
BuildCommitSHA: sha,
|
||||
BuildVersion: version,
|
||||
Kind: "scaleset",
|
||||
}
|
||||
b, err := json.Marshal(wantInfo)
|
||||
require.NoError(t, err, "failed to marshal expected user agent")
|
||||
@@ -145,7 +144,6 @@ func TestUserAgent(t *testing.T) {
|
||||
SystemInfo: userAgentInfo,
|
||||
BuildCommitSHA: sha,
|
||||
BuildVersion: version,
|
||||
Kind: "scaleset",
|
||||
}
|
||||
b, err = json.Marshal(wantInfo)
|
||||
require.NoError(t, err, "failed to marshal expected user agent after SetSystemInfo")
|
||||
|
||||
Reference in New Issue
Block a user