-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Open
Labels
area:APIAirflow's REST/HTTP APIAirflow's REST/HTTP APIarea:pluginskind:bugThis is a clearly a bugThis is a clearly a bugpriority:mediumBug that should be fixed before next release but would not block a releaseBug that should be fixed before next release but would not block a release
Milestone
Description
Apache Airflow version
main (development)
If "Other Airflow 2 version" selected, which one?
No response
What happened?
User is able to register multiple FastAPI plugins using same name
On UI, only 1 plugin is visible
What you think should happen instead?
No response
How to reproduce
Register 2 FastAPI plugins using same name and see no error is coming but on UI, only 1 plugin is listed
from airflow.plugins_manager import AirflowPlugin
from fastapi import FastAPI
my_app = FastAPI()
@my_app.get("/ping")
async def ping():
return {"message": "pong"}
class MyFastAPIPlugin(AirflowPlugin):
name = "my_fastapi_plugin"
fastapi_apps = [
{
"name": "example_api",
"app": my_app,
"url_prefix": "/example"
}
]
@my_app.get("/hello")
async def ping():
return {"message": "Hello"}
class MyFastAPIPlugin2(AirflowPlugin):
name = "my_fastapi_plugin"
fastapi_apps = [
{
"name": "example_api",
"app": my_app,
"url_prefix": "/example"
}
]Operating System
Linux
Versions of Apache Airflow Providers
No response
Deployment
Other
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
area:APIAirflow's REST/HTTP APIAirflow's REST/HTTP APIarea:pluginskind:bugThis is a clearly a bugThis is a clearly a bugpriority:mediumBug that should be fixed before next release but would not block a releaseBug that should be fixed before next release but would not block a release