Skip to content

Commit

Permalink
The dev0 suffix should only be applied in main (apache#38727)
Browse files Browse the repository at this point in the history
For production build we should apply the package prefix depending
on branch we are in.  In main we apply dev0 suffix for development, but
in the release branch we should not apply the suffix.
  • Loading branch information
potiuk authored Apr 3, 2024
1 parent f142e9b commit 0f7f2fa
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/prod-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ jobs:
runs-on: ${{ fromJSON(inputs.runs-on-as-json-public) }}
env:
PYTHON_MAJOR_MINOR_VERSION: "${{ inputs.default-python-version }}"
VERSION_SUFFIX_FOR_PYPI: ${{ inputs.branch == 'main' && 'dev0' || '' }}
steps:
- name: "Cleanup repo"
shell: bash
Expand Down Expand Up @@ -157,28 +158,24 @@ jobs:
run: >
breeze release-management prepare-provider-packages
--package-list-file ./prod_image_installed_providers.txt
--package-format wheel --version-suffix-for-pypi dev0
--package-format wheel
if: >
inputs.do-build == 'true' &&
inputs.upload-package-artifact == 'true' &&
inputs.build-provider-packages == 'true'
- name: "Prepare chicken-eggs provider packages"
# In case of provider packages which use latest dev0 version of providers, we should prepare them
# from the source code, not from the PyPI because they have apache-airflow>=X.Y.Z dependency
# And when we prepare them from sources they will have apache-airflow>=X.Y.Z.dev0
shell: bash
run: >
breeze release-management prepare-provider-packages
--package-format wheel --version-suffix-for-pypi dev0 ${{ inputs.chicken-egg-providers }}
--package-format wheel ${{ inputs.chicken-egg-providers }}
if: >
inputs.do-build == 'true' &&
inputs.upload-package-artifact == 'true' &&
inputs.chicken-egg-providers != ''
- name: "Prepare airflow package"
shell: bash
run: >
breeze release-management prepare-airflow-package
--package-format wheel --version-suffix-for-pypi dev0
breeze release-management prepare-airflow-package --package-format wheel
if: inputs.do-build == 'true' && inputs.upload-package-artifact == 'true'
- name: "Upload prepared packages as artifacts"
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -208,7 +205,7 @@ ${{ inputs.do-build == 'true' && inputs.image-tag || '' }}"
BACKEND: sqlite
DEFAULT_BRANCH: ${{ inputs.branch }}
DEFAULT_CONSTRAINTS_BRANCH: ${{ inputs.constraints-branch }}
VERSION_SUFFIX_FOR_PYPI: "dev0"
VERSION_SUFFIX_FOR_PYPI: ${{ inputs.branch == 'main' && 'dev0' || '' }}
INCLUDE_NOT_READY_PROVIDERS: "true"
# You can override CONSTRAINTS_GITHUB_REPOSITORY by setting secret in your repo but by default the
# Airflow one is going to be used
Expand Down

0 comments on commit 0f7f2fa

Please sign in to comment.