Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminate the Task.all_tasks() warning in the CI Tests #8211

Closed
Imod7 opened this issue Mar 16, 2021 · 0 comments · Fixed by #8263
Closed

Eliminate the Task.all_tasks() warning in the CI Tests #8211

Imod7 opened this issue Mar 16, 2021 · 0 comments · Fixed by #8263
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework type:maintenance 🔧 Improvements to tooling, testing, deployments, infrastructure, code style.

Comments

@Imod7
Copy link
Contributor

Imod7 commented Mar 16, 2021

Python version:
Python 3.6
Python 3.7
Python 3.8

Operating system (windows, osx, ...):
Ubuntu
Windows

Issue:
This Issue is part of the effort to close the Issue#7738 hence to reduce the amount of warnings that are raised when running all tests in the CI. From a first investigation, it seems that this warning (PendingDeprecationWarning: Task.all_tasks() is deprecated, use asyncio.all_tasks() instead...) for which the current Issue was opened, had 46 occurrences but in a latest CI run it appears in only ~27 tests.

Error (including full traceback):

2021-03-15T14:21:47.6645370Z tests/test_train.py: 27 warnings
2021-03-15T14:21:47.6646399Z   /home/runner/work/rasa/rasa/rasa/utils/common.py:310: PendingDeprecationWarning: Task.all_tasks() is deprecated, use asyncio.all_tasks() instead
2021-03-15T14:21:47.6647500Z     pending = asyncio.Task.all_tasks()

Possible Solutions:

  • As indicated in the Deprecation message, first step it would be to replace the Task.all_tasks() call with asyncio.all_tasks().
  • This however introduces another error
E           RuntimeError: no running event loop

which would need to be addressed.

Command or request that led to error:

  • The warning can be found in any of the following CI tests log files :
    • 32_Run Tests (test-full-model-training, ubuntu-latest, 3.7).txt
    • 33_Run Tests (test-full-model-training, ubuntu-latest, 3.8).txt
    • 35_Run Tests (test-full-model-training, windows-latest, 3.7).txt
  • Also, the warning can be reproduced when running one of the tests below:
pytest tests/test_train.py::TestE2e::test_e2e_gives_experimental_warning
pytest tests/test_telemetry.py::test_events_schema

Definition of Done:

  • The PendingDeprecationWarning: Task.all_tasks() does not appear anymore.
@Imod7 Imod7 added type:maintenance 🔧 Improvements to tooling, testing, deployments, infrastructure, code style. area:rasa-oss 🎡 Anything related to the open source Rasa framework labels Mar 16, 2021
@Imod7 Imod7 changed the title Reduce the Task.all_tasks() warning in the CI Tests Eliminate the Task.all_tasks() warning in the CI Tests Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework type:maintenance 🔧 Improvements to tooling, testing, deployments, infrastructure, code style.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant