The GitHub Actions job "Tests (AMD)" on 
airflow.git/fix/bulk-action-error-handling has failed.
Run started by GitHub user pierrejeambrun (triggered by pierrejeambrun).

Head commit for run:
0f52d798cd8e9a050e91ff91d8f507627b2ef549 / pierrejeambrun 
<[email protected]>
UI: Use react-query native error state for bulk action hooks

Both ``useBulkTaskInstances`` and ``useBulkDeleteDagRuns`` mirrored
the same anti-pattern: a ``useState<unknown>`` field, an ``onError``
callback that just forwarded to ``setError``, and a tiny helper that
grabbed ``errors[0]`` from the response body and re-shaped it into
``{body:{detail:...}}`` so ``ErrorAlert`` could render the first
per-entity failure. That hid every error past the first and
duplicated mutation state into React state for no reason.

Both hooks now return ``{ bulkAction, data, error, isPending, reset }``
straight from ``useMutation``:

- ``error`` covers HTTP-level failures (4xx/5xx, network).
- ``data.delete.errors`` / ``data.update.errors`` carries the
  per-entity failures the backend returns on a 200 response (partial
  success). Consumers render every entry, not just the first.
- ``reset`` replaces the consumer-side ``setError(undefined)`` calls.

``onSuccess`` still invalidates queries unconditionally, fires the
toaster + clears selection when ``success.length > 0``, and only
closes the dialog when ``errors.length === 0`` — partial-success
keeps the dialog open so the user can read what failed.

The three consumers (``BulkMarkTaskInstancesAsButton``,
``BulkDeleteTaskInstancesButton``, ``BulkDeleteDagRunsButton``) now
render network errors via ``ErrorAlert`` and per-entity errors as a
``Stack`` of ``Alert`` rows below it.

Report URL: https://github.com/apache/airflow/actions/runs/26227251415

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to