Skip to content

Conversation

@ephraimbuddy
Copy link
Contributor

@ephraimbuddy ephraimbuddy commented Aug 14, 2025

As part of the ongoing server/client separation,
this commit moves out some exceptions to the Task sdk.

@ephraimbuddy ephraimbuddy force-pushed the exception-separation branch 3 times, most recently from f4a380e to 7a4587c Compare August 15, 2025 07:48
@ephraimbuddy ephraimbuddy marked this pull request as ready for review August 15, 2025 07:51
@ephraimbuddy ephraimbuddy force-pushed the exception-separation branch 7 times, most recently from 90180cf to 59d7f90 Compare August 24, 2025 18:17
@ashb
Copy link
Member

ashb commented Oct 29, 2025

@ephraimbuddy Ah, maybe in those shared library tests we should set _AIRFLOW__AS_LIBRARY env var early in pytest_configure inside conftest.py

@ephraimbuddy
Copy link
Contributor Author

@ephraimbuddy Ah, maybe in those shared library tests we should set _AIRFLOW__AS_LIBRARY env var early in pytest_configure inside conftest.py

The shared modules already set the _AIRFLOW__AS_LIBRARY in conftest.py

As part of the ongoing server/client separation,
this commit moves out some exceptions to the Task sdk.

The AirflowException usage in task sdk has been changed to
RuntimeError.
Also, the TaskNotFound exception is still duplicated due to
the many usages in core API and SDK.

Rename back RuntimeError to AirflowException

expose TaskNotFound import from exceptions

completely separate sdk imports

fix conflicts

Keep base AirflowException only in sdk

import some exception from sdk into core exceptions

add to be deprecated function to handle TaskNotFound and ParamValidationError

catch some import error in airflow.exceptions and redefine the exceptions

Core should not raise exceptions

Move some exceptions to deprecated

Raise RuntimeError instead of AirflowException in SDK

Rename AirflowException in SDK to AirflowSDKException

Update tests

Remove AirflowNotFound in sdk exceptions

Catch import errors for exceptions in example dags

remove get_task redefine

Import AirflowSensorTimeout properly and Remove airflowNotFoundException import from sdk

Remove AirflowFailException in core

Import AirflowException from core with a compat shim

Fix import

Use the sdk AirflowException in core and fix other exceptions

raise ValueError in sparkhook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants