Skip to content

Commit 7f31ad0

Browse files
Override scaleset client timeout to avoid long controller stalls
1 parent 13a0330 commit 7f31ad0

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

controllers/actions.github.com/multiclient/multi_client.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"net/url"
1010
"strconv"
1111
"sync"
12+
"time"
1213

1314
"github.com/actions/actions-runner-controller/apis/actions.github.com/v1alpha1/appconfig"
1415
"github.com/actions/actions-runner-controller/build"
@@ -135,7 +136,10 @@ func (o *ClientForOptions) newClient() (*scaleset.Client, error) {
135136
Subsystem: "gha-scale-set-controller",
136137
}
137138

138-
var options []scaleset.HTTPOption
139+
options := []scaleset.HTTPOption{
140+
scaleset.WithTimeout(30 * time.Second),
141+
scaleset.WithRetryMax(2),
142+
}
139143
if o.RootCAs != nil {
140144
options = append(options, scaleset.WithRootCAs(o.RootCAs))
141145
}

0 commit comments

Comments
 (0)