kaxil opened a new issue, #47854:
URL: https://github.com/apache/airflow/issues/47854

   ### Body
   
   Most of the branch operators are now working with Task SDK after 
https://github.com/apache/airflow/pull/46584
   
   But `BranchExternalPythonOperator` fails with the following error:
   
   ```
    [2025-03-14, 14:56:50] INFO -  Previous state of the Task instance: queued 
chan="stdout" source="task"
   [2025-03-14, 14:56:50] INFO - Current task name:branching_ext_python 
chan="stdout" source="task"
   [2025-03-14, 14:56:50] INFO - Dag name:example_branch_operator chan="stdout" 
source="task"
   [2025-03-14, 14:56:50] INFO - Use 'pickle' as serializer. 
source="airflow.task.operators.airflow.providers.standard.operators.python.BranchExternalPythonOperator"
   [2025-03-14, 14:56:50] INFO - Executing cmd: /usr/local/bin/python 
/tmp/venv-callo4834r1x/script.py /tmp/venv-callo4834r1x/script.in 
/tmp/venv-callo4834r1x/script.out /tmp/venv-callo4834r1x/string_args.txt 
/tmp/venv-callo4834r1x/termination.log 
/tmp/venv-callo4834r1x/airflow_context.json source="airflow.utils.process_utils"
   [2025-03-14, 14:56:50] INFO - Output: source="airflow.utils.process_utils"
   [2025-03-14, 14:56:51] INFO - Traceback (most recent call last): 
source="airflow.utils.process_utils"
   [2025-03-14, 14:56:51] INFO -   File "/tmp/venv-callo4834r1x/script.py", 
line 10, in <module> source"airflow.utils.process_utils"
   [2025-03-14, 14:56:51] INFO -     from airflow.plugins_manager import 
integrate_macros_plugins source="airflow.utils.process_utils"
   [2025-03-14, 14:56:51] INFO -   File "/opt/airflow/airflow/__init__.py", 
line 78, in <module> source="airflow.utils.process_utils"
   [2025-03-14, 14:56:51] INFO -     settings.initialize() 
source="airflow.utils.process_utils"
   [2025-03-14, 14:56:51] INFO -   File "/opt/airflow/airflow/settings.py", 
line 638, in initialize source="airflow.utils.process_utils"
   [2025-03-14, 14:56:51] INFO -     configure_orm() 
source="airflow.utils.process_utils"
   [2025-03-14, 14:56:51] INFO -   File "/opt/airflow/airflow/settings.py", 
line 363, in configure_orm source="airflow.utils.process_utils"
   [2025-03-14, 14:56:51] INFO -     engine = create_engine(SQL_ALCHEMY_CONN, 
connect_args=connect_args, **engine_args, future=True) 
source="airflow.utils.process_utils"
   [2025-03-14, 14:56:51] INFO -   File "<string>", line 2, in create_engine 
source="airflow.utils.process_utils"
   [2025-03-14, 14:56:51] INFO -   File 
"/usr/local/lib/python3.10/site-packages/sqlalchemy/util/deprecations.py", line 
375, in warned source="airflow.utils.process_utils"
   [2025-03-14, 14:56:51] INFO -     return fn(*args, **kwargs) 
source="airflow.utils.process_utils"
   [2025-03-14, 14:56:51] INFO -   File 
"/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/create.py", line 
514, in create_engine source="airflow.utils.process_utils"
   [2025-03-14, 14:56:51] INFO -     u = _url.make_url(url) 
source="airflow.utils.process_utils"
   [2025-03-14, 14:56:51] INFO -   File 
"/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/url.py", line 738, 
in make_url source="airflow.utils.process_utils"
   [2025-03-14, 14:56:51] INFO -     return _parse_url(name_or_url) 
source="airflow.utils.process_utils"
   [2025-03-14, 14:56:51] INFO -   File 
"/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/url.py", line 799, 
in _parse_url source="airflow.utils.process_utils"
   [2025-03-14, 14:56:51] INFO -     raise exc.ArgumentError( 
source="airflow.utils.process_utils"
   [2025-03-14, 14:56:51] INFO - sqlalchemy.exc.ArgumentError: Could not parse 
SQLAlchemy URL from string 'airflow-db-not-allowed:///' 
source="airflow.utils.process_utils"
   [2025-03-14, 14:56:51] ERROR - Task failed with exception source="task" 
error_detail=[{"exc_type":"CalledProcessError","exc_value":"Command 
'['/usr/local/bin/python', '/tmp/venv-callo4834r1x/script.py', 
'/tmp/venv-callo4834r1x/script.in', '/tmp/venv-callo4834r1x/script.out', 
'/tmp/venv-callo4834r1x/string_args.txt', 
'/tmp/venv-callo4834r1x/termination.log', 
'/tmp/venv-callo4834r1x/airflow_context.json']' returned non-zero exit status 
1.","exc_notes":[],"syntax_error":null,"is_cause":false,"frames":[{"filename":"/opt/airflow/task-sdk/src/airflow/sdk/execution_time/task_runner.py","lineno":608,"name":"run"},{"filename":"/opt/airflow/task-sdk/src/airflow/sdk/execution_time/task_runner.py","lineno":744,"name":"_execute_task"},{"filename":"/opt/airflow/task-sdk/src/airflow/sdk/definitions/baseoperator.py","lineno":373,"name":"wrapper"},{"filename":"/opt/airflow/providers/standard/src/airflow/providers/standard/operators/python.py","lineno":1090,"name":"execute"},{"filename":"/opt/airfl
 
ow/task-sdk/src/airflow/sdk/definitions/baseoperator.py","lineno":373,"name":"wrapper"},{"filename":"/opt/airflow/providers/standard/src/airflow/providers/standard/operators/python.py","lineno":479,"name":"execute"},{"filename":"/opt/airflow/task-sdk/src/airflow/sdk/definitions/baseoperator.py","lineno":373,"name":"wrapper"},{"filename":"/opt/airflow/providers/standard/src/airflow/providers/standard/operators/python.py","lineno":201,"name":"execute"},{"filename":"/opt/airflow/providers/standard/src/airflow/providers/standard/operators/python.py","lineno":998,"name":"execute_callable"},{"filename":"/opt/airflow/providers/standard/src/airflow/providers/standard/operators/python.py","lineno":555,"name":"_execute_python_callable_in_subprocess"},{"filename":"/opt/airflow/airflow/utils/process_utils.py","lineno":175,"name":"execute_in_subprocess"},{"filename":"/opt/airflow/airflow/utils/process_utils.py","lineno":198,"name":"execute_in_subprocess_with_kwargs"}]}]
   [2025-03-14, 14:56:51] INFO - Task instance in failure state chan="stdout" 
source="task"
   ```
   
   ### Committer
   
   - [x] I acknowledge that I am a maintainer/committer of the Apache Airflow 
project.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to