Skip to content

[v3-3-test] Make Dag pause toggle update immediately on click (#69134) - #70741

Merged
potiuk merged 1 commit into
v3-3-testfrom
backport-2033e1a-v3-3-test
Jul 30, 2026
Merged

[v3-3-test] Make Dag pause toggle update immediately on click (#69134)#70741
potiuk merged 1 commit into
v3-3-testfrom
backport-2033e1a-v3-3-test

Conversation

@vatsrahul1001

Copy link
Copy Markdown
Contributor

Backport of #69134 to v3-3-test for the Airflow 3.3.1 patch release. Clean git cherry-pick -x (no conflicts).


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.8)

Generated-by: Claude Code (Opus 4.8) following the guidelines — automated cherry-pick backport; code is the original author's, unchanged.

* Make Dag pause toggle update immediately on click

The pause/unpause switch on the Dags list page waited for the dags list
refetch to settle before flipping, which under fast interaction looked
like the first clicks were dropped: clicking once on several rows left
them all visually unchanged until enough subsequent clicks accumulated
and the list eventually refetched.

Apply React Query's optimistic update pattern: write the new is_paused
into the dag detail and dags list caches on mutate, roll back if the
server rejects, and invalidate the list on settle so filtered views
(e.g. paused=true) drop the row that no longer matches the filter.

* Test the optimistic pause toggle against a sibling filtered Dag list

The test seeded a single dags-list query and "verified" sibling invalidation
with isFetching(...) >= 0, which is always true and asserted nothing. Seed a
second list under a different filter and assert that both the prefix-keyed
optimistic write and the on-settle invalidation reach it, so the test proves
the cache update is not limited to the one seeded list variant.

(cherry picked from commit 2033e1a)
@vatsrahul1001 vatsrahul1001 added this to the Airflow 3.3.1 milestone Jul 30, 2026
@vatsrahul1001 vatsrahul1001 added the type:bug-fix Changelog: Bug Fixes label Jul 30, 2026
@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label Jul 30, 2026
@potiuk
potiuk merged commit 6a258cd into v3-3-test Jul 30, 2026
84 checks passed
@potiuk
potiuk deleted the backport-2033e1a-v3-3-test branch July 30, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers. type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants