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

TaskStatusService connection lost fix #5860

Merged

Conversation

richtja
Copy link
Contributor

@richtja richtja commented Jan 30, 2024

This commit adds error handling to TaskStatusService. When the
connection is lost, it will try to establish a new connection. If the
connection is not possible to renew, the task will send warning message
about new status and remove TaskStatusService from available services.

Reference: #5794
Signed-off-by: Jan Richter [email protected]

This commit will move establishment of status service connection from
post method to its own dedicated method. Thanks to this change, it will
be possible to establish connection over again when a problem occurs.

Signed-off-by: Jan Richter <[email protected]>
@richtja richtja added the bug label Jan 30, 2024
@richtja richtja added this to the #104 - Codename TBD milestone Jan 30, 2024
@richtja richtja self-assigned this Jan 30, 2024
Copy link
Contributor

@clebergnu clebergnu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @richtja,

This looks like a step in the right direction. Besides the typo, the fact that the test is failing on CI needs to be addressed.

While I didn't debug your version of the test, I ported it to a non-asyncio version, and it behaves as expected on CI:

clebergnu@341f85b

Feel free to use that as inspiration or verbatim.

Thanks!

avocado/core/nrunner/task.py Outdated Show resolved Hide resolved
This commit adds error handling to TaskStatusService. When the
connection is lost, it will try to establish a new connection. If the
connection is not possible to renew, the task will send warning message
about new status and remove TaskStatusService from available services.

Reference: avocado-framework#5794
Signed-off-by: Jan Richter <[email protected]>
Signed-off-by: Cleber Rosa <[email protected]>
@richtja
Copy link
Contributor Author

richtja commented Jan 31, 2024

Hi @richtja,

This looks like a step in the right direction. Besides the typo, the fact that the test is failing on CI needs to be addressed.

While I didn't debug your version of the test, I ported it to a non-asyncio version, and it behaves as expected on CI:

clebergnu@341f85b

Feel free to use that as inspiration or verbatim.

Hi @clebergnu, thank you very much, it was really helpful. I made a force-push with your version of the test and fixed typos. Please have a look.

Copy link
Contributor

@clebergnu clebergnu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@clebergnu clebergnu merged commit 66e0980 into avocado-framework:master Jan 31, 2024
58 of 59 checks passed
@richtja richtja deleted the status_server_socket_error branch February 1, 2024 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants