Hive Hive
Sign in

fix(server): normalize “does not contain” filter operator on build-runs dashboard

GitHub issue · Closed

Metadata
Source
tuist/tuist #11438
Updated
Jun 24, 2026
Domains
Atlas
Details

Resolves the production crash tracked in Sentry TUIST-ZY.

What changed

XcodeBuildRunsLive and GradleBuildRunsLive (both reached through BuildRunsLive) now normalize the :"!=~" (“does not contain”) text-filter operator to :not_ilike before handing filters to Flop, matching the pattern already used by test_runs_live, generate_runs_live, and cache_runs_live.

Why

The build-runs dashboard raised Flop.InvalidParamsError whenever a user selected “does not contain” on a text filter (Branch, Xcode/Gradle version, macOS/Java version, etc.).

Root cause: Noora exposes that filter operator as the atom :"!=~" (a valid Noora text/list operator), but Noora’s to_flop_filter passes the operator verbatim to Flop. Flop has no :"!=~" operator — its equivalent is :not_ilike. The codebase convention is that each LiveView translates :"!=~" to :not_ilike before calling Flop. Both build-runs variants were missing that translation, so the crash was latent for every text filter on that page. The Sentry report came from the Xcode variant (a Branch filter); the Gradle variant had the identical latent bug, so both are fixed here.

Why this approach

Kept the fix consistent with the existing normalize_text_filter_operator/1 pattern used by the other run dashboards rather than changing Noora’s shared to_flop_filter. Fixing it in Noora would be the cleaner long-term home for the now-duplicated helper, but it touches the design system’s Flop semantics for every consumer and is broader than this bug fix.

Impact

Users can again filter build runs with “does not contain” instead of hitting a 500.

How to test locally

  1. Open the build-runs dashboard for a project (/<account>/<project>/builds/build-runs).
  2. Add a Branch filter, switch its operator to “does not contain”, and enter a value.
  3. Before this change the page crashes with Flop.InvalidParamsError; now it filters correctly.

Automated coverage: added regression tests to build_runs_live_test.exs and gradle_build_runs_live_test.exs that drive the !=~ git-branch filter and assert the matching/non-matching rows. Both reproduced the exact production stacktrace before the fix and pass after it. mix format and mix credo are clean.

Comments

No GitHub comments yet.