Commit Graph

1427 Commits

Author SHA1 Message Date
Jarek Potiuk
fbe3fc927e Move task_sdk to a standalone task-sdk distribution (#47451)
This is the next stage of refactoring of airflow packages, after
moving providers to standalone dstribution and separating devel-common
as a common distribution.

The `task_sdk` has been renamed to `task-sdk` - this way we will
never import anything in task_sdk accidentally starting from content
root. Some changes have been needed to make it works:

* autouse fixture was added to pytest plugin to add `task-sdk/tests`
  to PYTHONPATH to make it root import
* all tests were moved to `task_sdk` package inside the tests folder
* all imports for tests are now `from task_sdk`
* common tools for task_sdk has been moved to
  `devel-common/src/test_utils/task_sdk.py` in order to allow importing
  them before `task-sdk/tests` is added to pythonpath
2025-03-06 21:38:32 +01:00
GPK
f59f0226e7 Extract secrets explicitly and assign (#47278) 2025-03-02 20:57:05 +01:00
Elad Kalif
33893c4860 include area:providers in boring cyborg labels (#47276) 2025-03-02 16:50:17 +02:00
GPK
67b4325b9c Fix permissions for aws-creds in publish-docs job (#47272)
* Fix permissions for aws-creds in publish-docs job

* Add content read permissions on caller workflow
2025-03-02 13:06:23 +01:00
Jarek Potiuk
f015a947d6 Limit secrets passed to reusable workflows (#47258)
Good practice (pointed out by zizmor) is to explicitly only pass
the needed secrets to called reusable workflows. This PR does
exactly this.
2025-03-01 23:52:22 +01:00
Jarek Potiuk
ae7d4d8b02 Automatically upgrade node when upgrading installers (#47247) 2025-03-01 16:23:59 +01:00
Jarek Potiuk
5e8d8afdd8 Upgrade to latest version of uv (#47243) 2025-03-01 13:52:17 +01:00
Vikram Koka
ca4f094c76 Common Message Queue (#46694)
This is provider package similar to those and is intended to be an abstraction over Apache Kafka, Amazon SQL, and Google PubSub to begin with. It can then be expanded to other messaging systems based on community adoption.

The initial goal with this is to provide a simple abstraction for integrating Event Driven Scheduling coming with Airflow 3 to message notification systems such as Kafka, currently being used to publish data availability.

---------

Co-authored-by: vincbeck <vincbeck@amazon.com>
Co-authored-by: Vincent <97131062+vincbeck@users.noreply.github.com>
Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
2025-03-01 12:49:36 +01:00
Jens Scheffler
65d00988ed Remove api_connexion (#47171)
---------

Co-authored-by: vincbeck <vincbeck@amazon.com>
2025-03-01 12:43:03 +01:00
Elad Kalif
6aaec164ba Update bug report template for Airflow 3 (#47144) 2025-02-27 19:45:45 +02:00
Brent Bovenzi
51415547d6 Remove old UI and webserver (#46942)
Co-authored-by: Ash Berlin-Taylor <ash@apache.org>
Co-authored-by: Jed Cunningham <jedcunningham@apache.org>
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
Co-authored-by: vincbeck <vincbeck@amazon.com>
Co-authored-by: Jens Scheffler <jscheffl@apache.org>
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>
Co-authored-by: vatsrahul1001 <43964496+vatsrahul1001@users.noreply.github.com>
Co-authored-by: GPK <gopidesupavan@gmail.com>
Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com>
Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
2025-02-26 18:53:35 -07:00
Jed Cunningham
83e4a6d16a Move plugin docs page to administration-and-deployment section (#47124)
This is a better home now - it's all targeted toward deployment managers
ultimately.
2025-02-26 14:23:10 -07:00
GPK
00ff7fa50c Add provider dependency group to dependaboat config (#46948) 2025-02-21 17:34:57 +01:00
Mikhail Dengin
69a0795930 boring-cyborg add area:API for PRs in airflow/api_fastapi (#46963)
* boring-cyborg config to add `area:API` for PRs with change in `airflow/api_fastapi`

* Add tests/api_fastapi to labeling
2025-02-21 17:14:26 +02:00
Ash Berlin-Taylor
18396ed808 Rework the TriggererJobRunner to run triggers in a process without DB access (#46677)
This uses a similar approach to the DAG Parser -- the subprocess runs the async
Triggers (i.e. user code) in a process and sends messages back and forth to the
supervisor/parent to perform CRUD operations on the DB.

I have also massively re-worked how per-trigger logging works to greatly
simplify it. I hope @dstandish will approve. The main way it has been
simplified is with the switch to TaskSDK then _all_ (100%! Really) of logs are
set as JSON over a socket to the parent process; everything in the subprocess
logs to this output, there is no differentiation needed in stdlib, no custom
handlers etc. and by making use of structlog's automatic context vars we can
include a trigger_id field -- if we find that we route the output to the right
trigger specific log file.

This is all now so much simpler with structlog in the mix.

Logging from the async process works as follows:
- stdlib logging is configured to send messages via struct log as json
- As part of the stdlib->structlog processing change we include structlog bound
  contextvars
- When a triggerer coro starts it binds `trigger_id` as a paramter
- When the Supervisor receives a log message (which happens as LD JSON over a
  dedicated  socket channel) it parses the JSON, and if it finds `trigger_id`
  key in there it redirects it to the trigger file log, else prints it.

Of note: I haven't allowed triggers to directly access or set Xcom, Variables
etc. We can add that in future if there is demand.
2025-02-18 09:39:31 +00:00
Jarek Potiuk
cd0c32bb53 Upgrade installers to latest versions (#46834) 2025-02-17 20:25:03 +01:00
Kunal Bhattacharya
2db5dbefab Upgrade ubuntu runner to 22.04 as per deprecation notice (#46830) 2025-02-17 18:57:14 +01:00
Jarek Potiuk
e23d53fe33 Remove old provider references and replace "new" with just providers (#46810)
There was a lot of code and references to old provider ways of handling
old structure of providers. Once all providers have been moved, we can
now remove that old code and rename old the "new_providers" references
to just "providers"
2025-02-17 14:23:47 +01:00
Jarek Potiuk
4d5846f58f Move provider_tests to unit folder in provider tests (#46800) 2025-02-16 12:34:25 +01:00
Jarek Potiuk
e027457a24 Removed the unused provider's distribution (#46608)
This is a set of cleanup steps (first stage) that allow us to remove
the "intermediate" provider's distribution from Airlfow code and replace
it fully with individual provider's distributions - already with own
`pyproject.toml` files and basically being (when we complete) a
completely separate distributions from Airflow and without implicit
dependencies between unrelated distributions.

There are a number of other changes needed but that one is only focusing
on removing all references to the "umbrella" `providers` distribution
and consequences of removing it.

Those are the changes implemented in this PR:

* There are no separate "providers" system tests - each provider has
  own system tests and there are no common "generic" providers empty
  system test

* Integration tests are moved to respective providers under the
  `integration` package inside `tests` directory

* (nearly) empty __init__.py files are added in `tests` directories
  of providers - this way "tests" becomes just a directory and root
  for all tests per provider, rather than a Python package on its own.
  That allows to use "from integration.PROVIDER import" and
  "from system.PROVIDER" rather than importing them from the root of
  the whole airflow project. The (nearly) is because we need to
  handle multiple "system", "system.apache" and other import locations.

* Removed references to "providers/" generic package which were
  scheduled for removal after all providers are moved to the new
  structure

* Few remaining references / links referring to old "providers/src" and
  "providers/test" have been fixed.

* The "conftest.py" files in all providers are trimmed down - the code
  to store ignored deprecation warnings have been moved to the
  test_common pytest_plugin. That allows to remove 90+ duplicated
  snippets of deprecation_warnings retrieval while keeping the warnings
  per-provider in the provider's distribution.

* The "moving_providers" scripts are removed. They've done their job and
  are not needed any more - we keep them in history

* The __init__.py files are automatically checked and properly updated
  in provider folders - in order to properly handle path extension
  mechanisms

* The www tests that were using FAB permisssion model are moved to the
  FAB provider tests.
2025-02-15 17:44:24 +01:00
Jed Cunningham
d1e617c48c Fix constraints generation for 3.9-3.11 (#46744)
When we switched to sequential in #46223, we missed actually passing the
python version. Oops.
2025-02-14 08:42:59 +01:00
Jarek Potiuk
024e23ddba Always clean airflow installation in provider's compatibility tests (#46693)
So far cleaning airflow installation only happened in canary runs
and it caused some PRs not failing when they should - for exmaple
the #45294 was green when it should fail because uuid6 package was
not removed before installing old version of Airlfow.

Cleaning airflow installation is fast with uv so we should be
ok with running it always for compatibility tests.
2025-02-12 21:12:14 +01:00
Utkarsh Sharma
177aae4042 Airflow 2.10.5 has been released (#46623) 2025-02-10 11:18:01 -07:00
Jarek Potiuk
fdb934fa06 Migrate Amazon provider package (#46590)
Fixes: #46045

Co-authored-by: Niko Oliveira <onikolas@amazon.com>
2025-02-09 09:17:18 +01:00
Kunal Bhattacharya
fd606b1d6e Provider moving/microsoft azure (#46254)
* Update provider.yaml

* renaming files

* moving microsoft.azure provider files to new folder structure

* moving microsoft.azure provider files to new folder structure

* Fixing breeze unit test params

* Static checks fixes

* Remove ms azure ignore from pytest args

* Add pattern match to leave out ms azure providers

* Fix pytest args for test types

* Removed dead code

* Added pytest fixtures to conftest.py

* Added powerbi pytest fixture to conftest.py

* Fixes for failing tests

* Fixes for failing tests

* Moved conftest.py

* Fix for failing compat and provider tests

* Move conftest.py to providers/microsoft/azure/tests/ and associated imports changes

* Path changes to read resource files correctly

* Removed microsoft from providers/tests

* fixup! Removed microsoft from providers/tests

---------

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
2025-02-08 22:11:26 +01:00
Jens Scheffler
0609e00b99 Correct some CODEOWNER entries (#46588) 2025-02-08 19:22:50 +01:00
Josix
1cde11a447 Move databricks provider to new structure (#46207)
* refactor(providers/databricks): move databricks provider to new structure

* remove unused caplog

---------

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
2025-02-07 17:24:32 +01:00
LIU ZHE YOU
d45840cf0f Move Apache HDFS to new provider structure (#46140)
* Move Apache HDFS to new provider structure

* Fix check-for-inclusive-language ignore

* fixup! Fix check-for-inclusive-language ignore

---------

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
2025-02-07 16:15:22 +01:00
Jarek Potiuk
1faa4fd7f1 Move smtp provider to the new structure (#46556)
Part of #46045
2025-02-07 16:07:46 +01:00
Jarek Potiuk
ea07814a72 Fix CODEOWNERS after providers have been moved (#46538) 2025-02-06 22:17:02 +01:00
Pratiksha
5c772f18b2 Moving Arangodb provider to new structure (#46387)
* moving arangodb provider to new structure

* fixup! moving arangodb provider to new structure

---------

Co-authored-by: pratiksha rajendrabhai badheka <pratiksha@DESKTOP-T5HUA05>
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
2025-02-06 21:31:04 +01:00
Kunal Bhattacharya
e9f84ae5a4 Moving yandex provider to new provider structure (#46525)
* Moving yandex provider to new provider structure

* fixup! Moving yandex provider to new provider structure

---------

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
2025-02-06 20:53:55 +01:00
Jarek Potiuk
d469ce7a82 Move apache.impala provider to a new structure (#46532)
Part of #46045
2025-02-06 20:53:20 +01:00
LIU ZHE YOU
91d5b70bd9 Move Apache Flink to new provider structure (#46132) 2025-02-06 19:39:27 +01:00
LIU ZHE YOU
681ad5c646 Move CNCF Kubernetes to new provider structure (#46436)
* Move CNCF Kubernetes to new provider structure

* Fix doc include path and k8s test

* Fix taskflow tutorial

* Fix test_project_structure

* Strip src. prefix instead of replacing all src.

Co-authored-by: Kalyan R <kalyan.ben10@live.com>

* Merge fix get_classes_from_file #46454

* Fix TestCncfProviderProjectStructure
- rename PROVIDER from "cncf" to "cncf/kubernetes"
- remove MISSING_EXAMPLES_FOR_CLASSES

* Fix k8s CI requirements

* fixup! Fix k8s CI requirements

---------

Co-authored-by: Kalyan R <kalyan.ben10@live.com>
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
2025-02-06 18:33:22 +01:00
David Blain
a602433670 Move microsoft winrm to new provider structure (#46469)
* refactor: Moved microsoft winrm provider

* refactor: fixed static checks
2025-02-06 18:02:38 +01:00
Niko Oliveira
9161259745 provider migrate cloudant (#46405)
* Update provider schema to include excluded-python-versions

The provider schema previously supported this field but it was dropped
during the provider migration project. Cloudant is the only provider at
the time of writing which makes use of this mechanism

* Migrate Cloudant provider to new structure

* Updates from PR feedback

* Add wildcard for all patch releases of an excluded python version

If it is not already present add a wild card for all patch releases of
an excluded python version

* Fix install_airflow script to remove cloudant on 3.9

* Remove more spaces

* Remove the fix for version exclusions

With functional version exclusion in requires-python working, many
things in our CI are not setup to support this. So go back to "soft"
or non-functional exclusions. This will at least update the classifiers
2025-02-05 21:12:34 +01:00
Jarek Potiuk
aa7143b8ab Fix case in releasing images where chicken-egg-providers are empty (#46467) 2025-02-05 14:54:51 +01:00
Jarek Potiuk
7a718dd5aa Fix ownership of files that docker uses in mounted directories (#46428)
The #46358 moved docker to another mounted directory - but this
directory and all files in it are owned by host user. The directory
and all files inside should be owned by root in order to properly
reflect permissions of the files when building docker images.

The change is now simplified. Rather than passing mount directory
by variable and passing it through GitHub Actions, we hard-code
the location of docker in cleanup_docker.sh script - we also
incorporate changing ownership and showing disk space in the same
cleanup_docker.sh script and make sure that script is only called
in the "real" (not composite) actions at the beginning - right
after the repository is checked out - previously that script
was also called in composite actions and changing the repo to be
writeable was done AFTER cleanup_docker.sh - which would not
work as we want the /mnt directory to be still owned by the
host user, but the docker storage should be still owned by root.
2025-02-04 16:59:20 +01:00
Kalyan R
eb05869b6d Move Google provider to new provider structure (#46344)
* init run on google and fix mypy issues

* fix tests

* replace providers.tests.system.google with providers.google.tests.google

* add example dag's path for new structure

* fix paths in docs

* fix import path for failing test in test_dataprep_system

* fix DEFAULT_GCP_SYSTEM_TEST_PROJECT_ID import

* update google test paths

* replace providers/tests/google with providers/google/tests/provider_tests/google

* remove test_get_package_extras_for_old_providers

* fix test_folders_for_parallel_test_types test

* fix test_pytest_args_for_regular_test_types

* replace providers/tests/system/google/ with providers/google/tests/system/google

* update example_dirs in example_not_excluded_dags

* fix glob path in ExampleCoverageTest.example_paths

* fix providers_prefix

* fix serialization tests

* fix

* add filterwarnings to test_bigquery and test_kubernetes_engine modules

* add explicit info logging to test_dataflow.py

* add explicit info logging to test_datafusion.py

* add explicit info logging to test_datafusion.py

* add explicit info logging to failing caplog tests

* enable info logging

* add tmp.tar.gz
2025-02-04 15:02:31 +01:00
vatsrahul1001
4dc5d4b7dc Add 3.0.0a1 tag in airflow_bug_report.yml (#46413)
* add 3.0.0a1 tag in airflow bug report

* add 3.0.0a1 tag in airflow bug report
2025-02-04 12:22:30 +02:00
David Blain
8fa8597965 Move Microsoft MSSQL / PSRP and WinRM providers to new provider structure (#46338)
* refactor: Move microsoft providers (except azure) to new location

* refactor: Move test for microsoft providers to new location

* refactor: Move docs for microsoft providers to new location

* refactor: Created pyproject.toml for mssql

* refactor: Created pyproject.toml for psrp

* refactor: Created pyproject.toml for winrm

* refactor: fixed names in psrp and winrm pyproject.toml

* refactor: Added README.rst to microsoft mssql provider

* refactor: Removed CHANGELOG.rst from microsoft mssql provider

* refactor: Removed CHANGELOG.rst and added README.rst in microsoft psrp and winrm providers

* Revert "refactor: Removed CHANGELOG.rst and added README.rst in microsoft psrp and winrm providers"

This reverts commit a2037244a6.

* Revert "refactor: Removed CHANGELOG.rst from microsoft mssql provider"

This reverts commit 1263fa86e9.

* Revert "refactor: Added README.rst to microsoft mssql provider"

This reverts commit d75c9ff936.

* Revert "refactor: fixed names in psrp and winrm pyproject.toml"

This reverts commit 21807280ec.

* Revert "refactor: Created pyproject.toml for winrm"

This reverts commit b26b5888e9.

* Revert "refactor: Created pyproject.toml for psrp"

This reverts commit c815cb89f5.

* Revert "refactor: Created pyproject.toml for mssql"

This reverts commit 675f31e856.

* Revert "refactor: Move docs for microsoft providers to new location"

This reverts commit ae0dce6ad3.

* Revert "refactor: Move test for microsoft providers to new location"

This reverts commit 9a5e4f6e2e.

* Revert "refactor: Move microsoft providers (except azure) to new location"

This reverts commit c95f04168d.

* refactor: Moved microsoft mssql provider

* refactor: Moved microsoft psrp provider

* refactor: Fixed load of replace.sql for assertion in test_generate_insert_sql

* refactor: Changed name for filename in load_file method

* refactor: Reorganized imports

---------

Co-authored-by: David Blain <david.blain@infrabel.be>
2025-02-03 22:18:35 +01:00
Wei Lee
c60e1393d6 ci(github-actions): add a script to check significant newsfragments (#46007)
* ci(github-acitons): add script to check significant newsfragments

* docs(newsfragments): fix incorrect format

* docs(newsfragments): upgrade api-66.significant format

* ci(pre-commit): add x mod to significant_newsfragments_checker.py
2025-02-03 19:02:25 +08:00
Jens Scheffler
8d8afdf20a Fix disk space issues on github runners (#46358)
* Triage disk space issues, DO NOT MERGE

* Triage disk space issues, DO NOT MERGE

* Triage disk space issues, DO NOT MERGE

* Triage disk space issues, DO NOT MERGE

* Triage disk space issues, DO NOT MERGE

* Triage disk space issues, DO NOT MERGE

* Triage disk space issues, DO NOT MERGE

* Move docker storage to second drive in general

* Cleanup debug and triaging stuff

* Exception of docker volume for constraints building
2025-02-03 09:56:52 +01:00
Jarek Potiuk
c5c6276356 Upgrade to latest uv (#46347) 2025-02-01 23:21:27 +01:00
Bugra Ozturk
edd60c7b55 Move jdbc Provider to the new structure (#46269) 2025-02-01 15:27:11 +01:00
Pratiksha
f096e32937 move grpc provider to new provider structure --rebase (#46166)
Co-authored-by: pratiksha rajendrabhai badheka <pratiksha@DESKTOP-T5HUA05>
2025-02-01 10:42:29 +01:00
Josix
7ae5a49b93 refactor(providers/salesforce): move salesforce provider to new structure (#46301) 2025-02-01 09:00:15 +01:00
LIU ZHE YOU
d2c3d96a25 Move Apache Hive to new provider structure (#46312)
* Move Apache Hive to new provider structure

* Fix breeze unit test
2025-01-31 21:23:36 +01:00
LIU ZHE YOU
b8ce7a4b63 Move Oracle to new provider structure (#46314)
* Move Oracle to new provider structure

* Fix exampleinclude path in doc
2025-01-31 21:22:15 +01:00