Add tag filtering to JobListParams - #1339
Merged
Merged
Conversation
bgentry
force-pushed
the
bg/job-list-tags
branch
from
August 1, 2026 23:55
b5cbf6d to
3e51215
Compare
bgentry
added a commit
to golanglemonade/riverui
that referenced
this pull request
Aug 2, 2026
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.
bgentry
marked this pull request as ready for review
August 2, 2026 00:02
bgentry
commented
Aug 2, 2026
| } | ||
|
|
||
| jobs, err := exec.JobDeleteMany(ctx, (*riverdriver.JobDeleteManyParams)(listParams)) | ||
| jobs, err := exec.JobDeleteMany(ctx, &riverdriver.JobDeleteManyParams{ |
Contributor
Author
There was a problem hiding this comment.
ah this needs to be kept aligned with list params, will fix
Applications that need to find jobs by tag currently have to use a driver-specific `Where` predicate. That prevents shared consumers from supporting PostgreSQL and SQLite with the same list query. Add `JobListParams.Tags` with case-insensitive, match-any semantics and carry it through each driver. PostgreSQL compares unnested arrays, while SQLite compares the equivalent JSON array values. Keep the list and delete-many driver parameter layouts synchronized so the existing pointer conversion remains valid. Add shared driver coverage for combined filters, transactions, and tag matching across every supported driver.
bgentry
force-pushed
the
bg/job-list-tags
branch
from
August 2, 2026 00:10
3e51215 to
7ef57fe
Compare
bgentry
added a commit
to golanglemonade/riverui
that referenced
this pull request
Aug 2, 2026
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.
bgentry
commented
Aug 2, 2026
The tag list filter exposes match-any behavior through an ambiguous method name and folds case even though River preserves tag spelling. Its static SQL also adds work to every list query and prevents PostgreSQL from using native array operators. Replace it with exact TagsAny and TagsAll filters. Build their predicates only when requested through driver-specific fragments, using PostgreSQL overlap and containment operators and equivalent SQLite JSON predicates. Define delete parameters from list parameters so their pointer conversion stays structurally safe. Expand shared driver coverage for any, all, combined, case-sensitive, empty, pagination, transaction, and low-level fragment behavior.
brandur
approved these changes
Aug 2, 2026
brandur
left a comment
Contributor
There was a problem hiding this comment.
Nice one! Looks good to me.
brandur
pushed a commit
to riverqueue/riverui
that referenced
this pull request
Aug 3, 2026
* feat: add ability to filter jobs by tags Signed-off-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com> * revert bad spacing change Signed-off-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com> * finish tag filter support Tag filtering arrives without changelog coverage or regression tests, and mutations leave active tag-filtered lists stale. The autocomplete error also advertises a `job_tag` facet that no backend implements. Propagate tag filters through every active job-list cache key, remove the unsupported facet claim, and document the user-facing filter. Add coverage for repeated query parameters, route normalization, case-insensitive OR matching, custom schemas, and the handler request path. * 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. * strengthen tag filter coverage The tag filter tests exercise backend matching directly, but they leave the raw request boundary, route translation, and mutation cache behavior unprotected. Regressions in those paths can silently ignore public API filters or leave filtered job lists stale. Assert repeated query parameter extraction and parser type dispatch. Add a focused route component harness that verifies tags flow from route search state into the job query and filter control, back into navigation updates, and through the cache keys refreshed after cancel, delete, and retry. * use explicit River tag matching RiverUI still calls the ambiguous tag filter and describes its matching as case-insensitive after River splits the API into explicit any and all forms. Pin the River modules to the revised PR commit and use TagsAny for the existing multi-selection behavior. Describe the exact-match contract in the changelog and include a mixed-case decoy in handler coverage so accidental case folding is visible. * pin River merge commit RiverUI currently points at the tag-filter PR's branch commit even though the River change is now merged. Move every River module to the resulting master merge commit. The dependency now tracks the authoritative repository history while retaining the same tag filter API and behavior. * keep integration smoke test generic --------- Signed-off-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com> Co-authored-by: Blake Gentry <blakesgentry@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds exact tag filtering to job lists through explicit
JobListParams.TagsAnyand
JobListParams.TagsAllmethods. The two filters can be combined, withmatch-any and match-all groups joined to each other and other filters using
AND.
Tag predicates are added only when requested through driver-specific SQL
fragments. PostgreSQL uses native array overlap and containment operators,
while SQLite uses equivalent JSON predicates.
JobDeleteManyParamsis definedfrom the list parameter type so their existing pointer conversion remains
structurally safe.
This is the core dependency for
riverqueue/riverui#548.