You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "SameerMesiah97 (via GitHub)" <gi...@apache.org> on 2026/06/19 20:13:01 UTC
[PR] SnowparkOperator: Add Session Cleanup Test Coverage [airflow]
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] SnowparkOperator: Add Session Cleanup Test Coverage [airflow]
Posted by "shahar1 (via GitHub)" <gi...@apache.org>.
shahar1 merged PR #68775:
URL: https://github.com/apache/airflow/pull/68775
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] SnowparkOperator: Add Session Cleanup Test Coverage [airflow]
Posted by "SameerMesiah97 (via GitHub)" <gi...@apache.org>.
SameerMesiah97 commented on PR #68775:
URL: https://github.com/apache/airflow/pull/68775#issuecomment-4819984836
Requesting review for this.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org