jason810496 commented on code in PR #69761:
URL: https://github.com/apache/airflow/pull/69761#discussion_r3935181683


##########
airflow-core/tests/unit/plugins/test_plugins_manager.py:
##########
@@ -241,8 +244,14 @@ def 
test_should_warning_about_external_views_or_react_app_wrong_object(self, cap
         class TestPluginA(AirflowPlugin):
             name = "test_plugin_a"
 
-            external_views = [[{"nested_list": "/test_route"}], {"url_route": 
"/test_route"}]
-            react_apps = [[{"nested_list": "/test_route"}], {"url_route": 
"/test_route_react_app"}]
+            external_views = [
+                [{"nested_list": "/test_route"}],
+                {"name": "A-view", "href": "/a", "url_route": "/test_route"},
+            ]
+            react_apps = [
+                [{"nested_list": "/test_route"}],
+                {"name": "A-react", "bundle_url": "/a.js", "url_route": 
"/test_route_react_app"},
+            ]

Review Comment:
   Could we add a new cases instead of change the existing cases to ensure the 
compatibility.



##########
shared/plugins_manager/src/airflow_shared/plugins_manager/plugins_manager.py:
##########
@@ -85,6 +87,52 @@ class AirflowPluginException(Exception):
     """Exception when loading plugin."""
 
 
+# Kept in sync with ``BaseDestinationLiteral`` in 
``airflow.api_fastapi.core_api.datamodels.plugins``

Review Comment:
   Another direction. It would be better to just define here, but make 
`airflow.api_fastapi.core_api.datamodels.plugins` import the 
`BaseDestinationLiteral` from here.
   
   
https://github.com/apache/airflow/blob/b3b62fa8cf3c32cb45bb2815385a2af498300754/airflow-core/src/airflow/api_fastapi/core_api/datamodels/plugins.py#L70-L73
   
   Since they're exactly same "Literal type annotation" instead of for example 
one as Enum and another as Literal.
   
   



-- 
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]

Reply via email to