Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc6824ca

Browse files
committed
fix: duplicate tags map in mutation to resolve race
See:https://github.com/coder/coder/actions/runs/10149619748/job/28064952716?pr=14046
1 parent58b810f commitc6824ca

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎provisionersdk/provisionertags.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ const (
1818
// NOTE: "owner" must NEVER be nil. Otherwise it will end up being
1919
// duplicated in the database, as idx_provisioner_daemons_name_owner_key
2020
// is a partial unique index that includes a JSON field.
21-
funcMutateTags(userID uuid.UUID,tagsmap[string]string)map[string]string {
22-
iftags==nil {
23-
tags=map[string]string{}
21+
funcMutateTags(userID uuid.UUID,providedmap[string]string)map[string]string {
22+
tags:=map[string]string{}
23+
fork,v:=rangeprovided {
24+
tags[k]=v
2425
}
2526
_,ok:=tags[TagScope]
2627
if!ok {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp