pierrejeambrun commented on code in PR #51714:
URL: https://github.com/apache/airflow/pull/51714#discussion_r2159151926


##########
devel-common/src/tests_common/pytest_plugin.py:
##########
@@ -410,7 +410,9 @@ def initialize_airflow_tests(request):
 
 
 def _initialize_airflow_db(force_db_init: bool, airflow_home: str | Path):
-    db_init_lock_file = Path(airflow_home).joinpath(".airflow_db_initialised")
+    airflow_home = Path(airflow_home)
+    airflow_home.mkdir(parents=True, exist_ok=True)
+    db_init_lock_file = airflow_home.joinpath(".airflow_db_initialised")

Review Comment:
   Got it, ok



##########
airflow-core/src/airflow/ui/src/pages/Dashboard/Stats/PluginImportErrors.tsx:
##########
@@ -30,7 +30,9 @@ import { PluginImportErrorsModal } from 
"./PluginImportErrorsModal";
 export const PluginImportErrors = ({ iconOnly = false }: { readonly iconOnly?: 
boolean }) => {
   const { onClose, onOpen, open } = useDisclosure();
   const { t: translate } = useTranslation("admin");
-  const { data, error, isLoading } = usePluginServiceImportErrors();
+  const { data, error, isLoading } = usePluginServiceImportErrors(undefined, {
+    retry: false,
+  });

Review Comment:
   I don't think we should do that. Request could fail for many different 
reason. (network error because of poor connection, in the subway for instance, 
or other status code) and should be retried.
   
   This is consistent with the rest of the application. Indeed if someone does 
not have permission, request will be sent two times for no reason, but that's 
where we are at the moment.
   
   That needs to be solved at the entire application level and not only in one 
particular API call.
   
   I suggest to remove this and follow up with a dedicated PR if you have ideas 
on how to approach this.



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