Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
3d45f55
feat(coderd/database): allow filtering provisioner daemons by tags
SasSwart Nov 8, 2024
92b9d25
feat(coderd/database): allow filtering provisioner daemons by tags
SasSwart Nov 8, 2024
e68a8fc
add a type hint for sqlc
SasSwart Nov 8, 2024
93058e6
ensure BC with GetProvisionerDaemonsByOrganization
SasSwart Nov 8, 2024
a2bfae3
add a type hint for sqlc
SasSwart Nov 11, 2024
39ab8a0
fix unit test
SasSwart Nov 11, 2024
8bf79c8
Add tags param to provisioner daemons endpoint
SasSwart Nov 11, 2024
86f7dab
fix provisioner tag filtering
SasSwart Nov 11, 2024
bd6f3ed
handle tag reading error
SasSwart Nov 11, 2024
a2476dc
remove assignment to a nil map
SasSwart Nov 11, 2024
e835326
filter by tags in dbmem
SasSwart Nov 11, 2024
23bd23f
correctly set the default value when no tags are provided
SasSwart Nov 11, 2024
9985ef6
support the zero value tag in sql
SasSwart Nov 11, 2024
a173bfb
update the default value for when no tags are provided
SasSwart Nov 12, 2024
70c7ea9
use a sql domain as a type alias so that we can override it as a Stri…
SasSwart Nov 12, 2024
1c57bd2
complete down migration
SasSwart Nov 12, 2024
ebb716d
complete down migration
SasSwart Nov 12, 2024
96b64f4
update the default value for when no tags are provided
SasSwart Nov 12, 2024
5941dc3
fix job acquisition for untagged provisioners
SasSwart Nov 12, 2024
ff75f5e
make gen
SasSwart Nov 12, 2024
85b1ef4
review notes
SasSwart Nov 12, 2024
071fdc4
fix down migration
SasSwart Nov 12, 2024
78abf67
use the correct name for provisionerdaemons' tag field
SasSwart Nov 12, 2024
d1c7d3e
typo
SasSwart Nov 12, 2024
38d77cf
use the updated tag name
SasSwart Nov 12, 2024
1c64353
fix special case of tagset_contains
SasSwart Nov 12, 2024
8508cd8
Use a stringmap instead of a stringslice for provisioner tags
SasSwart Nov 13, 2024
9dcbb83
update tags param parsing in provisionerDaemons
SasSwart Nov 13, 2024
4c1fc0d
update tags param parsing in provisionerDaemons
SasSwart Nov 13, 2024
fbd70f3
fix special case of tagset_contains
SasSwart Nov 13, 2024
69126f4
rename tagset_contains function
SasSwart Nov 13, 2024
e109caf
attempt to fix the special case for provisioner_tagset_contains
SasSwart Nov 13, 2024
f10561e
attempt to fix the special case for provisioner_tagset_contains
SasSwart Nov 13, 2024
a56b130
attempt to fix the special case for provisioner_tagset_contains
SasSwart Nov 13, 2024
2bce007
fix provisioner_tagset_contains
SasSwart Nov 13, 2024
2860f5d
remove defunct code
SasSwart Nov 14, 2024
d6f26df
Add tag filtering tests for GetProvisionerDaemons
SasSwart Nov 14, 2024
1ce410f
fix foreign key constraint in tests
SasSwart Nov 14, 2024
c065742
Add linting
SasSwart Nov 14, 2024
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
remove assignment to a nil map
  • Loading branch information
SasSwart committed Nov 11, 2024
commit a2476dc5b02a94b703eb54cda4e420de1322d161
3 changes: 2 additions & 1 deletion enterprise/coderd/provisionerdaemons.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,11 @@ func provisionerTags(r *http.Request) map[string]string {
return nil
}

var tagMap map[string]string
tagMap := map[string]string{}
for _, tag := range tags {
parts := strings.SplitN(tag, "=", 2)
if len(parts) == 2 {
// TODO(sas): seems like the kind of place where nilpointers would pop up.
tagMap[parts[0]] = parts[1]
}
}
Expand Down
Loading