Skip to content

Grid task-group selection can request task/task-instance endpoints with group_id and blank the page on 404 #65302

@hkc-8010

Description

@hkc-8010

Apache Airflow version

2.10.3

What happened

In Grid view, selecting some task-group nodes can lead the frontend to call task or task-instance endpoints with a group_id as though it were a concrete task_id. The backend correctly returns 404, and the UI can then end up on a blank/white page after the client-side error.

I saw this in two separate Airflow 2.10.3 environments on different dates, with the same pattern:

  • top-level task group example: trading_day
  • nested task group example: non_trading_day.some_group

Observed requests included:

GET /api/v1/dags/{dag_id}/tasks/{group_id} -> 404
GET /api/v1/dags/{dag_id}/dagRuns/{run_id}/taskInstances/{group_id} -> 404
GET /api/v1/dags/{dag_id}/dagRuns/{run_id}/taskInstances/{group_id}/dependencies -> 404

In the same sessions, requests for concrete child tasks under those groups returned 200, for example:

GET /api/v1/dags/{dag_id}/dagRuns/{run_id}/taskInstances/{group_id}.child_task -> 200

The browser console also showed a React rendering failure immediately after the 404s (for example a minified React error and a blank page until refresh).

What you think should happen instead

When a user selects a task-group node in Grid view, the UI should stay on a task-group-specific route/state and only call APIs that support task groups. It should not call task or task-instance endpoints that require a real task_id.

At minimum, even if the frontend reaches an unsupported API path, it should handle the 404 gracefully instead of crashing the page.

How to reproduce

I do not yet have a minimal standalone DAG, but the behavior pattern was:

  1. Run Airflow 2.10.3.
  2. Open a DAG run in Grid view.
  3. Use a DAG that contains task groups, including nested groups.
  4. Click a group-level node in the Grid (not a concrete leaf task).
  5. Open details/logs or otherwise navigate within the selected group state.
  6. Observe that the frontend can issue requests like /tasks/{group_id} or /taskInstances/{group_id}/dependencies.
  7. The backend returns 404, and the Grid/details page can go blank.

Additional context

A few things that make this look like a frontend task-group handling bug rather than a stale-DAG or browser-state issue:

  • The same behavior happened in two separate environments.
  • The exact 404 requests seen in the browser matched live webserver logs at the same timestamps.
  • Concrete child task-instance requests in the same DAG/run succeeded.
  • The affected DAGs were actively parsing at the time, with no parser errors.
  • There was no correlated webserver restart or resource spike.

I also took a quick look at current source and noticed that Grid/task-group handling appears to have dedicated task-group routes and task-group structure data, which makes these task_id={group_id} requests look unintentional. I have not confirmed whether this still reproduces on current main, so this may be specific to 2.10.x or to a particular navigation path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    affected_version:2.10Issues Reported for 2.10area:UIRelated to UI/UX. For Frontend Developers.kind:bugThis is a clearly a bug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions