Skip to content

Conversation

@potiuk
Copy link
Member

@potiuk potiuk commented Mar 20, 2024

When you rmeove a dependency from pyproject.toml, until your PR gets merged, it is still present in the main branch of Airflow and this is where we do a "warm" cache install of dependencies when we build the CI image. So the dependency is stil there when your PR is running tests. In order to remove the dependency for the time of PR, we need to remove it manually in the script that installs dependencies from branch tip (and also changing this script will trigger Docker cache invalidation of the branch tip installation step).

This PR adds ability to specify the package you remove to also be removed after "branch tip" installation. After merging your PR, it should be fine to remove it again from the branch tip.


^ 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 you rmeove a dependency from pyproject.toml, until your PR
gets merged, it is still present in the main branch of Airflow and
this is where we do a "warm" cache install of dependencies when
we build the CI image. So the dependency is stil there when your PR
is running tests. In order to remove the dependency for the time
of PR, we need to remove it manually in the script that installs
dependencies from branch tip (and also changing this script will
trigger Docker cache invalidation of the branch tip installation
step).

This PR adds ability to specify the package you remove to also be
removed after "branch tip" installation. After merging your PR,
it should be fine to remove it again from the branch tip.
@potiuk potiuk requested a review from ashb as a code owner March 20, 2024 05:03
@boring-cyborg boring-cyborg bot added area:dev-tools area:production-image Production image improvements and fixes labels Mar 20, 2024
@potiuk
Copy link
Member Author

potiuk commented Mar 20, 2024

Cache invalidation is the most difficult thing ...

@potiuk potiuk merged commit e015456 into apache:main Mar 20, 2024
@potiuk potiuk deleted the add-feature-to-remove-dependencies-in-pr branch March 20, 2024 15:32
@ephraimbuddy ephraimbuddy added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Mar 23, 2024
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 changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants