Skip to content

fix: Update github.com/coder/retry to remove initial delay #6160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Feb 13, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix data race
  • Loading branch information
mafredri committed Feb 10, 2023
commit 004580650f0e3241b763fee9d9a1f39399bfbac3
5 changes: 4 additions & 1 deletion coderd/database/dbfake/databasefake.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,10 @@ func (q *fakeQuerier) GetTemplateAverageBuildTime(ctx context.Context, arg datab
stopTimes []float64
deleteTimes []float64
)
for _, wb := range q.workspaceBuilds {
q.mutex.RLock()
workspaceBuilds := slices.Clone(q.workspaceBuilds)
q.mutex.RUnlock()
for _, wb := range workspaceBuilds {
version, err := q.GetTemplateVersionByID(ctx, wb.TemplateVersionID)
if err != nil {
return emptyRow, err
Expand Down