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

Remove "eager upgrade" from PROD image completely #33784

Merged
merged 1 commit into from
Aug 26, 2023

Conversation

potiuk
Copy link
Member

@potiuk potiuk commented Aug 26, 2023

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"
  • added --build-progress flag to easier debug long builds

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

^ 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.

@boring-cyborg boring-cyborg bot added area:dev-tools area:production-image Production image improvements and fixes labels Aug 26, 2023
@potiuk potiuk force-pushed the remove-eager-upgrade-from-dockerfile branch from 7c382af to c2a54df Compare August 26, 2023 18:33
@potiuk potiuk added the upgrade to newer dependencies If set, upgrade to newer dependencies is forced label Aug 26, 2023
@potiuk potiuk force-pushed the remove-eager-upgrade-from-dockerfile branch from c2a54df to ad38876 Compare August 26, 2023 19:43
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
@potiuk potiuk force-pushed the remove-eager-upgrade-from-dockerfile branch from ad38876 to a85cb5a Compare August 26, 2023 19:44
@potiuk potiuk marked this pull request as ready for review August 26, 2023 19:45
@potiuk potiuk added this to the Airflow 2.7.1 milestone Aug 26, 2023
@potiuk
Copy link
Member Author

potiuk commented Aug 26, 2023

This one should help PROD image to not fail (currently observed in 2-7-test branch - pip could behave strangely on PROD image build when we build it from source providers - this change should make it to use "current build constraints" as source when "eager upgrade" is used.

@potiuk
Copy link
Member Author

potiuk commented Aug 26, 2023

I also added back support for "upgrade to newer dependencies" label that makes it easier to test this case.

@potiuk
Copy link
Member Author

potiuk commented Aug 26, 2023

All right. Seems it works. I tested it wiht both - regular case and "upgrade to newer dependencies" - we will need that one to cherry-pick it to 2-7 to make it green.

@potiuk potiuk merged commit 2b1a194 into main Aug 26, 2023
potiuk added a commit that referenced this pull request Aug 26, 2023
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

(cherry picked from commit 2b1a194)
@Taragolis Taragolis deleted the remove-eager-upgrade-from-dockerfile branch September 26, 2023 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:dev-tools area:production-image Production image improvements and fixes upgrade to newer dependencies If set, upgrade to newer dependencies is forced
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants