Skip to content

UI: Add team column and filter to the jobs list - #73295

Open
vincbeck wants to merge 1 commit into
apache:mainfrom
aws-mwaa:vincbeck/jobs-team-column
Open

vincbeck wants to merge 1 commit into
apache:mainfrom
aws-mwaa:vincbeck/jobs-team-column

Conversation

@vincbeck

@vincbeck vincbeck commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

When multi-team mode is enabled, operators triaging scheduler, triggerer and Dag processor jobs need to see which team's workloads each job belongs to, and to scope the list to a single team when investigating that team's resource usage.

The column and the filter render only when the multi_team configuration is enabled, so single-team deployments are unaffected.

Screenshot

Screenshot 2026-09-24 at 2 19 48 PM
Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

Comment thread airflow-core/src/airflow/cli/commands/dag_processor_command.py Outdated
vincbeck added a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Sep 22, 2026
A Job's team scope was a single nullable column, which cannot describe a
Dag processor that parses bundles belonging to more than one team. Scoping
such a processor to no team at all loses the information that its work is
relevant to each of those teams, so team coverage in the health endpoint
and the team column in the UI cannot be derived from it.

Raised in review of apache#73295.
if not bundle_names:
return None

team_names = DagBundleModel.get_team_names(bundle_names)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should use _get_configured_bundle_team_names() from dag_processing/bundles/manager.py here instead, so the team comes from config instead of the DB? My agent told me:

At this point sync_bundles() hasn't run yet (it happens inside DagFileProcessorManager.run(), after run_job has already committed the job row), so on a fresh deployment, or after a bundle moves to another team in config, the job would keep a missing or stale team until restart. airflow_health.py already resolves teams that way. It would also make a bare airflow dag-processor return the same team as --bundle-name a b when every configured bundle belongs to one team.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call

bundle it parses belongs to the same team. A processor parsing all bundles, bundles of
several teams, or a team-less bundle alongside a team's own is not team-scoped.
"""
if not bundle_names:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this also return None when [core] multi_team is off, like DagFileProcessorManager._get_team_names does?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right

teams: Annotated[
FilterParam[list[str]],
Depends(
filter_param_factory(Job.team_name, list[str], FilterOptionEnum.IN, "teams", default_factory=list)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell, with the IN filter, there's no way to select jobs that have no team. Do you think that would be a problem?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say let's leave it as is and if users need it, that's easy to implement

vincbeck added a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Sep 23, 2026
A Job's team scope was a single nullable column, which cannot describe a
Dag processor that parses bundles belonging to more than one team. Scoping
such a processor to no team at all loses the information that its work is
relevant to each of those teams, so team coverage in the health endpoint
and the team column in the UI cannot be derived from it.

Raised in review of apache#73295.
vincbeck added a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Sep 24, 2026
A Job's team scope was a single nullable column, which cannot describe a
Dag processor that parses bundles belonging to more than one team. Scoping
such a processor to no team at all loses the information that its work is
relevant to each of those teams, so team coverage in the health endpoint
and the team column in the UI cannot be derived from it.

Raised in review of apache#73295.
When multi-team mode is enabled, operators triaging scheduler, triggerer and Dag
processor jobs need to see which team's workloads each job belongs to, and to
scope the list to a single team when investigating that team's resource usage.

The column and the filter render only when the `multi_team` configuration is
enabled, so single-team deployments are unaffected.
@vincbeck
vincbeck force-pushed the vincbeck/jobs-team-column branch from f7eb321 to 11aba40 Compare September 24, 2026 18:30

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API area:CLI area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants