mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-10 11:41:27 +00:00
Compare commits
6 Commits
gha-runner
...
update-run
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6d4d2c027 | ||
|
|
96d1bbcf2f | ||
|
|
90b68fec1a | ||
|
|
1be410ba80 | ||
|
|
930c9db6e7 | ||
|
|
a152741a1a |
4
Makefile
4
Makefile
@@ -6,7 +6,7 @@ endif
|
||||
DOCKER_USER ?= $(shell echo ${DOCKER_IMAGE_NAME} | cut -d / -f1)
|
||||
VERSION ?= dev
|
||||
COMMIT_SHA = $(shell git rev-parse HEAD)
|
||||
RUNNER_VERSION ?= 2.317.0
|
||||
RUNNER_VERSION ?= 2.320.0
|
||||
TARGETPLATFORM ?= $(shell arch)
|
||||
RUNNER_NAME ?= ${DOCKER_USER}/actions-runner
|
||||
RUNNER_TAG ?= ${VERSION}
|
||||
@@ -310,7 +310,7 @@ github-release: release
|
||||
# Otherwise we get errors like the below:
|
||||
# Error: failed to install CRD crds/actions.summerwind.dev_runnersets.yaml: CustomResourceDefinition.apiextensions.k8s.io "runnersets.actions.summerwind.dev" is invalid: [spec.validation.openAPIV3Schema.properties[spec].properties[template].properties[spec].properties[containers].items.properties[ports].items.properties[protocol].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property, spec.validation.openAPIV3Schema.properties[spec].properties[template].properties[spec].properties[initContainers].items.properties[ports].items.properties[protocol].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property]
|
||||
#
|
||||
# Note that controller-gen newer than 0.6.0 is needed due to https://github.com/kubernetes-sigs/controller-tools/issues/448
|
||||
# Note that controller-gen newer than 0.6.2 is needed due to https://github.com/kubernetes-sigs/controller-tools/issues/448
|
||||
# Otherwise ObjectMeta embedded in Spec results in empty on the storage.
|
||||
controller-gen:
|
||||
ifeq (, $(shell which controller-gen))
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"math/rand"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strconv"
|
||||
@@ -1139,15 +1140,30 @@ func (c *Client) getActionsServiceAdminConnection(ctx context.Context, rt *regis
|
||||
}
|
||||
|
||||
retry++
|
||||
if retry > 3 {
|
||||
if retry > 5 {
|
||||
return nil, fmt.Errorf("unable to register runner after 3 retries: %w", &GitHubAPIError{
|
||||
StatusCode: resp.StatusCode,
|
||||
RequestID: resp.Header.Get(HeaderGitHubRequestID),
|
||||
Err: innerErr,
|
||||
})
|
||||
}
|
||||
time.Sleep(time.Duration(500 * int(time.Millisecond) * (retry + 1)))
|
||||
// Add exponential backoff + jitter to avoid thundering herd
|
||||
// This will generate a backoff schedule:
|
||||
// 1: 1s
|
||||
// 2: 3s
|
||||
// 3: 4s
|
||||
// 4: 8s
|
||||
// 5: 17s
|
||||
baseDelay := 500 * time.Millisecond
|
||||
jitter := time.Duration(rand.Intn(1000))
|
||||
maxDelay := 20 * time.Second
|
||||
delay := baseDelay*(1<<retry) + jitter
|
||||
|
||||
if delay > maxDelay {
|
||||
delay = maxDelay
|
||||
}
|
||||
|
||||
time.Sleep(delay)
|
||||
}
|
||||
|
||||
var actionsServiceAdminConnection *ActionsServiceAdminConnection
|
||||
|
||||
@@ -170,7 +170,7 @@ func TestNewActionsServiceRequest(t *testing.T) {
|
||||
}
|
||||
failures := 0
|
||||
unauthorizedHandler := func(w http.ResponseWriter, r *http.Request) {
|
||||
if failures < 2 {
|
||||
if failures < 5 {
|
||||
failures++
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
w.WriteHeader(http.StatusUnauthorized)
|
||||
|
||||
@@ -6,8 +6,8 @@ DIND_ROOTLESS_RUNNER_NAME ?= ${DOCKER_USER}/actions-runner-dind-rootless
|
||||
OS_IMAGE ?= ubuntu-22.04
|
||||
TARGETPLATFORM ?= $(shell arch)
|
||||
|
||||
RUNNER_VERSION ?= 2.317.0
|
||||
RUNNER_CONTAINER_HOOKS_VERSION ?= 0.6.0
|
||||
RUNNER_VERSION ?= 2.320.0
|
||||
RUNNER_CONTAINER_HOOKS_VERSION ?= 0.6.2
|
||||
DOCKER_VERSION ?= 24.0.7
|
||||
|
||||
# default list of platforms for which multiarch image is built
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
RUNNER_VERSION=2.317.0
|
||||
RUNNER_CONTAINER_HOOKS_VERSION=0.6.0
|
||||
RUNNER_VERSION=2.320.0
|
||||
RUNNER_CONTAINER_HOOKS_VERSION=0.6.2
|
||||
@@ -36,8 +36,8 @@ var (
|
||||
|
||||
testResultCMNamePrefix = "test-result-"
|
||||
|
||||
RunnerVersion = "2.317.0"
|
||||
RunnerContainerHooksVersion = "0.6.0"
|
||||
RunnerVersion = "2.320.0"
|
||||
RunnerContainerHooksVersion = "0.6.2"
|
||||
)
|
||||
|
||||
// If you're willing to run this test via VS Code "run test" or "debug test",
|
||||
|
||||
Reference in New Issue
Block a user