Skip to content

Commit 077d844

Browse files
authored
Merge branch 'main' into CRE-164-cap-limits-http-action-call
2 parents 8fd2e90 + a30d937 commit 077d844

File tree

2 files changed

+65
-1
lines changed

2 files changed

+65
-1
lines changed

.github/workflows/keystore.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Keystore Checks
2+
permissions:
3+
contents: read
4+
5+
on:
6+
push:
7+
paths:
8+
- "keystore/**"
9+
10+
jobs:
11+
run-tests:
12+
defaults:
13+
run:
14+
working-directory: keystore
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Go
21+
uses: ./.github/actions/setup-go
22+
with:
23+
go-version-file: "go.mod"
24+
restore-build-cache-only: "false"
25+
26+
- name: Build
27+
run: go build -v ./...
28+
29+
- name: Unit Tests
30+
run: go test ./... -coverpkg=./... -coverprofile=coverage.txt
31+
32+
build-race-tests:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
38+
- name: Set up Go
39+
uses: ./.github/actions/setup-go
40+
with:
41+
go-version-file: "go.mod"
42+
43+
- name: Build
44+
run: go build -v ./...
45+
46+
- name: Race Tests
47+
run: GORACE="log_path=$PWD/race" go test -race ./...
48+
49+
- name: Print Races
50+
if: failure()
51+
id: print-races
52+
run: |
53+
find race.* | xargs cat > race.txt
54+
if [[ -s race.txt ]]; then
55+
cat race.txt
56+
fi
57+
58+
- name: Upload Go test results
59+
if: always()
60+
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
61+
with:
62+
name: go-race-results
63+
path: |
64+
./race.*

pkg/settings/limits/updater.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func (u *updater[N]) updateLoop(cre contexts.CRE) {
8282
var c <-chan time.Time
8383
if u.subFn != nil {
8484
updates, cancelSub = u.subFn(contexts.WithCRE(ctx, cre))
85-
defer cancelSub()
85+
defer func() { cancelSub() }() // extra func wrapper is required to ensure we get the final cancelSub value
8686
// opt: poll now to initialize
8787
} else {
8888
t := services.TickerConfig{}.NewTicker(pollPeriod)

0 commit comments

Comments
 (0)