fix(Harness Sandbox mode)沙箱模式多线程安全问题,以及doflush时,沙箱已经关闭的bug修复#1807
fix(Harness Sandbox mode)沙箱模式多线程安全问题,以及doflush时,沙箱已经关闭的bug修复#1807zhaojinyu wants to merge 6 commits into
Conversation
…reading issues.The sandbox will be released before MemoryFlushMiddleWare executed.
65f5687 to
0a1adf7
Compare
# Conflicts: # agentscope-harness/src/main/java/io/agentscope/harness/agent/middleware/MemoryFlushMiddleware.java
# Conflicts: # agentscope-harness/src/main/java/io/agentscope/harness/agent/middleware/MemoryFlushMiddleware.java
…fix-sandbox-bug # Conflicts: # agentscope-harness/src/main/java/io/agentscope/harness/agent/middleware/MemoryFlushMiddleware.java
060a2c0 to
38cddca
Compare
|
Please fix the test failures, thanks. Error: Errors: |
Fix: |
3172985 to
e1d5541
Compare
e1d5541 to
5a79ad9
Compare
…sandbox in context
5a79ad9 to
93a0124
Compare
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
|
@chickenlj please review. thanks |
…reading issues.The sandbox will be released before MemoryFlushMiddleWare executed.
AgentScope-Java Version
2.0.0-RC3
Description
Sandbox模式bug很多,HarnessAgent设计是可复用,在sandbox模式同时访问agent的时候,SandboxLifecycleMiddleware内部的sanbox对象没有线程安全保护,sandbox需要放入context中获取。
另外MemoryFlushMiddleware在执行doFlush的时候,因为是异步的,HarnessAgent在releaseForCall的时候可能已经停掉了sandbox, 异步的doflush已经进不去沙箱获取和上传文件了。sandbox模式比较特殊,其他模式应该没问题,主流程在HarnessAgent里编排的,要改动挺大(担心影响后面的统一设计),先临时把sandbox模式的doflush做成了同步执行,其他的继续走异步。坐等官方统一解决吧。另外还有state返序列化失败,数据库存不进去数等等问题(本pr没修)
Checklist
Please check the following items before code is ready to be reviewed.
mvn spotless:applymvn test)