Skip to content

Commit aa53fba

Browse files
committed
fix locking
1 parent 1140f7c commit aa53fba

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

framework/cmd/ci.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ import (
1515
"github.com/fatih/color"
1616
"github.com/google/go-github/v50/github"
1717
"github.com/google/uuid"
18-
"github.com/smartcontractkit/chainlink-testing-framework/framework"
1918
"go.uber.org/ratelimit"
2019
"golang.org/x/oauth2"
2120
"golang.org/x/sync/errgroup"
21+
22+
"github.com/smartcontractkit/chainlink-testing-framework/framework"
2223
)
2324

2425
const (
@@ -135,6 +136,7 @@ func AnalyzeJobsSteps(ctx context.Context, client GitHubActionsClient, cfg *Anal
135136

136137
eg := &errgroup.Group{}
137138
for _, wr := range runs.WorkflowRuns {
139+
framework.L.Debug().Str("Name", *wr.Name).Msg("Analyzing workflow run")
138140
if !strings.Contains(*wr.Name, cfg.WorkflowName) {
139141
stats.IgnoredRuns++
140142
continue
@@ -153,9 +155,9 @@ func AnalyzeJobsSteps(ctx context.Context, client GitHubActionsClient, cfg *Anal
153155
return err
154156
}
155157
// analyze jobs
158+
stats.Mu.Lock()
159+
defer stats.Mu.Unlock()
156160
for _, j := range jobs.Jobs {
157-
stats.Mu.Lock()
158-
defer stats.Mu.Unlock()
159161
name := *j.Name
160162
_ = writeStruct(cfg.Debug, DebugSubDirJobs, name, wr)
161163
if skippedOrInProgressJob(j) {

framework/cmd/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ import (
1010
"strings"
1111

1212
"github.com/pelletier/go-toml"
13-
"github.com/smartcontractkit/chainlink-testing-framework/framework"
1413
"github.com/urfave/cli/v2"
14+
15+
"github.com/smartcontractkit/chainlink-testing-framework/framework"
1516
)
1617

1718
//go:embed observability/*

0 commit comments

Comments
 (0)