Skip to content

Fix job filtering crash on tuple module keys#269

Merged
ericmj merged 1 commit into
mainfrom
fix-jobs-filter-pill-clicks
Jun 14, 2026
Merged

Fix job filtering crash on tuple module keys#269
ericmj merged 1 commit into
mainfrom
fix-jobs-filter-pill-clicks

Conversation

@ericmj

@ericmj ericmj commented Jun 14, 2026

Copy link
Copy Markdown
Member

A module key can be a {module, key} tuple (e.g. {Bob.Job.BuildDockerErlang, "amd64"}). Filtering the queue by such a key built where: j.module_key in ^[{module, key}], and Ecto rejects a single-tuple list because it reads as a keyword list, raising Ecto.QueryError.

In the jobs UI, selecting one of those pills crashed the LiveView, which silently re-mounted and dropped the selection — so the filter appeared to do nothing. It only affected pills for tuple-keyed jobs (the build jobs that carry queue backlog), which is why it reproduced on production but not locally. Tracked in Sentry as BOB-27.

Match each key with == so the Term type dumps it as a single value instead of using in over a list.

A module key can be a `{module, key}` tuple (e.g. `{Bob.Job.BuildDockerErlang,
"amd64"}`). Filtering the queue by such a key built `where: j.module_key in
^[{module, key}]`, and Ecto rejects a single-tuple list because it reads as a
keyword list, raising Ecto.QueryError. In the jobs UI this crashed the
LiveView, which silently re-mounted and dropped the selection, so the filter
appeared to do nothing.

Match each key with `==` so the Term type dumps it as a single value instead of
using `in` over a list.
@ericmj ericmj force-pushed the fix-jobs-filter-pill-clicks branch from 5de23a7 to a4b07b9 Compare June 14, 2026 22:07
@ericmj ericmj changed the title Fix unclickable jobs filter pills (single-select + separate counts strip) Fix job filtering crash on tuple module keys Jun 14, 2026
@ericmj ericmj merged commit aa88a66 into main Jun 14, 2026
4 checks passed
@ericmj ericmj deleted the fix-jobs-filter-pill-clicks branch June 14, 2026 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant