Skip to content

Multi-Team: Add teams inspect CLI command to display team resources - #72036

Merged
potiuk merged 3 commits into
apache:mainfrom
SameerMesiah97:Multi-Team-Inspect-Command
Sep 22, 2026
Merged

potiuk merged 3 commits into
apache:mainfrom
SameerMesiah97:Multi-Team-Inspect-Command

Conversation

@SameerMesiah97

@SameerMesiah97 SameerMesiah97 commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Description

This change introduces a new airflow teams inspect CLI command for displaying the resources associated with a team.

The command provides a consolidated view of a team's DAG bundle associations, pools, connections, and variables, making it easier to understand which resources belong to a team and to troubleshoot or prepare administrative operations.

Rationale

As multi-team deployments grow, it becomes useful to inspect a team's resources from a single command rather than querying each resource type independently.

The teams inspect command provides administrators with a convenient overview of team-owned resources, complementing existing management commands such as teams verify and teams delete.

Tests

Added unit tests verifying that:

  • Inspecting a team with associated resources displays its DAG bundles, pools, connections, and variables.
  • Inspecting a team with no associated resources reports empty sections while displaying the default pool.
  • Inspecting a nonexistent team exits with an appropriate error.

Documentation

Added CLI help text describing the new teams inspect command.

Backwards Compatibility

This change is additive. Existing behaviour is unchanged unless the new teams inspect command is explicitly invoked.

Sample Output

The following output is displayed when airflow teams inspect team_a is executed, assuming that team_a exists and has the associated resources shown below:

image
Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: [GPT 5.5] following the guidelines

@SameerMesiah97
SameerMesiah97 force-pushed the Multi-Team-Inspect-Command branch from 0554d64 to 6c79f82 Compare August 24, 2026 18:07
@SameerMesiah97
SameerMesiah97 marked this pull request as ready for review August 25, 2026 19:56
Comment thread airflow-core/newsfragments/72036.feature.rst Outdated
Comment thread airflow-core/src/airflow/cli/commands/team_command.py Outdated
Comment thread airflow-core/tests/unit/cli/commands/test_team_command.py
@SameerMesiah97
SameerMesiah97 force-pushed the Multi-Team-Inspect-Command branch from 6c79f82 to b92238a Compare September 1, 2026 20:00
@SameerMesiah97
SameerMesiah97 force-pushed the Multi-Team-Inspect-Command branch from b92238a to e94c9be Compare September 15, 2026 19:25
@SameerMesiah97

Copy link
Copy Markdown
Contributor Author

Requesting review for this.

@vincbeck

Copy link
Copy Markdown
Contributor

Could you please update the description to contain an example of output? That would be great to see the result

@SameerMesiah97

Copy link
Copy Markdown
Contributor Author

Could you please update the description to contain an example of output? That would be great to see the result

Done.

@vincbeck vincbeck left a comment

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.

Looks cool!

@henry3260 henry3260 left a comment

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.

Overall looks great only few nits

Comment thread airflow-core/src/airflow/cli/commands/team_command.py Outdated
Comment thread airflow-core/src/airflow/cli/commands/team_command.py
Sameer Mesiah added 3 commits September 19, 2026 16:01
Adds a new  command to display the resources
associated with a team. The command reports DAG bundle associations,
pools, connections, and variables for the requested team, providing a
single view of team-owned resources.

Also adds unit tests covering teams with associated resources, empty
teams, and nonexistent teams.
…ntly across table, JSON, YAML, and plain output modes, add filtering coverage for resources belonging to other teams, and update empty-team output tests.
…spect command. Add unit test for multi-team disabled scenario.
@SameerMesiah97
SameerMesiah97 force-pushed the Multi-Team-Inspect-Command branch from e94c9be to 677946f Compare September 19, 2026 15:14
@potiuk
potiuk merged commit 69b72e3 into apache:main Sep 22, 2026
73 checks passed
@potiuk potiuk mentioned this pull request Sep 22, 2026
1 task done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants