SameerMesiah97 opened a new pull request, #68775:
URL: https://github.com/apache/airflow/pull/68775
**Description**
This change adds test coverage verifying that `SnowparkOperator` closes the
Snowpark session when the user callable raises an exception.
The new test exercises the operator's exception path and validates that
session cleanup still occurs when execution fails.
**Rationale**
`SnowparkOperator` relies on a `finally` block to guarantee session cleanup.
Explicit coverage of this behavior helps protect against regressions that could
leave Snowpark sessions open when user code raises an exception.
**Notes**
While adding the new test, the Snowpark test suite was updated to use
`dag_maker.run_ti()` instead of the removed `TaskInstance.run()` API.
The Snowpark operator, decorator and util test modules were also updated to
use:
`pytest.importorskip("snowflake.snowpark")`
which matches the importable Snowpark module used by the tests. Without this
change, the entire test module was being skipped when run locally.
**Backwards Compatibility**
This change only affects test code and does not modify production behavior
or public APIs.
--
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]