Skip to content

Keepalive rpyc connection (bugfix)#2076

Merged
fernando79513 merged 1 commit intomainfrom
keepalive_rpyc
Aug 12, 2025
Merged

Keepalive rpyc connection (bugfix)#2076
fernando79513 merged 1 commit intomainfrom
keepalive_rpyc

Conversation

@Hook25
Copy link
Copy Markdown
Collaborator

@Hook25 Hook25 commented Aug 12, 2025

Description

Whenever the agent fails to close the connection (currently happening on one device, that fails to do so during the watchdog reset test), the session may hang forever. This wasn't an issue when we had a global attribute access timeout but now that we removed it, it is blocking at least one execution.

This modifies the rpyc connection so that it also implements keepalive. This way the keepalive messages are also used to probe the connection and detect if it was closed.

Additionally, this should also fix a very rare bug. When asking for interactions, the connection is not kept alive, so it may be unexpectedly closed by an intermidiary.

Resolved issues

Fixes: https://warthogs.atlassian.net/browse/CHECKBOX-1995

Documentation

N/A

Tests

Tested on the machine, it now 100% works, before it worked very rarely.

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 12, 2025

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 52.01%. Comparing base (7ee6231) to head (9aa4142).

Files with missing lines Patch % Lines
checkbox-ng/checkbox_ng/launcher/controller.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2076   +/-   ##
=======================================
  Coverage   52.01%   52.01%           
=======================================
  Files         388      388           
  Lines       41794    41794           
  Branches     7771     7771           
=======================================
  Hits        21738    21738           
  Misses      19282    19282           
  Partials      774      774           
Flag Coverage Δ
checkbox-ng 70.91% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@fernando79513 fernando79513 left a comment

Choose a reason for hiding this comment

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

LGTM+1!

@fernando79513 fernando79513 merged commit e3775c5 into main Aug 12, 2025
41 of 42 checks passed
@fernando79513 fernando79513 deleted the keepalive_rpyc branch August 12, 2025 12:39
bladernr pushed a commit that referenced this pull request Aug 28, 2025
stanley31huang pushed a commit that referenced this pull request Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants