mandeepzemo commented on issue #55140:
URL: https://github.com/apache/airflow/issues/55140#issuecomment-3249009791
@atul-astronomer Could you please confirm the expected behavior? The user
should receive an error message when using the same plugin name. I have
implemented the changes and shared the screenshot of the output below for your
reference
File **duplicate_plugin.py**
```
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"
}
]
```
Screenshot
<img width="1920" height="564" alt="Image"
src="https://github.com/user-attachments/assets/7e483e6d-5ae5-40d4-8584-385f45611cc0"
/>
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]