This is an automated email from the ASF dual-hosted git repository. potiuk pushed a commit to branch v2-9-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 37b54bf118c213b158e6b22e1f8255cc7c3aa717 Author: Jarek Potiuk <ja...@potiuk.com> AuthorDate: Thu Apr 4 15:15:02 2024 +0200 Switch to `pip` for all PROD images built in the release branches (#38749) In main we are using `uv` to build CI and PROD images to gain enormous speed improvements. This helps with faster PR checks and iterations and lowers the CI cost. However `uv` is not entirely stable yet and there are conditions that make it fail sometimes (for example when old packages, not excluded by our limits are published with wrong versions), also release imge is built with `pip` and will continue to be built with `pip`. The gains for PROD iumage builds with uv are much smaller than the ones for CI builds, so it's perfectly fine to switch all `release branch` builds to use `pip` for PROD image builds - we do not loose too much by doing it, but we gain stability. (cherry picked from commit be893001ceb44127613e44904cf72852c8702c0a) --- .github/workflows/additional-prod-image-tests.yml | 2 ++ .github/workflows/build-images.yml | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/prod-image-extra-checks.yml | 10 ++++++++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/additional-prod-image-tests.yml b/.github/workflows/additional-prod-image-tests.yml index 9d96319311..b7cfc0067b 100644 --- a/.github/workflows/additional-prod-image-tests.yml +++ b/.github/workflows/additional-prod-image-tests.yml @@ -65,6 +65,7 @@ jobs: python-versions: "[ '${{ inputs.default-python-version }}' ]" default-python-version: ${{ inputs.default-python-version }} branch: ${{ inputs.default-branch }} + use-uv: "true" image-tag: ${{ inputs.image-tag }} build-provider-packages: ${{ inputs.default-branch == 'main' }} upgrade-to-newer-dependencies: ${{ inputs.upgrade-to-newer-dependencies }} @@ -81,6 +82,7 @@ jobs: python-versions: "[ '${{ inputs.default-python-version }}' ]" default-python-version: ${{ inputs.default-python-version }} branch: ${{ inputs.default-branch }} + use-uv: "false" image-tag: ${{ inputs.image-tag }} build-provider-packages: ${{ inputs.default-branch == 'main' }} upgrade-to-newer-dependencies: ${{ inputs.upgrade-to-newer-dependencies }} diff --git a/.github/workflows/build-images.yml b/.github/workflows/build-images.yml index ea42d01b8a..a7d26580b9 100644 --- a/.github/workflows/build-images.yml +++ b/.github/workflows/build-images.yml @@ -224,7 +224,7 @@ jobs: pull-request-target: "true" is-committer-build: ${{ needs.build-info.outputs.is-committer-build }} push-image: "true" - use-uv: "true" + use-uv: ${{ needs.build-info.outputs.default-branch == 'main' && 'true' || 'false' }} image-tag: ${{ needs.build-info.outputs.image-tag }} platform: "linux/amd64" python-versions: ${{ needs.build-info.outputs.python-versions }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9472e7323b..dc9f1305fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -499,7 +499,7 @@ jobs: default-python-version: ${{ needs.build-info.outputs.default-python-version }} branch: ${{ needs.build-info.outputs.default-branch }} push-image: "true" - use-uv: "true" + use-uv: ${{ needs.build-info.outputs.default-branch == 'main' && 'true' || 'false' }} build-provider-packages: ${{ needs.build-info.outputs.default-branch == 'main' }} upgrade-to-newer-dependencies: ${{ needs.build-info.outputs.upgrade-to-newer-dependencies }} chicken-egg-providers: ${{ needs.build-info.outputs.chicken-egg-providers }} diff --git a/.github/workflows/prod-image-extra-checks.yml b/.github/workflows/prod-image-extra-checks.yml index f17a81d981..380ecb5a67 100644 --- a/.github/workflows/prod-image-extra-checks.yml +++ b/.github/workflows/prod-image-extra-checks.yml @@ -36,6 +36,10 @@ on: # yamllint disable-line rule:truthy description: "Branch used to run the CI jobs in (main/v2_*_test)." required: true type: string + use-uv: + description: "Whether to use uv to build the image (true/false)" + required: true + type: string image-tag: required: true type: string @@ -74,7 +78,7 @@ jobs: branch: ${{ inputs.branch }} # Always build images during the extra checks and never push them push-image: "false" - use-uv: "true" + use-uv: ${{ inputs.use-uv }} build-provider-packages: ${{ inputs.build-provider-packages }} upgrade-to-newer-dependencies: ${{ inputs.upgrade-to-newer-dependencies }} chicken-egg-providers: ${{ inputs.chicken-egg-providers }} @@ -95,7 +99,7 @@ jobs: branch: ${{ inputs.branch }} # Always build images during the extra checks and never push them push-image: "false" - use-uv: "true" + use-uv: ${{ inputs.use-uv }} build-provider-packages: ${{ inputs.build-provider-packages }} upgrade-to-newer-dependencies: ${{ inputs.upgrade-to-newer-dependencies }} chicken-egg-providers: ${{ inputs.chicken-egg-providers }} @@ -104,6 +108,8 @@ jobs: pip-image: uses: ./.github/workflows/prod-image-build.yml + # Skip testing PIP image on release branches as all images there are built with pip + if: ${{ inputs.use-uv == 'true' }} with: runs-on-as-json-public: ${{ inputs.runs-on-as-json-public }} build-type: "pip"