Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: triggerdotdev/trigger.dev
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: triggerdotdev/trigger.dev
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: refs/pull/3864/head
Choose a head ref
  • 8 commits
  • 30 files changed
  • 1 contributor

Commits on Jun 8, 2026

  1. feat(webapp): add a new backend for the realtime runs feed

    Adds an opt-in backend for realtime run subscriptions (single runs, tag
    lists, and batches), selected per organization by a feature flag and gated
    by a global environment-variable switch, both defaulting off so nothing
    changes until enabled.
    
    Run changes are signalled over Redis pub/sub; a live subscription wakes,
    refetches the current rows from a read replica, and re-emits them,
    resolving tag and batch membership from ClickHouse. Concurrent subscribers
    watching the same runs, tags, or batch share a single resolve-and-hydrate
    per short window, so read load scales with distinct filters rather than
    connection count.
    ericallam committed Jun 8, 2026
    Configuration menu
    Copy the full SHA
    a6db506 View commit details
    Browse the repository at this point in the history
  2. fix(webapp): harden the realtime runs backend

    Addresses review feedback on the new backend:
    
    - skip cache eviction when updating an existing key at capacity
    - treat a concurrency limit of 0 as valid (enforce it, not a 500)
    - gate subscribeToRunChanges behind the enable switch
    - keep protocol-reserved columns in the hydration projection
    - re-clamp a handle-recovered createdAt to the max-age floor
    - bulk-hydrate the shadow comparator instead of per-run reads
    - log only run id and column on divergence, never raw cell values
    ericallam committed Jun 8, 2026
    Configuration menu
    Copy the full SHA
    023588a View commit details
    Browse the repository at this point in the history
  3. fix(webapp): enforce the realtime tag/batch result cap exactly

    The id resolver returned the repository's has-more overfetch (size + 1), so
    the feed could emit one run past the configured cap. Trim to the limit.
    ericallam committed Jun 8, 2026
    Configuration menu
    Copy the full SHA
    058311a View commit details
    Browse the repository at this point in the history
  4. feat(webapp): give the realtime runs feed its own ClickHouse pool

    Resolve tag/batch run ids on a dedicated REALTIME_RUNS_CLICKHOUSE_* pool
    (falling back to CLICKHOUSE_URL) so the feed can't contend with the shared
    analytics client.
    ericallam committed Jun 8, 2026
    Configuration menu
    Copy the full SHA
    9a32dd1 View commit details
    Browse the repository at this point in the history
  5. fix(webapp): log realtime run-change pub/sub failures at error level

    Surface publish, subscribe, and unsubscribe failures in the realtime
    run-change pub/sub at error level with clearer static messages, instead
    of debug.
    ericallam committed Jun 8, 2026
    Configuration menu
    Copy the full SHA
    905b7de View commit details
    Browse the repository at this point in the history
  6. feat(webapp): give the realtime runs feed its own pub/sub Redis

    Run the realtime runs feed's run-changed pub/sub on a dedicated
    REALTIME_RUNS_PUBSUB_REDIS_* connection set (falling back to
    PUBSUB_REDIS_* / REDIS_*), so its publish/subscribe traffic can be
    isolated from the shared pub/sub Redis.
    ericallam committed Jun 8, 2026
    Configuration menu
    Copy the full SHA
    3d07c47 View commit details
    Browse the repository at this point in the history
  7. fix(webapp): adapt the realtime run-id resolver to paginated listRunIds

    listRunIds now returns a keyset page ({ runIds, pagination }); read runIds
    from it. The page is already capped to the requested size, so the manual
    trim is gone.
    
    Also make the run-change event-bus handler registration return a truthy
    value so the singleton() wrapper doesn't re-attach listeners on dev reloads.
    ericallam committed Jun 8, 2026
    Configuration menu
    Copy the full SHA
    d3730d9 View commit details
    Browse the repository at this point in the history
  8. fix(webapp): JSON-encode the run-set cache key to avoid separator col…

    …lisions
    
    A tag containing a comma keyed the same as two separate tags, so the
    resolve+hydrate coalescing cache could serve the wrong runs for up to its
    TTL. Encode the tag/column arrays instead of joining them.
    ericallam committed Jun 8, 2026
    Configuration menu
    Copy the full SHA
    d2987a1 View commit details
    Browse the repository at this point in the history
Loading