-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove "eager upgrade" from PROD image completely (#33784)
There were still some left-overs of EAGER_UPGRADE in PROD image building. Howwever "eager upgrade" only makes sense for CI images. PROD images when being built should use eager upgrades as they are produced in the CI image step. This PR does the following: * removes eager upgrade parameters from PROD image * instead, prod image build has a new flag for installing the images: --use-constraints-for-context-packages which will automatically use constraints from "docker-context-files" if they are present there. * modifies the CI workflows to upload constraints as artifacts and download them for PROD image build when "eager upgrade" has been used and directs it to use "source" constraints * adds back support to "upgrade to newer dependencies" label that makes it easy to test "eager upgrade" As the result, when PROD image is build in CI: * when regular PR is run, it will use latest github "source" constraints * whwn "eager upgrade" PR is run, it will use the eager-upgrade constraints that were generated during CI build
- Loading branch information
Showing
21 changed files
with
428 additions
and
322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,7 @@ | |
"--tag-as-latest", | ||
"--docker-cache", | ||
"--force-build", | ||
"--build-progress", | ||
], | ||
}, | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,7 @@ class BuildProdParams(CommonBuildParams): | |
install_airflow_reference: str = "" | ||
install_airflow_version: str = "" | ||
install_packages_from_context: bool = False | ||
use_constraints_for_context_packages: bool = False | ||
installation_method: str = "." | ||
runtime_apt_command: str = "" | ||
runtime_apt_deps: str = "" | ||
|
@@ -159,7 +160,6 @@ def extra_docker_build_flags(self) -> list[str]: | |
f"AIRFLOW_CONSTRAINTS_REFERENCE={self.airflow_constraints_reference}", | ||
] | ||
) | ||
|
||
maintainers = json.dumps([{"name": "Apache Airflow PMC", "email": "[email protected]"}]) | ||
logo_url = "https://github.com/apache/airflow/raw/main/docs/apache-airflow/img/logos/wordmark_1.png" | ||
readme_url = "https://raw.githubusercontent.com/apache/airflow/main/docs/docker-stack/README.md" | ||
|
@@ -175,7 +175,7 @@ def extra_docker_build_flags(self) -> list[str]: | |
f"io.artifacthub.package.logo-url={logo_url}", | ||
] | ||
) | ||
return extra_build_flags | ||
return super().extra_docker_build_flags + extra_build_flags | ||
|
||
@property | ||
def airflow_pre_cached_pip_packages(self) -> str: | ||
|
@@ -221,7 +221,6 @@ def required_image_args(self) -> list[str]: | |
"install_postgres_client", | ||
"install_providers_from_sources", | ||
"python_base_image", | ||
"upgrade_to_newer_dependencies", | ||
] | ||
|
||
@property | ||
|
@@ -242,4 +241,6 @@ def optional_image_args(self) -> list[str]: | |
"runtime_apt_deps", | ||
"version_suffix_for_pypi", | ||
"commit_sha", | ||
"build_progress", | ||
"use_constraints_for_context_packages", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.