You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "vincbeck (via GitHub)" <gi...@apache.org> on 2026/09/17 20:21:56 UTC
[PR] UI: Add team column and filter to the jobs list [airflow]
vincbeck opened a new pull request, #73295:
URL: https://github.com/apache/airflow/pull/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.
## Screenshot
<img width="1829" height="345" alt="Screenshot 2026-09-16 at 3 46 14 PM" src="https://github.com/user-attachments/assets/8e2657d1-2f4c-41cc-8f31-a461fc22c3e7" />
<!-- SPDX-License-Identifier: Apache-2.0
https://www.apache.org/licenses/LICENSE-2.0 -->
<!--
Thank you for contributing!
Please provide above a brief description of the changes made in this pull request.
Write a good git commit message following this guide: https://chris.beams.io/posts/git-commit/
Please make sure that your code changes are covered with tests.
And in case of new features or big changes remember to adjust the documentation.
For user-facing UI changes, please attach before/after screenshots (or a short
screen recording) so reviewers can assess the visual impact.
Feel free to ping (in general) for the review if you do not see reaction for a few days
(72 Hours is the minimum reaction time you can expect from volunteers) - we sometimes miss notifications.
In case of an existing issue, reference it using one of the following:
* closes: #ISSUE
* related: #ISSUE
-->
---
##### Was generative AI tooling used to co-author this PR?
<!--
If generative AI tooling has been used in the process of authoring this PR, please
change below checkbox to `[X]` followed by the name of the tool, uncomment the "Generated-by".
-->
- [ ] Yes (please specify the tool below)
<!--
Generated-by: [Tool Name] following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
-->
---
* Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#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](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
* When adding dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
* For significant user-facing changes create newsfragment: `{pr_number}.significant.rst`, in [airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments). You can add this file in a follow-up commit after the PR is created so you know the PR number.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add team column and filter to the jobs list [airflow]
Posted by "o-nikolas (via GitHub)" <gi...@apache.org>.
o-nikolas commented on code in PR #73295:
URL: https://github.com/apache/airflow/pull/73295#discussion_r4066649052
##########
airflow-core/src/airflow/cli/commands/dag_processor_command.py:
##########
@@ -33,12 +34,32 @@
log = logging.getLogger(__name__)
+def _get_team_name(bundle_names: list[str] | None) -> str | None:
+ """
+ Return the team this Dag processor serves, or None when it serves no single team.
+
+ A bundle belongs to at most one team, so the processor is team-scoped only when every
+ 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.
Review Comment:
Yeah, to me I think that makes the most sense. If the dag processor is serving many teams by parsing their dags then the job is also serving multiple teams and they'd all want to be aware. I hear that it affects the schema, which is annoying, I'm not sure the level of the impact. It might be one of the things that's worth fixing early now even though it's effort, or maybe it's way too much work for the payoff. I'll leave that up to you and won't block it :slightly_smiling_face:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add team column and filter to the jobs list [airflow]
Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck commented on code in PR #73295:
URL: https://github.com/apache/airflow/pull/73295#discussion_r4134773678
##########
airflow-core/src/airflow/ui/src/pages/Jobs.tsx:
##########
@@ -44,6 +45,16 @@ const createColumns = (translate: TFunction): Array<ColumnDef<JobResponse>> => [
accessorKey: "job_type",
header: translate("jobs.columns.jobType"),
},
+ ...(multiTeam
+ ? ([
+ {
+ accessorKey: "team_names",
+ cell: ({ row: { original } }) => original.team_names?.join(", "),
Review Comment:
Alright, I'll do it in separate PR
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add team column and filter to the jobs list [airflow]
Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck commented on code in PR #73295:
URL: https://github.com/apache/airflow/pull/73295#discussion_r4073174234
##########
airflow-core/src/airflow/cli/commands/dag_processor_command.py:
##########
@@ -33,12 +34,32 @@
log = logging.getLogger(__name__)
+def _get_team_name(bundle_names: list[str] | None) -> str | None:
+ """
+ Return the team this Dag processor serves, or None when it serves no single team.
+
+ A bundle belongs to at most one team, so the processor is team-scoped only when every
+ 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.
Review Comment:
https://github.com/apache/airflow/pull/73561
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add team column and filter to the jobs list [airflow]
Posted by "ramitkataria (via GitHub)" <gi...@apache.org>.
ramitkataria commented on code in PR #73295:
URL: https://github.com/apache/airflow/pull/73295#discussion_r4079844527
##########
airflow-core/src/airflow/cli/commands/dag_processor_command.py:
##########
@@ -33,12 +34,32 @@
log = logging.getLogger(__name__)
+def _get_team_name(bundle_names: list[str] | None) -> str | None:
+ """
+ Return the team this Dag processor serves, or None when it serves no single team.
+
+ A bundle belongs to at most one team, so the processor is team-scoped only when every
+ 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:
Review Comment:
Should this also return `None` when `[core] multi_team` is off, like `DagFileProcessorManager._get_team_names` does?
##########
airflow-core/src/airflow/cli/commands/dag_processor_command.py:
##########
@@ -33,12 +34,32 @@
log = logging.getLogger(__name__)
+def _get_team_name(bundle_names: list[str] | None) -> str | None:
+ """
+ Return the team this Dag processor serves, or None when it serves no single team.
+
+ A bundle belongs to at most one team, so the processor is team-scoped only when every
+ 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:
+ return None
+
+ team_names = DagBundleModel.get_team_names(bundle_names)
Review Comment:
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.
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/job.py:
##########
@@ -101,6 +103,12 @@ def get_jobs(
FilterParam[str | None],
Depends(filter_param_factory(Job.executor_class, str | None, filter_name="executor_class")),
],
+ teams: Annotated[
+ FilterParam[list[str]],
+ Depends(
+ filter_param_factory(Job.team_name, list[str], FilterOptionEnum.IN, "teams", default_factory=list)
Review Comment:
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?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add team column and filter to the jobs list [airflow]
Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck commented on code in PR #73295:
URL: https://github.com/apache/airflow/pull/73295#discussion_r4072803350
##########
airflow-core/src/airflow/cli/commands/dag_processor_command.py:
##########
@@ -33,12 +34,32 @@
log = logging.getLogger(__name__)
+def _get_team_name(bundle_names: list[str] | None) -> str | None:
+ """
+ Return the team this Dag processor serves, or None when it serves no single team.
+
+ A bundle belongs to at most one team, so the processor is team-scoped only when every
+ 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.
Review Comment:
Indeed, a dag processor can specify multiple dag bundles, I missed that
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add team column and filter to the jobs list [airflow]
Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck commented on code in PR #73295:
URL: https://github.com/apache/airflow/pull/73295#discussion_r4065832011
##########
airflow-core/src/airflow/cli/commands/dag_processor_command.py:
##########
@@ -33,12 +34,32 @@
log = logging.getLogger(__name__)
+def _get_team_name(bundle_names: list[str] | None) -> str | None:
+ """
+ Return the team this Dag processor serves, or None when it serves no single team.
+
+ A bundle belongs to at most one team, so the processor is team-scoped only when every
+ 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.
Review Comment:
So a Job could be associated to multiple teams? That changes the data schema.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add team column and filter to the jobs list [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on code in PR #73295:
URL: https://github.com/apache/airflow/pull/73295#discussion_r4134635527
##########
airflow-core/src/airflow/ui/src/pages/Jobs.tsx:
##########
@@ -44,6 +45,16 @@ const createColumns = (translate: TFunction): Array<ColumnDef<JobResponse>> => [
accessorKey: "job_type",
header: translate("jobs.columns.jobType"),
},
+ ...(multiTeam
+ ? ([
+ {
+ accessorKey: "team_names",
+ cell: ({ row: { original } }) => original.team_names?.join(", "),
Review Comment:
Team name is displayed as plain text. Repo has `TeamName` component to make it clickable and redirect to teams.
Probably better to use it here to keep things consistent.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add team column and filter to the jobs list [airflow]
Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck commented on code in PR #73295:
URL: https://github.com/apache/airflow/pull/73295#discussion_r4096830808
##########
airflow-core/src/airflow/cli/commands/dag_processor_command.py:
##########
@@ -33,12 +34,32 @@
log = logging.getLogger(__name__)
+def _get_team_name(bundle_names: list[str] | None) -> str | None:
+ """
+ Return the team this Dag processor serves, or None when it serves no single team.
+
+ A bundle belongs to at most one team, so the processor is team-scoped only when every
+ 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:
+ return None
+
+ team_names = DagBundleModel.get_team_names(bundle_names)
Review Comment:
Good call
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add team column and filter to the jobs list [airflow]
Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck commented on code in PR #73295:
URL: https://github.com/apache/airflow/pull/73295#discussion_r4096865172
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/job.py:
##########
@@ -101,6 +103,12 @@ def get_jobs(
FilterParam[str | None],
Depends(filter_param_factory(Job.executor_class, str | None, filter_name="executor_class")),
],
+ teams: Annotated[
+ FilterParam[list[str]],
+ Depends(
+ filter_param_factory(Job.team_name, list[str], FilterOptionEnum.IN, "teams", default_factory=list)
Review Comment:
I would say let's leave it as is and if users need it, that's easy to implement
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add team column and filter to the jobs list [airflow]
Posted by "o-nikolas (via GitHub)" <gi...@apache.org>.
o-nikolas commented on code in PR #73295:
URL: https://github.com/apache/airflow/pull/73295#discussion_r4064956318
##########
airflow-core/src/airflow/cli/commands/dag_processor_command.py:
##########
@@ -33,12 +34,32 @@
log = logging.getLogger(__name__)
+def _get_team_name(bundle_names: list[str] | None) -> str | None:
+ """
+ Return the team this Dag processor serves, or None when it serves no single team.
+
+ A bundle belongs to at most one team, so the processor is team-scoped only when every
+ 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.
Review Comment:
This is a pretty loose definition then? I wonder if it maybe should go the other direction? If it's parsing for many teams it should be scoped for each? Rather than scoped for none? Since what's important is outages for any specific team's parsing. And if they're each dependent on the same processor, then I think that's still relevant information for each team it parses for.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add team column and filter to the jobs list [airflow]
Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck commented on code in PR #73295:
URL: https://github.com/apache/airflow/pull/73295#discussion_r4096845087
##########
airflow-core/src/airflow/cli/commands/dag_processor_command.py:
##########
@@ -33,12 +34,32 @@
log = logging.getLogger(__name__)
+def _get_team_name(bundle_names: list[str] | None) -> str | None:
+ """
+ Return the team this Dag processor serves, or None when it serves no single team.
+
+ A bundle belongs to at most one team, so the processor is team-scoped only when every
+ 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:
Review Comment:
You're right
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add team column and filter to the jobs list [airflow]
Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck merged PR #73295:
URL: https://github.com/apache/airflow/pull/73295
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org