potiuk commented on code in PR #39513:
URL: https://github.com/apache/airflow/pull/39513#discussion_r1596309831
##########
tests/listeners/class_listener.py:
##########
@@ -47,9 +47,7 @@ def on_task_instance_success(self, previous_state,
task_instance, session):
self.state.append(TaskInstanceState.SUCCESS)
@hookimpl
- def on_task_instance_failed(
- self, previous_state, task_instance, error: None | str |
BaseException, session
- ):
+ def on_task_instance_failed(self, previous_state, task_instance, session):
Review Comment:
How to get the error:
* checkout this branch
* revert revertion of #38155
* build ci image
* follow the contributing-docs/testing/unit_tests.rst instructions added in
this PR:
1. Make sure to build latest Breeze ci image
```bash
breeze ci-image build --python 3.8
```
2. Build providers from latest sources:
```bash
rm dist/*
breeze release-management prepare-provider-packages
--include-not-ready-providers \
--version-suffix-for-pypi dev0 --package-format wheel
```
3. Prepare provider constraints
```bash
breeze release-management generate-constraints --airflow-constraints-mode
constraints-source-providers --answer yes
```
3. Enter breeze environment, installing selected airflow version and the
provider packages prepared from main
```bash
breeze shell --use-packages-from-dist --package-format wheel\
--use-airflow-version 2.9.1 --airflow-constraints-reference
constraints-2.9.1 \
--install-airflow-with-constraints \
--providers-skip-constraints \
--mount-sources tests
```
4. You can then run tests as usual:
```bash
pytest tests/providers/<provider>/test.py
```
5. Iterate with the tests
The tests are run using:
* airflow installed from PyPI
* tests coming from the current airflow sources (they are mounted inside
the breeze image)
* provider packages built from the current airflow sources and placed in
dist
This means that you can modify and run tests and re-run them, but if you
want to modify provider code
you need to exit breeze, rebuild the provider package and restart breeze
using the command above.
Rebuilding single provider package can be done using this command:
```bash
breeze release-management prepare-provider-packages \
--version-suffix-for-pypi dev0 --package-format wheel <provider>
```
--
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]