You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/07/22 18:30:20 UTC

[GitHub] [airflow] josh-fell commented on a diff in pull request #25236: Make tag fetching when preparing providers optional.

josh-fell commented on code in PR #25236:
URL: https://github.com/apache/airflow/pull/25236#discussion_r927899851


##########
dev/provider_packages/prepare_provider_packages.py:
##########
@@ -710,10 +710,16 @@ def make_sure_remote_apache_exists_and_fetch(git_update: bool, verbose: bool):
         fetch_command.append("--unshallow")
     if verbose:
         console.print(f"Running command: '{' '.join(fetch_command)}'")
-    subprocess.check_call(
-        fetch_command,
-        stderr=subprocess.DEVNULL,
-    )
+    try:
+        subprocess.check_call(
+            fetch_command,
+        )
+    except subprocess.CalledProcessError as e:
+        console.print(
+            '[yellow]Error when fetching tags from remote. Your tags might not be refreshed. '
+            f'please refresh the tags manually via {" ".join(fetch_command)}\n'
+        )
+        console.print(f'[yellow]The error was: {e}')

Review Comment:
   Does this need an end-formmating tag? Not sure if we'd expect the `[yellow]` formatting to continue. RIch is new to me so really more curiosity.



##########
dev/provider_packages/prepare_provider_packages.py:
##########
@@ -710,10 +710,16 @@ def make_sure_remote_apache_exists_and_fetch(git_update: bool, verbose: bool):
         fetch_command.append("--unshallow")
     if verbose:
         console.print(f"Running command: '{' '.join(fetch_command)}'")
-    subprocess.check_call(
-        fetch_command,
-        stderr=subprocess.DEVNULL,
-    )
+    try:
+        subprocess.check_call(
+            fetch_command,
+        )
+    except subprocess.CalledProcessError as e:
+        console.print(
+            '[yellow]Error when fetching tags from remote. Your tags might not be refreshed. '
+            f'please refresh the tags manually via {" ".join(fetch_command)}\n'

Review Comment:
   ```suggestion
               f'Please refresh the tags manually via {" ".join(fetch_command)}\n'
   ```



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org