You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2024/12/05 10:28:12 UTC
[PR] Fix accidental db tests in Task SDK [airflow]
uranusjr opened a new pull request, #44690:
URL: https://github.com/apache/airflow/pull/44690
We accidentally added some db tests in the SDK test suite, which has been incorrectly skipped since the SDK is not supposed to interact with db. The test is legistimate (it’s for a custom operator only used on task execution), but we need to mock those db calls instead.
Calls that need db are now always done lazily (when Airflow core is available), and functions all moved to `airflow.models` and tested there instead.
A Pytest hook is also added to check the `db_test` marker does not exist, to ensure this does not happen again.
--
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] Fix accidental db tests in Task SDK [airflow]
Posted by "uranusjr (via GitHub)" <gi...@apache.org>.
uranusjr merged PR #44690:
URL: https://github.com/apache/airflow/pull/44690
--
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] Fix accidental db tests in Task SDK [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #44690:
URL: https://github.com/apache/airflow/pull/44690#issuecomment-2526410469
Maybe we should add some code to fail, rather than skip if db_tests are run in `task_sdk`?
--
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