-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Use PyPI constraints for PROD image in non-main branch #33789
Use PyPI constraints for PROD image in non-main branch #33789
Conversation
When we are building PROD image in CI for non main branch, we are installing providers from PyPI rather than building them locally from sources. Therefore we should use `PyPI` constraints for such builds not the "source" constraints (they might differ). This PR adds two steps: * In the CI build, when we do not build providers we generate PyPI constraints additionally to source constraints * In the PROD build we use the PyPI constraints in case we do not build providers locally
@@ -34,12 +34,18 @@ runs: | |||
- name: "Build & Push AMD64 CI images ${{ env.IMAGE_TAG }} ${{ env.PYTHON_VERSIONS }}" | |||
shell: bash | |||
run: breeze ci-image build --push --tag-as-latest --run-in-parallel --upgrade-on-failure | |||
- name: "Show dependencies to be upgraded" | |||
- name: "Generate source constraints" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those constraints are useful regardless to see and they are very fast to generate, so we can generate them also in non-main branch. It's helpful to see them
shell: bash | ||
run: > | ||
breeze release-management generate-constraints --run-in-parallel | ||
--airflow-constraints-mode constraints-source-providers | ||
if: env.UPGRADE_TO_NEWER_DEPENDENCIES != 'false' | ||
- name: "Generate PyPI constraints" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those are slower (we need check which provders are available in PyPI and reinstall them before gnerating the constraints so we should only run them in "non-main" build).
This is the ultimate one needed for the 2-7-tests build to succeed (due to the openlineage limitation I had to bump the version as well to 2.7.1). |
I already cherry-picked that one to v2-7-test - but will replace the cherry-pick including PR# once this one is merged |
When we are building PROD image in CI for non main branch, we are installing providers from PyPI rather than building them locally from sources. Therefore we should use `PyPI` constraints for such builds not the "source" constraints (they might differ). This PR adds two steps: * In the CI build, when we do not build providers we generate PyPI constraints additionally to source constraints * In the PROD build we use the PyPI constraints in case we do not build providers locally (cherry picked from commit f9276f0)
When we are building PROD image in CI for non main branch, we are installing providers from PyPI rather than building them locally from sources. Therefore we should use
PyPI
constraints for such builds not the "source" constraints (they might differ).This PR adds two steps:
^ 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.