Commit Graph
74 Commits
Author SHA1 Message Date
github-actions[bot]andJarek Potiuk 47dd611cfd [main] Upgrade important CI environment (#71590)
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
2026-08-20 13:53:59 +08:00
github-actions[bot] 0e6ad21034 [main] CI: Upgrade important CI environment (#70501)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-13 16:27:29 +02:00
bujjibabukatta 516e4afba1 Add tdsodbc to the image so the FreeTDS ODBC driver is available (#71265)
closes: #71205
2026-08-13 01:15:38 +08:00
Jarek Potiuk bddb64f8d6 Document 3.3.0 image databricks constraint fix in Dockerfile changelog (#70083)
Record in the 'Changes after publishing the images' table that the 3.3.0 Python 3.11/3.12 images had their downgraded databricks stack corrected (provider 6.13.0 -> 7.16.1, connector 2.0.2 -> 4.2.5, thrift 0.23.0 -> 0.16.0).

related: #69603
2026-07-19 05:02:03 +02:00
github-actions[bot] c8d313a5d2 [main] Upgrade important CI environment (#69694) 2026-07-16 17:52:34 +08:00
Arkadiusz Bach b8cb62a651 Warm-shutdown supervisor on SIGTERM instead of killing the running task (#69034) 2026-07-01 19:47:05 +02:00
Andrew Chang 899ce98b5c Add docker stack docs example for venv scene (#69088) 2026-06-29 06:38:29 +02:00
Rahul Vats 5aa3ff7d17 Upgrade the Airflow version to 3.4.0 and Task SDK version to 1.4.0 (#69085) 2026-06-27 15:56:36 +01:00
Rahul Vats bb859bde5a Add opensearch to default PROD image extras (#68659)
#65374 added opensearch to prod_image_installed_providers.txt (so the PROD
image verify asserts it is installed) but did not add it to the default
image extras. opensearch is therefore the only required provider that is
neither a default extra nor a bundled core dependency, so its only path
into the image was being built from source.

On a release branch the source build skips already-released providers
(the final tag providers-opensearch/<v> exists), so opensearch is the
single required provider with no fallback and the PROD image verify
(test_required_providers_are_installed) fails. main passes only because
its dev-mode build compiles every provider from source in-place.

Add opensearch to the default extras so it is backfilled from PyPI the
same way every other required provider is, making the PROD image
consistent across dev and release builds.
2026-06-17 12:56:10 +05:30
github-actions[bot] 5f8d7400a8 [main] CI: Upgrade important CI environment (#68436)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-12 17:38:06 +02:00
Jens Scheffler f636d83bd9 [main] Upgrade important CI environment (#68163)
* [main] CI: Upgrade important CI environment

* Fix end of file in providers-deps
2026-06-07 20:21:06 +02:00
Jens Scheffler 5108abeda3 Fix pyproject docker stack name (#67778) 2026-05-30 17:30:11 +02:00
github-actions[bot] a2d5fa9c43 [main] CI: Upgrade important CI environment (#67593)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-27 15:13:16 +02:00
github-actions[bot] f3f7e909b0 [main] CI: Upgrade important CI environment (#67313)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-25 09:58:55 +02:00
github-actions[bot] 8a76a8926e [main] CI: Upgrade important CI environment (#66843)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-14 10:37:39 +02:00
github-actions[bot] 6f306eb780 [main] CI: Upgrade important CI environment (#66068)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-04 09:22:00 +02:00
github-actions[bot] 29477eaa6f [main] CI: Upgrade important CI environment (#65933)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-27 11:22:00 +02:00
github-actions[bot] 3a40713353 [main] CI: Upgrade important CI environment (#65521)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-20 17:51:22 +02:00
Christos Bisias 6957d9da57 upgrade the airflow-core version to 3.3.0 and task-sdk version to 1.3.0 (#65317) 2026-04-15 19:14:25 +01:00
DaveT1991andCopilot d212f624cf Sync default image Python version references (#64994)
* Sync default image Python version references

* Fix mypy type error in _read_global_constants_assignment return type

Since ast.literal_eval() returns Any, annotating the private helper as
returning str | list[str] caused mypy errors in both callers: assigning
the result to `list[str]` and returning it as `str`. Changing the return
type to Any (which matches ast.literal_eval) resolves both without
requiring casts.

* Update scripts/ci/prek/common_prek_utils.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-11 11:10:00 +02:00
Jason(Zhe-You) Liu 048e2813e1 CI: Upgrade important CI environment (#64451)
Bump tomli from `2.4.0` to `2.4.1`.
2026-03-30 15:00:43 +08:00
Jarek Potiuk abfda18a46 Add 4-day cooldown for uv dependency resolution (#64249)
Set `exclude-newer = "4 days"` in `[tool.uv]` to only consider package
versions uploaded at least 4 days ago. This provides supply-chain security
by giving the community time to identify and remediate compromised releases.

Also downgrade pyodps requirement for Python >= 3.13 from >=0.12.6 to
>=0.12.5.1 since 0.12.6 was published within the cooldown window.
2026-03-27 19:03:24 +01:00
Wei Lee 526768d721 [main] Upgrade important CI environment (#64239) 2026-03-26 17:50:21 +08:00
Dev-iL df1e397ada Mention Python 3.14 support in docs (#63950) 2026-03-21 03:20:37 +02:00
Dev-iLandClaude Opus 4.6 be8252e628 Add Python 3.14 Support (#63520)
* Update python version exclusion to 3.15

* Add 3.14 metadata version classifiers and related constants

* Regenerate Breeze command help screenshots

* Assorted workarounds to fix breeze image building

- constraints are skipped entirely
- greenlet pin updated

* Exclude cassandra

* Exclude amazon

* Exclude google

* CI: Only add pydantic extra to Airflow 2 migration tests

Before this fix there were two separate issues in the migration-test setup for Python 3.14:

1. The migration workflow always passes --airflow-extras pydantic.
2. For Python 3.14, the minimum Airflow version is resolved to 3.2.0 by get_min_airflow_version_for_python.py, and apache-airflow[pydantic]==3.2.0 is not a valid thing to install.

So when constraints installation fails, the fallback path tries to install an invalid spec.

* Disable DB migration tests for python 3.14

* Enforce werkzeug 3.x for python 3.14

* Increase K8s executor test timeout for Python 3.14

Python 3.14 changed the default multiprocessing start method from 'fork' to 'forkserver' on Linux. The forkserver start method is slower because each new process must import modules from scratch rather than copying the parent's address space. This makes `multiprocessing.Manager()` initialization take longer, causing the test to exceed its 10s timeout.

* Adapt LocalExecutor tests for Python 3.14 forkserver default

Python 3.14 changed the default multiprocessing start method from
'fork' to 'forkserver' on Linux.  Like 'spawn', 'forkserver' doesn't
share the parent's address space, so mock patches applied in the test
process are invisible to worker subprocesses.

- Skip tests that mock across process boundaries on non-fork methods
- Add test_executor_lazy_worker_spawning to verify that non-fork start
  methods defer worker creation and skip gc.freeze
- Make test_multiple_team_executors_isolation and
  test_global_executor_without_team_name assert the correct worker
  count for each start method instead of assuming pre-spawning
- Remove skip from test_clean_stop_on_signal (works on all methods)
  and increase timeout from 5s to 30s for forkserver overhead

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Bump dependencies to versions supporting 3.14

* Fix PROD image build failing on Python 3.14 due to excluded providers

The PROD image build installed all provider wheels regardless of Python
version compatibility. Providers like google and amazon that exclude
Python 3.14 were still passed to pip, causing resolution failures (e.g.
ray has no cp314 wheel on PyPI).

Two fixes:
- get_distribution_specs.py now reads each wheel's Requires-Python
  metadata and skips incompatible wheels instead of passing them to pip.
- The requires-python specifier generation used !=3.14 which per PEP 440
  only excludes 3.14.0, not 3.14.3. Changed to !=3.14.* wildcard.

* Split core test types into 2 matrix groups to avoid OOM on Python 3.14

Non-DB core tests use xdist which runs all test types in a single pytest
process. With 2059 items across 4 workers, memory accumulates until the
OOM killer strikes at ~86% completion (exit code 137).

Split core test types into 2 groups (API/Always/CLI and
Core/Other/Serialization), similar to how provider tests already use
_split_list with NUMBER_OF_LOW_DEP_SLICES. Each group gets ~1000 items,
well under the ~1770 threshold where OOM occurs.

Update selective_checks test expectations to reflect the 2-group split.

* Gracefully handle an already removed password file in fixture

The old code had a check-then-act race (if `os.path.exists` → `os.remove`), which fails when the file doesn't exist at removal time. `contextlib.suppress(FileNotFoundError)` handles this atomically — if the file is missing (never created in this xdist worker, or removed between check and delete), it's silently ignored.

* Fix OOM and flaky tests in test_process_utils

Replace multiprocessing.Process with subprocess.Popen running minimal
inline scripts. multiprocessing.Process uses fork(), which duplicates
the entire xdist worker memory. At 95% test completion the worker has
accumulated hundreds of MBs; forking it triggers the OOM killer
(exit code 137) on Python 3.14.

subprocess.Popen starts a fresh lightweight process (~10MB) without
copying the parent's memory, avoiding the OOM entirely.

Also replace the racy ps -ax process counting in
TestKillChildProcessesByPids with psutil.pid_exists() checks on the
specific PID — the old approach was non-deterministic because unrelated
processes could start/stop between measurements.

* Add prek hook to validate python_version markers for excluded providers

When a provider declares excluded-python-versions in provider.yaml,
every dependency string referencing that provider in pyproject.toml
must carry a matching python_version marker. Missing markers cause
excluded providers to be silently installed as transitive dependencies
(e.g. aiobotocore pulling in amazon on Python 3.14).

The new check-excluded-provider-markers hook reads exclusions from
provider.yaml and validates all dependency strings in pyproject.toml
at commit time, preventing regressions like the one fixed in the
previous commit.

* Update `uv.lock`

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 23:03:46 +02:00
Jarek Potiuk 444d45c6ce Add *.iml to .gitignore in all distributions (#63636)
IntelliJ IDEA .iml files could end up in sdist/wheel packages when
building distributions that lack their own .gitignore. Adding *.iml
to every distribution's .gitignore ensures these IDE metadata files
are excluded from built packages.
2026-03-15 14:05:58 +01:00
Jarek Potiuk 54acc0f2d7 CI: Upgrade important CI environment (#62792) 2026-03-03 16:51:33 +01:00
Jarek Potiuk 12906fed21 Add release notes about grpcio downgraded for Python 3.12, 2.11.1 image. (#62635) 2026-02-28 18:38:18 +01:00
Jarek Potiuk 0699930e26 CI: Upgrade important CI environment (#62610) 2026-02-28 08:51:07 +01:00
Jarek PotiukandClaude Opus 4.6 94e189618a Fix all build-system/requires including transitive dependencies (#62570)
* Fix all build-system/requires including transitive dependencies

Add a feature to fix all build-system/requires to make build
reproducibility works. The build-system requires are managed
automatically by the `upgrade-important-versions` prek hook.

This should not only provide reproducibility, but also it should
prevent cases where transient dependency upgrade might break
building sdist (for example as it happened with virtualenv 21
breaking hatchling with https://github.com/pypa/hatch/issues/2193

* Fix mypy 'Cannot infer type of lambda' error in upgrade script

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 21:05:52 +01:00
Jarek Potiuk 22833f1ee8 Update release notes for dockerfiles with 2.11.1 changes. (#62383) 2026-02-23 23:23:36 +01:00
konsti 66b54f8cf5 Remove UV_HTTP_TIMEOUT (#62029)
* Remove `UV_HTTP_TIMEOUT`

See https://github.com/apache/airflow/discussions/61205.

Airflow is a large, popular project and a reference for other projects. I'd like to remove the historic use of `UV_HTTP_TIMEOUT`, that isn't required today anymore with the changes in uv. This will also benefit airflow, as broken network connections will fail much faster (either triggering a retry quicker, or reporting to the user in less than 4 x 300s = 20min)

I've kept the CLI option in the dev script to not break existing invocations, I can also remove it if you think it's safe

* Remove `--uv-http-timeout` from launchers too
2026-02-17 23:39:04 +01:00
Jarek Potiuk eb968372fc Allow to use short SPDX licence identifier for selected files (#62073)
While we have some discussion on-going whether we should use some
shorter, machine-readable friendly versions of licence specification
in our source code headers here [1], the notion is that:

a) PMC can make judgment calls when to include different versions of
   the licence

b) This expectation only applies to the code we actually release
   in our official releases.

This change makes some judgment call on using much shorter, SPDX
driven licence headers in some specific files:

* markdown files that are intended to be consumed by agents
  (AGENTS.md, SKILLS.md, CLAUDE.md and so on)

* all the markdown .github/* files that are clearly meta-data for
  GitHub and which we exclude from released sources

We also make sure all those files are excluded from the official
source releases and distribution packages we prepare.

[1] https://lists.apache.org/thread/j1tn63r2lf13v3d1tnnqff8fkcl4nx53
2026-02-17 23:38:20 +01:00
caa02fd81e Add description on how 3rd-party dependency security issues are handled (#61956)
* Add description on how 3rd-party dependency security issues are handled

Our users seem to not have a good idea on how 3rd-party dependencies
are handled and how they should approach it and open issues that are
often closed and we need to explain them what is expected of them -
they have pretty unrealistic expecations that every single CVE in
every single dependency will be addressed when they open an issue.

This description clarifies how handling of 3rd-party dependency
issues should be done and what are responsibilities and expectations
of the users, and what they can expect from the maintainers.

This will help us to direct such users to this process without
spending our time on explaining it over and over again.

Apply suggestions from code review

Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com>

* Update airflow-core/docs/security/vulnerabilities-in-3rd-party-dependencies.rst

Co-authored-by: Shahar Epstein <60007259+shahar1@users.noreply.github.com>

* Update airflow-core/docs/security/vulnerabilities-in-3rd-party-dependencies.rst

Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>

---------

Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com>
Co-authored-by: Shahar Epstein <60007259+shahar1@users.noreply.github.com>
Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>
2026-02-16 13:46:29 +01:00
Srabasti Banerjee b2d406b462 Fixing typo in provider count from 60 to 90 (#61925) 2026-02-16 01:37:04 +01:00
Jens Scheffler ac9e4be2c9 Fix mpi4py building in CI (#61581) 2026-02-07 12:23:20 +01:00
Guan-Ming (Wesley) Chiu e70ac0f6bd Bump mpi4py to 4.1.0 in build-essential extend example Dockerfile (#61575)
Signed-off-by: Guan-Ming (Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
2026-02-07 09:45:54 +02:00
shubhamkotiandShubham Koti 8a9951e36b Docs: remove duplicated Docker image documentation (#60201)
Co-authored-by: Shubham Koti <shubhamkoti@gmail.com>
2026-01-07 12:08:37 +01:00
Brandon Kaplan d0bb4ad34d Update Dockerfile (#59569)
grammar fix in comment
2025-12-17 16:42:59 +01:00
Jarek Potiuk bcda5080b8 Do not remove .pyc and .pyo files after building Python (#58944)
With .pyc files removal after compilation we save very little
space. Uncompressed sizes of regular airflow image are:

Before  7.63GB
After   7.66GB

So we have images bigger by < 0.5%

And it seems that long running containers without those files can
suffer from continuous attempts to recreate the .pyc files that
fail due to lack of permissions and cause negative dentries to
be continuously created:

https://lwn.net/Articles/814535/

Those negative dentries are created by kernel - caching the fact
that a file was not available - which speeds up lookup but also
takes a bit of memory. It seems that when compiled Python has
the .pyc files removed, it tries to recreate them with timestamped
entries every time new interpreter is started.

While this is not a problem for long running processes - because
those interpreters are run exactly once per container, this is
a problem if you use `exec` in containers to run Health Checks.

Evey health-check creates a new interpreter and every time it is
created, a new negative dentries to take kernel memory.

By not removing the .pyc files we increase a bit the size of the
image but improve a little the startup time (no need to compile
Python internal .py files, as well as get rid of the negative
dentries problem.

This PR likely:

Fixes: #58509
Fixes: #42195
2025-12-02 16:04:52 +01:00
Subham 1914cff318 feat: add PYTHON_LTO build arg for FIPS compliance (#58583)
* feat: add PYTHON_LTO build arg for FIPS compliance

* Fix static checks and add newsfragment for FIPS support

* docs: add comprehensive LTO-FIPS documentation with MD5 explanation

* docs: add FIPS compliance documentation and note about other potential incompatibilities

* Fix spelling and update Dockerfiles

* Fix formatting errors via pre-commit
2025-11-28 22:53:17 +01:00
Jarek Potiuk e7cf65045a Consistently exclude Python 3.14 (#58657)
Since UV and other installers essentially ignore < limit in the
python-requires, a good practice is to simply exclude current Python
versions that we **know** we are not compatible with rather than
using <.

Python 3.14 is a thing now and people will get it by default as
latest versions, but we do not run our tests with Python 3.14
yet (not until March/April 2026). Providers have all
upper-bind exclusion except those that do not support Python 3.13,
but that's ok because they are actually limited by Airflow they
can be installed on. But for distributions like airflow-ctl,
we should explicitly exclude 3.14 until we support and test it.

This PR synchronizes all python-requires in non-provider
distribution to consistently exclude Python 3.14 with !=.
2025-11-25 01:36:48 +01:00
Jarek Potiuk 11fbd848a2 Convert all airflow distributions to be compliant with ASF requirements (#58138)
According to https://www.apache.org/legal/src-headers.html#faq-binaries
all our released source packages and binaries should have both LICENCE
and NOTICE files - even if we do not have any 3rd-party software embedded.

This PR updates it accross the board and makes sure that all our
distributions contain both LICENCE and NOTICE file and that they
are added as "licence" information to all our distribution packages
when they are built.

This PR also modernizes all our pyproject.toml files with regards
to latest metadata for licenses:

* license-file is an array of glob patterns
* license is s license expression
* the deprecated Trove Classifier is removed

Inspired by #58131
2025-11-10 17:22:44 +01:00
Jarek Potiuk f8f976dffc Remove MySQL client (#57146)
As discussed in https://lists.apache.org/thread/cwfmqbzxsm0gobtpo8kmfr99nfv29c2y
we are temporarily (or not) removing MySQL client support from Airflow
container images in order to stop our CI canary builds from failing.

If consensus or vote will be reached to remove it, we will leave it as
is, if we will find other ways how to keep mysql client support, we
will revert that change and restore MySQL client support.
2025-10-23 14:07:28 +02:00
Amogh Desai cc16b1ab71 Bump python 3.9 to 3.9.23 and 3.12 to 3.12.12 (#56505) 2025-10-09 11:43:16 -07:00
Jarek Potiuk 19fd4dea35 Update changelog of dockerfile to include Fab missing in Python 3.13 (#56176)
Closes: #56123
2025-09-28 00:18:42 -07:00
Creative AtaraxiaandRoy M. 90f9c7026a fix(docker/entrypoint_prod.sh): prevent the script from code 2 after db migrate success (#52928)
* fix(docker): prevent airflow-init from failing after db migrate where no command is passed-in

* docs(docker-stack-docs/entrypoint.rst): container clean exit behavior with _AIRFLOW_DB_MIGRATE and no command

* chore: update inlined Dockerfile after entrypoint.sh script change

---------

Co-authored-by: Roy M. <roy.ma9@gmail.com>
2025-09-15 20:20:11 +01:00
Kaxil Naik c22df6d805 Make the main branch target to Airflow 3.2 & Task SDK 1.2 (#55493)
Since 3.1 release branch is out and we are in beta phase, let's continue development in main for the next minor release.
2025-09-11 10:07:59 -06:00
GPK 3e776cc564 CI: Bump UV and Ruff (#55480)
* Bump UV and Ruff

* Fix ruff static check errors
2025-09-11 01:13:45 +01:00
Jarek Potiuk 4a80df4ff6 Fix, cleanup and refactor adding apt dependencies when building image (#55151)
After migrating to python built from sources, it turned out that we
had a weird mixture of system and source build python in our CI images
images. There were some dependencies installed that installed
python3 debian dependencies and they were breaking the way how source
build python 3.11 interacted with system one. Namely - debian Python 3.11
had internal ABI incompatibility between 3.11.4 and 3.11.5 that caused
the ssl build with latest 3.11.5 fail when 3.11.5 system python has been
installed while the new python was being built - because system includes
interfered with the build process.

The system python was pulled by "software-properties-common" and "gdb" -
we do not need to use either of them during the build process, and user
in

In order to avoid this, we now make sure that we do not install any
debian dependencies that pull any of the python3 system packages, before
we install Python from sources.

We also reviewed and cleaned the way how we configure list of packages
installed during image building:

* packages are reviewed and unnecessary ones removed
* packages that are pulling python3 system packages are moved to
  additional apt dev dependencies
* additional apt dev dependencies are installed AFTER python is
  installed
* the packages listed in scripts are now one-per-line
* they are alphabetically sorted
* finally LD_LIBRARY_PATH is set to have the "source-installed"
  python libraries to be always prioritised against the system
  libraries if system libraries are installed to the main "/usr/lib"
  directories.
2025-09-01 23:16:20 +02:00