Skip to content

Commit d1585e3

Browse files
committed
use River tag list filter
The job-list endpoint currently implements tag matching with PostgreSQL-only SQL through `JobListParams.Where`, preventing the handler from working with other River drivers. Pin River to the commit from riverqueue/river#1339 and call the new `JobListParams.Tags` method. River now owns the case-insensitive, match-any query semantics for PostgreSQL and SQLite, while RiverUI remains independent of driver-specific SQL.
1 parent 6eb0658 commit d1585e3

3 files changed

Lines changed: 16 additions & 19 deletions

File tree

go.mod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ require (
88
github.com/jackc/pgerrcode v0.0.0-20250907135507-afb5586c32a6
99
github.com/jackc/pgx/v5 v5.10.0
1010
github.com/riverqueue/apiframe v0.0.0-20251229202423-2b52ce1c482e
11-
github.com/riverqueue/river v0.41.1
12-
github.com/riverqueue/river/riverdriver v0.41.1
13-
github.com/riverqueue/river/riverdriver/riverpgxv5 v0.41.1
14-
github.com/riverqueue/river/rivershared v0.41.1
15-
github.com/riverqueue/river/rivertype v0.41.1
11+
github.com/riverqueue/river v0.42.1-0.20260801235525-3e51215ceb0c
12+
github.com/riverqueue/river/riverdriver v0.42.1-0.20260801235525-3e51215ceb0c
13+
github.com/riverqueue/river/riverdriver/riverpgxv5 v0.42.1-0.20260801235525-3e51215ceb0c
14+
github.com/riverqueue/river/rivershared v0.42.1-0.20260801235525-3e51215ceb0c
15+
github.com/riverqueue/river/rivertype v0.42.1-0.20260801235525-3e51215ceb0c
1616
github.com/rs/cors v1.11.1
1717
github.com/samber/slog-http v1.12.1
1818
github.com/stretchr/testify v1.11.1

go.sum

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
3535
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
3636
github.com/riverqueue/apiframe v0.0.0-20251229202423-2b52ce1c482e h1:OwOgxT3MRpOj5Mp6DhFdZP43FOQOf2hhywAuT5XZCR4=
3737
github.com/riverqueue/apiframe v0.0.0-20251229202423-2b52ce1c482e/go.mod h1:O7UmsAMjpMYuToN4au5GNXdmN1gli+5FTldgXqAfaD0=
38-
github.com/riverqueue/river v0.41.1 h1:Eat4tnIL16PTX1StVTwTAm2iKDowG99t2fDZPfwFPE8=
39-
github.com/riverqueue/river v0.41.1/go.mod h1:5KXJLKDPwjVC99ISXv2OHDQtNm1YwAeEAx9VYCd1RF0=
40-
github.com/riverqueue/river/riverdriver v0.41.1 h1:cwmmFCJkJlH6geaUTbOqC8vBUe00vTBm248GVD3HrqY=
41-
github.com/riverqueue/river/riverdriver v0.41.1/go.mod h1:nAZirY7z2clR4gaZxuGzvae8bwgycl9mrvb3+RWOehQ=
42-
github.com/riverqueue/river/riverdriver/riverpgxv5 v0.41.1 h1:9VCL/tebPcMqrg9dwxQnL80/np4b2HnXwSwaICsszGM=
43-
github.com/riverqueue/river/riverdriver/riverpgxv5 v0.41.1/go.mod h1:Ga+M+38X+cDMk6GsONljP3PrY5ylfBYMBn3MRj2+c9U=
44-
github.com/riverqueue/river/rivershared v0.41.1 h1:wHYBCXxCocvPhkH90B4fAUyMMWMVGG+/EFubyH15R2E=
45-
github.com/riverqueue/river/rivershared v0.41.1/go.mod h1:wQJhQ+jP7SILzEF3t7vrUQvuCMRL0sIhCU2DwjFfn/g=
46-
github.com/riverqueue/river/rivertype v0.41.1 h1:wBO2+nRfmpSohBRkC1/dxEkRyLS96FWlkUjukexOydc=
47-
github.com/riverqueue/river/rivertype v0.41.1/go.mod h1:D1Ad+EaZiaXbQbJcJcfeicXJMBKno0n6UcfKI5Q7DIQ=
38+
github.com/riverqueue/river v0.42.1-0.20260801235525-3e51215ceb0c h1:ECanBwWd/KQW9Wok9MC+A25+qiuCNZWAwBCUAn3ccrU=
39+
github.com/riverqueue/river v0.42.1-0.20260801235525-3e51215ceb0c/go.mod h1:pD+hDP0ZW3SbuTwh0CXDlYQ/M3Q7HDntT3Q4lhfYugY=
40+
github.com/riverqueue/river/riverdriver v0.42.1-0.20260801235525-3e51215ceb0c h1:4gCvv915NuWEpoVrOyyQrgpFrTj3dB9iLchvFouxtwY=
41+
github.com/riverqueue/river/riverdriver v0.42.1-0.20260801235525-3e51215ceb0c/go.mod h1:b2IBlA29E3H233XwgbiJlezdoALSWhetZKt1LlBJEQU=
42+
github.com/riverqueue/river/riverdriver/riverpgxv5 v0.42.1-0.20260801235525-3e51215ceb0c h1:ZqQilgFCmQnaEJRMhKzIaFAXK+l1g1jmLcXpmUCk3hg=
43+
github.com/riverqueue/river/riverdriver/riverpgxv5 v0.42.1-0.20260801235525-3e51215ceb0c/go.mod h1:x+Yx1dcPLuriu8TqDHpAvZ5YQRJVnh9mxuxlqS0I6HA=
44+
github.com/riverqueue/river/rivershared v0.42.1-0.20260801235525-3e51215ceb0c h1:KUbuzxPDZX01QOTS8my6yvqEPnh94ur1ULSv/6awoQ8=
45+
github.com/riverqueue/river/rivershared v0.42.1-0.20260801235525-3e51215ceb0c/go.mod h1:EThAIEr49dlUQFhVLJcQGKoMlnPKOq+UxdMi9jevVsk=
46+
github.com/riverqueue/river/rivertype v0.42.1-0.20260801235525-3e51215ceb0c h1:ipgQMGX9wh7uFgdmb6I8Jt6bJwxw2cFK3NXcTXXdggA=
47+
github.com/riverqueue/river/rivertype v0.42.1-0.20260801235525-3e51215ceb0c/go.mod h1:D1Ad+EaZiaXbQbJcJcfeicXJMBKno0n6UcfKI5Q7DIQ=
4848
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
4949
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
5050
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=

handler_api_endpoint.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -498,10 +498,7 @@ func (a *jobListEndpoint[TTx]) Execute(ctx context.Context, req *jobListRequest)
498498
}
499499

500500
if len(req.Tags) > 0 {
501-
params = params.Where(
502-
"ARRAY(SELECT lower(tag) FROM unnest(tags) AS tag) && ARRAY(SELECT lower(tag) FROM unnest(@tags::varchar[]) AS tag)",
503-
river.NamedArgs{"tags": req.Tags},
504-
)
501+
params = params.Tags(req.Tags...)
505502
}
506503

507504
if req.State == nil {

0 commit comments

Comments
 (0)