You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2022/04/25 09:17:18 UTC

[airflow] branch main updated: Fix renamed .README.md file in clean/check for docker-context-files

This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new e82a2fdf84 Fix renamed .README.md file in clean/check for docker-context-files
e82a2fdf84 is described below

commit e82a2fdf841dd571f3b8f456c4d054cf3a94fc03
Author: Jarek Potiuk <ja...@polidea.com>
AuthorDate: Mon Apr 25 10:42:38 2022 +0200

    Fix renamed .README.md file in clean/check for docker-context-files
    
    The README.md has been renamed to .README.md in docker-context-files
    to make it less prone to accidental deletion, but breeze commands
    were not updated to account for that change.
---
 dev/breeze/src/airflow_breeze/build_image/prod/build_prod_image.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dev/breeze/src/airflow_breeze/build_image/prod/build_prod_image.py b/dev/breeze/src/airflow_breeze/build_image/prod/build_prod_image.py
index 8aea74ce82..5ee08f0c00 100644
--- a/dev/breeze/src/airflow_breeze/build_image/prod/build_prod_image.py
+++ b/dev/breeze/src/airflow_breeze/build_image/prod/build_prod_image.py
@@ -72,7 +72,7 @@ OPTIONAL_PROD_IMAGE_ARGS = [
 
 def clean_docker_context_files(verbose: bool, dry_run: bool):
     """
-    Cleans up docker context files folder - leaving only README.md there.
+    Cleans up docker context files folder - leaving only .README.md there.
     """
     if verbose or dry_run:
         console.print("[bright_blue]Cleaning docker-context-files[/]")
@@ -81,7 +81,7 @@ def clean_docker_context_files(verbose: bool, dry_run: bool):
     with contextlib.suppress(FileNotFoundError):
         context_files_to_delete = DOCKER_CONTEXT_DIR.glob('**/*')
         for file_to_delete in context_files_to_delete:
-            if file_to_delete.name != 'README.md':
+            if file_to_delete.name != '.README.md':
                 file_to_delete.unlink()
 
 
@@ -96,7 +96,7 @@ def check_docker_context_files(install_from_docker_context_files: bool):
     """
     context_file = DOCKER_CONTEXT_DIR.glob('**/*')
     number_of_context_files = len(
-        [context for context in context_file if context.is_file() and context.name != 'README.md']
+        [context for context in context_file if context.is_file() and context.name != '.README.md']
     )
     if number_of_context_files == 0:
         if install_from_docker_context_files: