Repository navigation
Don't fail API server startup when a plugin uses an unknown team - #69976
Merged
Merged
Conversation
Team validation for plugins raised during app creation when any plugin referenced a team that does not exist, so a single misconfigured plugin stopped the whole API server — and every other plugin — from booting. A misconfigured plugin should be surfaced, not fatal, the same way other plugin load errors are. The team check now records each offending plugin as a plugin import error (surfaced in the plugins API and UI) and logs a warning instead of raising, and runs from get_fastapi_plugins() so it happens automatically wherever plugins are mounted. Follow-up of apache#69502.
pierrejeambrun
marked this pull request as ready for review
July 16, 2026 15:53
pierrejeambrun
requested review from
bugraoz93,
choo121600,
ephraimbuddy,
henry3260,
jason810496,
rawwar and
shubhamraj-git
as code owners
July 16, 2026 15:53
Member
Author
|
cc: @vincbeck @o-nikolas |
vincbeck
approved these changes
Jul 16, 2026
Contributor
|
Hey, thanks for the PR @pierrejeambrun we definitely talked about this and @vincbeck will be happy you decided to change this 😄 Many other components in Airflow fail to start if things are misconfigured (related to teams and otherwise). So the thinking was the user will have to restart the API server anyway and we should not start in a bad state. I hear the reasoning that it's just a plugin and it's fine to start in that failed state. The plan was to see how users feel about it and pivot if needed 🙂 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up of #69502.
#69502 added team validation for plugins, but a single plugin referencing a team that does not exist raised during app creation — so the whole API server, and every other plugin, failed to boot. A misconfigured plugin should be surfaced, not fatal, the same way other plugin load errors are.
The team check now records each offending plugin as a plugin import error (surfaced in the plugins API and UI, like any other plugin load failure) and logs a warning instead of raising. It also runs from
get_fastapi_plugins()— whichinit_plugins()already calls — so validation happens automatically wherever plugins are mounted, rather than relying on a separatevalidate_plugin_teams()call that a caller could forget.Only reached from the API server and the
airflow pluginsCLI (never workers/dag-processor/triggerer), and the DB is only touched when[core] multi_teamis enabled.Before
After
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.8) following the guidelines