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/09/18 09:53:53 UTC

[GitHub] [airflow] mik-laj commented on a diff in pull request #26458: Switch back breeze image regeneration to be non-docker

mik-laj commented on code in PR #26458:
URL: https://github.com/apache/airflow/pull/26458#discussion_r973692733


##########
dev/breeze/src/airflow_breeze/commands/setup_commands.py:
##########
@@ -353,16 +353,18 @@ def backup(script_path_file: Path):
 BREEZE_IMAGES_DIR = AIRFLOW_SOURCES_ROOT / "images" / "breeze"
 BREEZE_INSTALL_DIR = AIRFLOW_SOURCES_ROOT / "dev" / "breeze"
 BREEZE_SOURCES_DIR = BREEZE_INSTALL_DIR / "src"
+COMMAND_HASH_FILE_PATH = BREEZE_IMAGES_DIR / "output-commands-hash.txt"
 
 
 def get_commands() -> list[str]:
     results = []
-    content = (BREEZE_IMAGES_DIR / "output-commands-hash.txt").read_text()
-    for line in content.splitlines():
-        strip_line = line.strip()
-        if strip_line.strip() == '' or strip_line.startswith("#"):
-            continue
-        results.append(':'.join(strip_line.split(":")[:-1]))
+    if COMMAND_HASH_FILE_PATH.exists():
+        content = COMMAND_HASH_FILE_PATH.read_text()
+        for line in content.splitlines():
+            strip_line = line.strip()
+            if strip_line.strip() == '' or strip_line.startswith("#"):

Review Comment:
   ```suggestion
               if strip_line == '' or strip_line.startswith("#"):
   ```



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