Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add version suffix if it is set during image builds #36253

Merged

Conversation

potiuk
Copy link
Member

@potiuk potiuk commented Dec 16, 2023

When we are building CI/PROD images, AIRFLOW_VERSION arg is retrieved from the current Airflow version set in version.py. This is find for main build when we are running image build tests, because there, the version contains .dev0 and when we extend the image we can use pip install airflow-version=${AIRFLOW_VERSION}. However in release builds, the version in version.py does not contain version suffix, and this version of Airflow is not released yet.

This PR fixes it by checking if version_suffix_for_pypi is set, and it case it is and airflow version does not contain it, we will add the suffix automatically.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

When we are building CI/PROD images, AIRFLOW_VERSION arg is retrieved
from the current Airflow version set in version.py. This is find for
main build when we are running image build tests, because there, the
version contains `.dev0` and when we extend the image we can use
`pip install airflow-version=${AIRFLOW_VERSION}`. However in release
builds, the version in `version.py` does not contain version suffix,
and this version of Airflow is not released yet.

This PR fixes it by checking if version_suffix_for_pypi is set,
and it case it is and airflow version does not contain it, we
will add the suffix automatically.
@potiuk
Copy link
Member Author

potiuk commented Dec 16, 2023

This one should fix the last error in v2-8-test PR: https://github.com/apache/airflow/actions/runs/7229634331/job/19701269075

@ephraimbuddy ephraimbuddy merged commit a68b419 into apache:main Dec 16, 2023
78 checks passed
ephraimbuddy pushed a commit that referenced this pull request Dec 16, 2023
When we are building CI/PROD images, AIRFLOW_VERSION arg is retrieved
from the current Airflow version set in version.py. This is find for
main build when we are running image build tests, because there, the
version contains `.dev0` and when we extend the image we can use
`pip install airflow-version=${AIRFLOW_VERSION}`. However in release
builds, the version in `version.py` does not contain version suffix,
and this version of Airflow is not released yet.

This PR fixes it by checking if version_suffix_for_pypi is set,
and it case it is and airflow version does not contain it, we
will add the suffix automatically.

(cherry picked from commit a68b419)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants