OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

Fix browser env leak after resetting agent

Open frankxu2004 opened this issue 1 year ago • 4 comments

Fixes #1528

frankxu2004 avatar May 05 '24 08:05 frankxu2004

Codecov Report

Attention: Patch coverage is 0% with 13 lines in your changes are missing coverage. Please review.

:exclamation: No coverage uploaded for pull request base (main@a60a6a4). Click here to learn what that means.

Files Patch % Lines
opendevin/runtime/browser/browser_env.py 0.00% 12 Missing :warning:
opendevin/controller/agent_controller.py 0.00% 1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1589   +/-   ##
=======================================
  Coverage        ?   61.72%           
=======================================
  Files           ?       92           
  Lines           ?     3767           
  Branches        ?        0           
=======================================
  Hits            ?     2325           
  Misses          ?     1442           
  Partials        ?        0           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar May 05 '24 08:05 codecov-commenter

@frankxu2004 you can probably move this into agent_controller.close() now

rbren avatar May 06 '24 00:05 rbren

Looking good! I think we just need to add a close() call into agent_controller

rbren avatar May 08 '24 15:05 rbren

Added and tested that now after agent re-init (e.g. change config), the browser process will always shutdown correctly. Should be ready @rbren

frankxu2004 avatar May 09 '24 08:05 frankxu2004

Thanks Frank!

rbren avatar May 09 '24 17:05 rbren