Skip to content
Permalink
Browse files
Fix check_files.py to work on new minor releases (#23287)
  • Loading branch information
jedcunningham committed May 3, 2022
1 parent 5f5ab80 commit f61119c0f3caa5963f00fa158f9d27f8f8e2cda8
Showing 1 changed file with 3 additions and 11 deletions.
@@ -31,7 +31,7 @@
"""

AIRFLOW_DOCKER = """\
FROM apache/airflow:{}
FROM python:3.7
# Upgrade
RUN pip install "apache-airflow=={}"
@@ -46,11 +46,6 @@
"""

DOCKER_CMD = """
docker build --tag local/airflow .
docker local/airflow info
"""

AIRFLOW = "AIRFLOW"
PROVIDERS = "PROVIDERS"
UPGRADE_CHECK = "UPGRADE_CHECK"
@@ -78,7 +73,7 @@ def create_docker(txt: str):
print(
"""\
docker build -f Dockerfile.pmc --tag local/airflow .
docker run local/airflow info
docker run --rm local/airflow airflow info
"""
)

@@ -209,10 +204,7 @@ def main(check_type: str, path: str, version: str):
if check_type.upper() == AIRFLOW:
files = os.listdir(os.path.join(path, version))
missing_files = check_release(files, version)

base_version = version.split("rc")[0]
prev_version = base_version[:-1] + str(int(base_version[-1]) - 1)
create_docker(AIRFLOW_DOCKER.format(prev_version, version))
create_docker(AIRFLOW_DOCKER.format(version))
if missing_files:
warn_of_missing_files(missing_files)
return

0 comments on commit f61119c

Please sign in to comment.