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

Sync v2-7-stable with v2-7-test to release 2.7.1 #33826

Merged
merged 117 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
126b507
Remove openlineage exclusion (#33491)
potiuk Aug 18, 2023
dc44806
Fix OpenLineage link in New Features notes (#33513)
ldacey Aug 19, 2023
a335ca5
Update the release date for 2.7.0
ephraimbuddy Aug 23, 2023
100f37d
Remove Pydantic limitation for version < 2 (#33507)
potiuk Aug 18, 2023
698ad80
Add MySQL 8.1 to supported versions. (#33576)
potiuk Aug 21, 2023
3fad890
Fix dependencies for celery and opentelemetry for Python 3.8 (#33579)
potiuk Aug 21, 2023
6005da9
Improve detection of when breeze CI image needs rebuilding (#33603)
potiuk Aug 22, 2023
fdd1bc3
Upgrade botocore/aiobotocore minimum requirements (#33649)
potiuk Aug 23, 2023
45d2282
Limit hive provider check for Python 3.11 temporarily (#33774)
potiuk Aug 26, 2023
20bfcaf
Limit Redis dependencies to match celery limits (#33773)
potiuk Aug 26, 2023
d39abde
Remove "eager upgrade" from PROD image completely (#33784)
potiuk Aug 26, 2023
529346b
Bump airflow version to 2.7.1
potiuk Aug 27, 2023
b3bb92a
Use PyPI constraints for PROD image in non-main branch (#33789)
potiuk Aug 27, 2023
22d09d3
Fix rendering the mapped parameters when using `expand_kwargs` method…
hussein-awala Aug 18, 2023
56ec8d7
Bring back hive support for Python 3.11 (#32607)
potiuk Aug 24, 2023
fc77886
[Models] [Postgres] Check if the dynamically-added index is in the ta…
ohaibbq Aug 14, 2023
34aef4b
Fix getting correct commit from multiple referenced PR (#33411)
ephraimbuddy Aug 15, 2023
04e94bf
More complete fix for dev release scripts to filter commit for PR (#3…
potiuk Aug 15, 2023
aab0f4b
Fix handling of default value and serialization of Param class (#33141)
jscheffl Aug 16, 2023
ee20c88
Refactor: Simplify code in configuration.py (#33160)
eumiro Aug 14, 2023
11845bb
respect soft_fail argument when ExternalTaskSensor runs in deferrable…
Lee-W Aug 14, 2023
bc9ea43
Fix pydantic warning about `orm_mode` rename (#33220)
ephraimbuddy Aug 9, 2023
84369c6
Refactor: Simplify dict manipulation in metrics (#33264)
eumiro Aug 10, 2023
d31f20b
Refactor: Simplify code in serialization (#33266)
eumiro Aug 10, 2023
3439f91
Refactor: Simplify code in settings (#33267)
eumiro Aug 13, 2023
cff420b
Refactor: Simplify code in utils (#33268)
eumiro Aug 10, 2023
496f917
Refactor: Simplify code in www (#33270)
eumiro Aug 10, 2023
4e4911b
Refactor: Simplify code in scripts (#33295)
eumiro Aug 13, 2023
d329d70
Refactor str.startswith with tuples (#33292)
eumiro Aug 16, 2023
c597ca1
Fix test_example_dags (#32714)
ahidalgob Aug 4, 2023
75bf02e
Refactor: Simplify code in tests (#33293)
eumiro Aug 12, 2023
4074370
D205 Support - Root files (#33297)
ferruzzi Aug 11, 2023
a33cbf0
D205 Support - WWW (#33298)
ferruzzi Aug 13, 2023
601d0e4
D401 Support - Secrets to Triggers (Inclusive) (#33338)
ferruzzi Aug 13, 2023
4af3afd
D205 Support - Stragglers (#33301)
ferruzzi Aug 15, 2023
bb6ea0f
Remove the replace to <br> tag in Provider's view (#33326)
pankajkoti Aug 11, 2023
548e3f5
D401 Support - Airflow/api thru Airflow/auth (#33333)
ferruzzi Aug 12, 2023
f7e39af
Fix some missing type hints (#33334)
ferruzzi Aug 12, 2023
448cf69
D401 Support - airflow/callbacks thru airflow/decorators (#33335)
ferruzzi Aug 12, 2023
85d75a2
D401 Support - airflow/example_dags thru airflow/listeners (#33336)
ferruzzi Aug 12, 2023
4c01584
D401 Support - Macros to Operators (Inclusive) (#33337)
ferruzzi Aug 12, 2023
5988ea6
D401 Support - Utils (#33339)
ferruzzi Aug 12, 2023
14c91db
D401 Support - Root Files (#33352)
ferruzzi Aug 13, 2023
f44a324
Fix DagFileProcessor interfering with dags outside its ``processor_su…
pierrejeambrun Aug 14, 2023
c3580fc
Fix config description for base_log_folder (#33388)
AndreasAlbertQC Aug 14, 2023
08d4e01
Simplify 'X for X in Y' to 'Y' where applicable (#33453)
eumiro Aug 20, 2023
6996d30
Create a new method used to resume the task in order to implement spe…
hussein-awala Aug 21, 2023
dfe129f
Respect "soft_fail" argument when "poke" is called (#33401)
Lee-W Aug 25, 2023
a597d5e
Allow timetable to slightly miss catchup cutoff (#33404)
uranusjr Aug 18, 2023
0fbb01b
Import utc from datetime and normalize its import (#33450)
eumiro Aug 16, 2023
24b11c9
make `conf.set` case insensitive (#33452)
vandonr-amz Aug 21, 2023
5930e18
Fix Cluster Activity Health margin (#33456)
pierrejeambrun Aug 16, 2023
f5ea787
Revert "respect soft_fail argument when ExternalTaskSensor runs in de…
hussein-awala Aug 22, 2023
00fe546
Static check fixes (#33462)
ferruzzi Aug 17, 2023
ab1fd50
Fix secrets backend docs (#33471)
Aakcht Aug 17, 2023
29ffb32
Use absolute path in README.md for broken links on pypi listing (#33473)
pankajkoti Aug 17, 2023
5029092
Simplify code around enumerate (#33476)
eumiro Aug 19, 2023
20ebd99
Consolidate import and usage of pandas (#33480)
eumiro Aug 17, 2023
ea432df
Fix a bug in formatDuration method (#33486)
hussein-awala Aug 18, 2023
5c8e799
Do not return ongoin dagrun when a end_date is less than utcnow (#33488)
pierrejeambrun Aug 18, 2023
e257869
Fix broken link in Modules Management page (#33499)
vijayasarathib Aug 18, 2023
7eeba7c
Use `dialect.name` in custom SA types (#33503)
Taragolis Aug 18, 2023
3f8c352
Update version_added field for configs in config file (#33509)
ephraimbuddy Aug 18, 2023
dc73e78
Fix typo in `db upgrade` warning message (#33510)
kaxil Aug 18, 2023
a3fa682
Set strict to True when parsing dates in webserver views (#33512)
hussein-awala Aug 20, 2023
f4c2b58
Move license templates out of repo root (#33515)
jedcunningham Aug 19, 2023
df352f3
Stop adding values to rendered templates UI when there is no dagrun (…
hussein-awala Aug 19, 2023
42cfb91
Fix typo in release notes (#33521)
potiuk Aug 19, 2023
5101840
Sort data before groupby in TIS duration calculation (#33535)
Taragolis Aug 24, 2023
d508a9a
Add a fallback in case no first name and last name are set (#33617)
vincbeck Aug 22, 2023
e77f83d
Bind engine before attempting to drop archive tables (#33622)
SamWheating Aug 23, 2023
e6f6dea
Treat dag-defined access_control as authoritative if defined (#33632)
SamWheating Aug 24, 2023
b0f9afb
Set context inside templates (#33645)
ivan-afonichkin Aug 24, 2023
4befd33
Fix 2.7.0 db migration job errors (#33652)
LipuFei Aug 23, 2023
37ac1e8
Add back `get_url_for_login` in security manager (#33660)
vincbeck Aug 23, 2023
2ebfe47
SECURITY_MANAGER_CLASS should be a referrence to class, not a string …
Michalosu Aug 24, 2023
12db5ed
Fix cleaning zombie RESTARTING tasks (#33706)
Bisk1 Aug 24, 2023
e32036e
Add documentation explaining template_ext (and how to override it) (#…
SamWheating Aug 25, 2023
d83c0c5
Use f-string instead of in Airflow core (#33753)
hussein-awala Aug 26, 2023
69fc667
Fix UI DAG counts including deleted DAGs (#33778)
boushphong Aug 27, 2023
e793cf2
Refactor: Simplofy code in dev (#33294)
eumiro Aug 10, 2023
b214417
Refactor: Simplify code in providers/amazon (#33222)
eumiro Aug 9, 2023
5b213b8
Refactor: Simplify code in smaller providers (#33234)
eumiro Aug 20, 2023
2c14bb4
Simplify conditions on len() in other providers (#33569)
eumiro Aug 21, 2023
2aa3344
Refactor: Simplify code in providers/cncf (#33230)
eumiro Aug 8, 2023
fe85781
Consolidate import and usage of itertools (#33479)
eumiro Aug 21, 2023
dffc1d6
Validate SqoopHook connection string and disable extra options from p…
pankajkoti Aug 3, 2023
352c96e
Replace OrderedDict with plain dict (#33508)
eumiro Aug 20, 2023
5727eb6
openlineage: do not try to redact Proxy objects from deprecated confi…
mobuchowski Aug 15, 2023
6587b75
Replace repr() with proper formatting (#33520)
eumiro Aug 20, 2023
f4557e5
Simplify conditions on `len()` in utils (#33567)
eumiro Aug 21, 2023
64b9ebb
Simplify conditions on len() in jobs (#33568)
eumiro Aug 21, 2023
eb96b86
Automatically update the REVISIONS_HEADS_MAP in db.py (#33616)
ephraimbuddy Aug 22, 2023
9314b4d
Fix version heads map pre_commit rule (#33749)
jedcunningham Aug 26, 2023
8043bab
Add limit 1 if required first value from query result (#33672)
Taragolis Aug 24, 2023
70bfb11
Update version to 2.7.1
ephraimbuddy Aug 28, 2023
22df7b1
Fix MappedTaskGroup tasks not respecting upstream dependency (#33732)
ephraimbuddy Aug 29, 2023
d254b5b
Replace AIP-42 label with area:dynamic-task-mapping label (#33870)
eladkal Aug 29, 2023
2d16c70
Raise 404 from Variable PATCH API if variable is not found (#33885)
abhishekbhakat Aug 30, 2023
99a4f9f
Add minimum requirement for sqlalchemy to 1.4.24 (#33892)
potiuk Aug 29, 2023
a141771
Clarify that DAG authors can also run code in DAG File Processor (#33…
potiuk Aug 30, 2023
71e842e
Bumping FAB to 4.3.4 in order to fix issues with filters (#33931)
SamWheating Aug 31, 2023
ebbebf1
Differentiate 0 and unset as a default param values (#33965)
SamWheating Aug 31, 2023
01e2b16
Reinstall CI depdendencies from scratch (#33978)
potiuk Aug 31, 2023
8754b50
Respect "soft_fail" for core async sensors (#33403)
Lee-W Aug 26, 2023
d088626
fix(sensors): move trigger initialization from __init___ to execute (…
Lee-W Aug 30, 2023
f9d653b
Suspend qubole provider (#33889)
potiuk Aug 29, 2023
4dd7530
Reorganize devel_only extra in airflow's setup.py (#33907)
potiuk Aug 31, 2023
ae03ad5
Upgrade to Pydantic 2 (#33956)
potiuk Aug 31, 2023
b83fa2e
Explain the users how they can check if python code is top-level (#34…
potiuk Sep 1, 2023
c874f0f
Use a trimmed version of README.md for PyPI (#33637)
pankajkoti Sep 1, 2023
de95f98
Upgrade Elasticsearch to 8 (#33135)
Owen-CH-Leung Aug 8, 2023
7cd0748
Remove print introduced in PR #32261 (#34008)
pankajkoti Sep 1, 2023
d404d3f
Limit celery by excluding 5.3.2 and 5.3.3 (#34031)
potiuk Sep 2, 2023
590412b
Fix typos (double words and it's/its) (#33623)
eumiro Aug 23, 2023
b5dbf97
Ensure that tasks wait for running indirect setup (#33903)
dstandish Sep 3, 2023
891fae5
Update RELEASE_NOTES.rst
ephraimbuddy Aug 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 13 additions & 1 deletion .github/actions/build-ci-images/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
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"
shell: bash
run: >
breeze release-management generate-constraints --run-in-parallel
--airflow-constraints-mode constraints
if: env.UPGRADE_TO_NEWER_DEPENDENCIES != 'false' and ${{ inputs.build-provider-packages != 'true' }}
- name: "Print dependency upgrade summary"
shell: bash
run: |
Expand All @@ -48,6 +54,12 @@ runs:
cat "files/constraints-${PYTHON_VERSION}/*.md" >> $GITHUB_STEP_SUMMARY || true
done
if: env.UPGRADE_TO_NEWER_DEPENDENCIES != 'false'
- name: "Upload constraint artifacts"
uses: actions/upload-artifact@v3
with:
name: constraints
path: ./files/constraints-*/constraints-*.txt
retention-days: 7
- name: "Fix ownership"
shell: bash
run: breeze ci fix-ownership
Expand Down
21 changes: 19 additions & 2 deletions .github/actions/build-prod-images/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,30 @@ runs:
- name: "Move dist packages to docker-context files"
shell: bash
run: mv -v ./dist/*.whl ./docker-context-files
- name: "Build & Push PROD images ${{ env.IMAGE_TAG }}:${{ env.PYTHON_VERSIONS }}"
- name: "Download constraints from the CI build"
uses: actions/download-artifact@v3
with:
name: constraints
path: ./docker-context-files
if: env.UPGRADE_TO_NEWER_DEPENDENCIES != 'false'
- name: "Build & Push PROD images with source providers ${{ env.IMAGE_TAG }}:${{ env.PYTHON_VERSIONS }}"
shell: bash
run: >
breeze prod-image build --tag-as-latest --run-in-parallel --push
--install-packages-from-context --airflow-constraints-mode constraints-source-providers
--use-constraints-for-context-packages
env:
COMMIT_SHA: ${{ github.sha }}
if: ${{ inputs.build-provider-packages == 'true' }}
- name: "Build & Push PROD images with PyPi providers ${{ env.IMAGE_TAG }}:${{ env.PYTHON_VERSIONS }}"
shell: bash
run: >
breeze prod-image build --tag-as-latest --run-in-parallel --push
--install-packages-from-context --upgrade-on-failure
--install-packages-from-context --airflow-constraints-mode constraints
--use-constraints-for-context-packages
env:
COMMIT_SHA: ${{ github.sha }}
if: ${{ inputs.build-provider-packages != 'true' }}
- name: "Fix ownership"
shell: bash
run: breeze ci fix-ownership
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
}' --jq '.data.node.labels.nodes[]' | jq --slurp -c '[.[].name]' >> ${GITHUB_OUTPUT}
if: github.event_name == 'pull_request_target'
# Retrieve it to be able to determine which files has changed in the incoming commit of the PR
# we checkout the target commit and it's parent to be able to compare them
# we checkout the target commit and its parent to be able to compare them
- name: Cleanup repo
run: docker run -v "${GITHUB_WORKSPACE}:/workspace" -u 0:0 bash -c "rm -rf /workspace/*"
- uses: actions/checkout@v3
Expand Down
31 changes: 19 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ repos:
- --comment-style
- "/*||*/"
- --license-filepath
- license-templates/LICENSE.txt
- scripts/ci/license-templates/LICENSE.txt
- --fuzzy-match-generates-todo
- id: insert-license
name: Add license for all RST files
Expand All @@ -61,7 +61,7 @@ repos:
- --comment-style
- "||"
- --license-filepath
- license-templates/LICENSE.rst
- scripts/ci/license-templates/LICENSE.rst
- --fuzzy-match-generates-todo
files: \.rst$
- id: insert-license
Expand All @@ -72,7 +72,7 @@ repos:
- --comment-style
- "/*!| *| */"
- --license-filepath
- license-templates/LICENSE.txt
- scripts/ci/license-templates/LICENSE.txt
- --fuzzy-match-generates-todo
- id: insert-license
name: Add license for all JINJA template files
Expand All @@ -82,7 +82,7 @@ repos:
- --comment-style
- "{#||#}"
- --license-filepath
- license-templates/LICENSE.txt
- scripts/ci/license-templates/LICENSE.txt
- --fuzzy-match-generates-todo
- id: insert-license
name: Add license for all Shell files
Expand All @@ -92,7 +92,7 @@ repos:
- --comment-style
- "|#|"
- --license-filepath
- license-templates/LICENSE.txt
- scripts/ci/license-templates/LICENSE.txt
- --fuzzy-match-generates-todo
- id: insert-license
name: Add license for all Python files
Expand All @@ -102,7 +102,7 @@ repos:
- --comment-style
- "|#|"
- --license-filepath
- license-templates/LICENSE.txt
- scripts/ci/license-templates/LICENSE.txt
- --fuzzy-match-generates-todo
- id: insert-license
name: Add license for all XML files
Expand All @@ -112,7 +112,7 @@ repos:
- --comment-style
- "<!--||-->"
- --license-filepath
- license-templates/LICENSE.txt
- scripts/ci/license-templates/LICENSE.txt
- --fuzzy-match-generates-todo
- id: insert-license
name: Add license for all Helm template files
Expand All @@ -121,7 +121,7 @@ repos:
- --comment-style
- "{{/*||*/}}"
- --license-filepath
- license-templates/LICENSE.txt
- scripts/ci/license-templates/LICENSE.txt
- --fuzzy-match-generates-todo
- id: insert-license
name: Add license for all YAML files except Helm templates
Expand All @@ -132,7 +132,7 @@ repos:
- --comment-style
- "|#|"
- --license-filepath
- license-templates/LICENSE.txt
- scripts/ci/license-templates/LICENSE.txt
- --fuzzy-match-generates-todo
- id: insert-license
name: Add license for all Markdown files
Expand All @@ -142,7 +142,7 @@ repos:
- --comment-style
- "<!--|| -->"
- --license-filepath
- license-templates/LICENSE.txt
- scripts/ci/license-templates/LICENSE.txt
- --fuzzy-match-generates-todo
- id: insert-license
name: Add license for all other files
Expand All @@ -151,7 +151,7 @@ repos:
- --comment-style
- "|#|"
- --license-filepath
- license-templates/LICENSE.txt
- scripts/ci/license-templates/LICENSE.txt
- --fuzzy-match-generates-todo
files: >
\.cfg$|\.conf$|\.ini$|\.ldif$|\.properties$|\.readthedocs$|\.service$|\.tf$|Dockerfile.*$
Expand Down Expand Up @@ -404,7 +404,8 @@ repos:
language: python
entry: ./scripts/ci/pre_commit/pre_commit_version_heads_map.py
pass_filenames: false
additional_dependencies: ['packaging']
files: ^airflow/migrations/versions|^airflow/__init__.py$
additional_dependencies: ['packaging','google-re2']
- id: update-version
name: Update version to the latest version in the documentation
entry: ./scripts/ci/pre_commit/pre_commit_update_versions.py
Expand Down Expand Up @@ -747,6 +748,12 @@ repos:
exclude: ^tests/system/providers/google/cloud/bigquery/example_bigquery_queries\.py$
pass_filenames: true
additional_dependencies: ['rich>=12.4.4']
- id: generate-pypi-readme
name: Generate PyPI README
entry: ./scripts/ci/pre_commit/pre_commit_generate_pypi_readme.py
language: python
files: ^README\.md$
pass_filenames: false
- id: lint-markdown
name: Run markdownlint
description: Checks the style of Markdown files.
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -677,9 +677,9 @@ druid, elasticsearch, exasol, facebook, ftp, gcp, gcp_api, github, github_enterp
google_auth, grpc, hashicorp, hdfs, hive, http, imap, influxdb, jdbc, jenkins, kerberos, kubernetes,
ldap, leveldb, microsoft.azure, microsoft.mssql, microsoft.psrp, microsoft.winrm, mongo, mssql,
mysql, neo4j, odbc, openfaas, openlineage, opsgenie, oracle, otel, pagerduty, pandas, papermill,
password, pinot, plexus, postgres, presto, qds, qubole, rabbitmq, redis, s3, salesforce, samba,
segment, sendgrid, sentry, sftp, singularity, slack, smtp, snowflake, spark, sqlite, ssh, statsd,
tableau, tabular, telegram, trino, vertica, virtualenv, webhdfs, winrm, zendesk
password, pinot, plexus, postgres, presto, rabbitmq, redis, s3, salesforce, samba, segment,
sendgrid, sentry, sftp, singularity, slack, smtp, snowflake, spark, sqlite, ssh, statsd, tableau,
tabular, telegram, trino, vertica, virtualenv, webhdfs, winrm, zendesk
.. END EXTRAS HERE

Provider packages
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTORS_QUICK_START.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Colima
------
If you use Colima as your container runtimes engine, please follow the next steps:

1. `Install buildx manually <https://github.com/docker/buildx#manual-download>`_ and follow it's instructions
1. `Install buildx manually <https://github.com/docker/buildx#manual-download>`_ and follow its instructions

2. Link the Colima socket to the default socket path. Note that this may break other Docker servers.

Expand Down Expand Up @@ -252,7 +252,7 @@ Typical development tasks
#########################

For many of the development tasks you will need ``Breeze`` to be configured. ``Breeze`` is a development
environment which uses docker and docker-compose and it's main purpose is to provide a consistent
environment which uses docker and docker-compose and its main purpose is to provide a consistent
and repeatable environment for all the contributors and CI. When using ``Breeze`` you avoid the "works for me"
syndrome - because not only others can reproduce easily what you do, but also the CI of Airflow uses
the same environment to run all tests - so you should be able to easily reproduce the same failures you
Expand Down
56 changes: 44 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
# much smaller.
#
# Use the same builder frontend version for everyone
ARG AIRFLOW_EXTRAS="aiobotocore,amazon,async,celery,cncf.kubernetes,daskexecutor,docker,elasticsearch,ftp,google,google_auth,grpc,hashicorp,http,ldap,microsoft.azure,mysql,odbc,pandas,postgres,redis,sendgrid,sftp,slack,snowflake,ssh,statsd,virtualenv"
ARG AIRFLOW_EXTRAS="aiobotocore,amazon,async,celery,cncf.kubernetes,daskexecutor,docker,elasticsearch,ftp,google,google_auth,grpc,hashicorp,http,ldap,microsoft.azure,mysql,odbc,openlineage,pandas,postgres,redis,sendgrid,sftp,slack,snowflake,ssh,statsd,virtualenv"
ARG ADDITIONAL_AIRFLOW_EXTRAS=""
ARG ADDITIONAL_PYTHON_DEPS=""

Expand Down Expand Up @@ -586,17 +586,42 @@ function install_airflow_and_providers_from_docker_context_files(){
return
fi

echo
echo "${COLOR_BLUE}Force re-installing airflow and providers from local files with eager upgrade${COLOR_RESET}"
echo
# force reinstall all airflow + provider package local files with eager upgrade
set -x
pip install "${pip_flags[@]}" --root-user-action ignore --upgrade --upgrade-strategy eager \
${ADDITIONAL_PIP_INSTALL_FLAGS} \
${reinstalling_apache_airflow_package} ${reinstalling_apache_airflow_providers_packages} \
${EAGER_UPGRADE_ADDITIONAL_REQUIREMENTS=}
set +x
if [[ ${USE_CONSTRAINTS_FOR_CONTEXT_PACKAGES=} == "true" ]]; then
local python_version
python_version=$(python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')
local local_constraints_file=/docker-context-files/constraints-"${python_version}"/${AIRFLOW_CONSTRAINTS_MODE}-"${python_version}".txt

if [[ -f "${local_constraints_file}" ]]; then
echo
echo "${COLOR_BLUE}Installing docker-context-files packages with constraints found in ${local_constraints_file}${COLOR_RESET}"
echo
# force reinstall all airflow + provider packages with constraints found in
set -x
pip install "${pip_flags[@]}" --root-user-action ignore --upgrade \
${ADDITIONAL_PIP_INSTALL_FLAGS} --constraint "${local_constraints_file}" \
${reinstalling_apache_airflow_package} ${reinstalling_apache_airflow_providers_packages}
set +x
else
echo
echo "${COLOR_BLUE}Installing docker-context-files packages with constraints from GitHub${COLOR_RESET}"
echo
set -x
pip install "${pip_flags[@]}" --root-user-action ignore \
${ADDITIONAL_PIP_INSTALL_FLAGS} \
--constraint "${AIRFLOW_CONSTRAINTS_LOCATION}" \
${reinstalling_apache_airflow_package} ${reinstalling_apache_airflow_providers_packages}
set +x
fi
else
echo
echo "${COLOR_BLUE}Installing docker-context-files packages without constraints${COLOR_RESET}"
echo
set -x
pip install "${pip_flags[@]}" --root-user-action ignore \
${ADDITIONAL_PIP_INSTALL_FLAGS} \
${reinstalling_apache_airflow_package} ${reinstalling_apache_airflow_providers_packages}
set +x
fi
common::install_pip_version
pip check
}
Expand Down Expand Up @@ -1269,6 +1294,12 @@ COPY --from=scripts common.sh install_pip_version.sh \
# is installed from docker-context files rather than from PyPI)
ARG INSTALL_PACKAGES_FROM_CONTEXT="false"

# Normally constraints are not used when context packages are build - because we might have packages
# that are conflicting with Airflow constraints, however there are cases when we want to use constraints
# for example in CI builds when we already have source-package constraints - either from github branch or
# from eager-upgraded constraints by the CI builds
ARG USE_CONSTRAINTS_FOR_CONTEXT_PACKAGES="false"

# In case of Production build image segment we want to pre-install main version of airflow
# dependencies from GitHub so that we do not have to always reinstall it from the scratch.
# The Airflow (and providers in case INSTALL_PROVIDERS_FROM_SOURCES is "false")
Expand All @@ -1293,6 +1324,7 @@ ARG VERSION_SUFFIX_FOR_PYPI=""

ENV ADDITIONAL_PYTHON_DEPS=${ADDITIONAL_PYTHON_DEPS} \
INSTALL_PACKAGES_FROM_CONTEXT=${INSTALL_PACKAGES_FROM_CONTEXT} \
USE_CONSTRAINTS_FOR_CONTEXT_PACKAGES=${USE_CONSTRAINTS_FOR_CONTEXT_PACKAGES} \
VERSION_SUFFIX_FOR_PYPI=${VERSION_SUFFIX_FOR_PYPI}

WORKDIR ${AIRFLOW_HOME}
Expand Down Expand Up @@ -1325,7 +1357,7 @@ RUN if [[ -f /docker-context-files/requirements.txt ]]; then \

##############################################################################################
# This is the actual Airflow image - much smaller than the build one. We copy
# installed Airflow and all it's dependencies from the build image to make it smaller.
# installed Airflow and all its dependencies from the build image to make it smaller.
##############################################################################################
FROM ${PYTHON_BASE_IMAGE} as main

Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -1233,7 +1233,7 @@ ARG PYTHON_BASE_IMAGE
ARG AIRFLOW_IMAGE_REPOSITORY="https://github.com/apache/airflow"

# By increasing this number we can do force build of all dependencies
ARG DEPENDENCIES_EPOCH_NUMBER="8"
ARG DEPENDENCIES_EPOCH_NUMBER="9"

# Make sure noninteractive debian install is used and language variables set
ENV PYTHON_BASE_IMAGE=${PYTHON_BASE_IMAGE} \
Expand Down Expand Up @@ -1317,7 +1317,7 @@ ARG AIRFLOW_CONSTRAINTS_LOCATION=""
ARG DEFAULT_CONSTRAINTS_BRANCH="constraints-main"
# By changing the epoch we can force reinstalling Airflow and pip all dependencies
# It can also be overwritten manually by setting the AIRFLOW_CI_BUILD_EPOCH environment variable.
ARG AIRFLOW_CI_BUILD_EPOCH="4"0
ARG AIRFLOW_CI_BUILD_EPOCH="5"
ARG AIRFLOW_PRE_CACHED_PIP_PACKAGES="true"
# By default in the image, we are installing all providers when installing from sources
ARG INSTALL_PROVIDERS_FROM_SOURCES="true"
Expand Down Expand Up @@ -1377,7 +1377,7 @@ RUN echo "Airflow version: ${AIRFLOW_VERSION}"
# force them on the main Airflow package. Currently we need no extra limits as PIP 23.1+ has much better
# dependency resolution and we do not need to limit the versions of the dependencies
# aiobotocore is limited temporarily until it stops backtracking pip
ARG EAGER_UPGRADE_ADDITIONAL_REQUIREMENTS="aiobotocore<2.6.0"
ARG EAGER_UPGRADE_ADDITIONAL_REQUIREMENTS=""
ARG UPGRADE_TO_NEWER_DEPENDENCIES="false"
ARG VERSION_SUFFIX_FOR_PYPI=""

Expand Down
6 changes: 3 additions & 3 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ druid, elasticsearch, exasol, facebook, ftp, gcp, gcp_api, github, github_enterp
google_auth, grpc, hashicorp, hdfs, hive, http, imap, influxdb, jdbc, jenkins, kerberos, kubernetes,
ldap, leveldb, microsoft.azure, microsoft.mssql, microsoft.psrp, microsoft.winrm, mongo, mssql,
mysql, neo4j, odbc, openfaas, openlineage, opsgenie, oracle, otel, pagerduty, pandas, papermill,
password, pinot, plexus, postgres, presto, qds, qubole, rabbitmq, redis, s3, salesforce, samba,
segment, sendgrid, sentry, sftp, singularity, slack, smtp, snowflake, spark, sqlite, ssh, statsd,
tableau, tabular, telegram, trino, vertica, virtualenv, webhdfs, winrm, zendesk
password, pinot, plexus, postgres, presto, rabbitmq, redis, s3, salesforce, samba, segment,
sendgrid, sentry, sftp, singularity, slack, smtp, snowflake, spark, sqlite, ssh, statsd, tableau,
tabular, telegram, trino, vertica, virtualenv, webhdfs, winrm, zendesk
# END EXTRAS HERE

# For installing Airflow in development environments - see CONTRIBUTING.rst
Expand Down
Loading