Merged
feat: expand E2B self-hosted validation suite #99
fqy_SandboxAdd on Aug 28
feat: expand E2B self-hosted validation suite #99
Merged
fqy_SandboxAdd on Aug 28
fqy_Sandbox
Aug 28

当前PR是否有AI参与:

[x] 否

[ ] 是
__1. AI Agent 平台:
__2. AI 模型:
__3. Prompt上下文 :

参考:openEuler社区《生成式AI工具使用与开源贡献政策》

PR功能描述 / 为什么需要这个合入**:

该PR关联的issue

(格式为fixes #<issue号>, 或者resolves #<issue号>): fixes #

希望检视人员了解:

likedislike
Pull Request has been successfully merged by openeuler-ci-bot.
(Thank you for fqy_Sandbox's contribution.)
fqy_Sandboxfqy_Sandbox
Aug 28 Created pull request, commit 916dbbb6
atomgit-bot
atomgit-bot
Aug 28 Comments:

变更摘要

本 PR 将 E2B 自托管验证套件从原有的七项业务操作扩展为覆盖更完整 SDK 能力的端到端用例集。核心思路是:新增一套扩展用例目录(后台命令、文件系统/监听/签名 URL、Sandbox 检查/指标/网络、Snapshot、Checkpoint 恢复、pause/resume 生命周期、PTY、Template SDK),为每个场景新增独立 handler 模块,并引入基于 E2B_API_URL/E2B_API_KEY 的轻量 REST 客户端 E2BApiClient 来断言 SDK 未暴露的生命周期接口(pause、resume、connect、timeout、snapshot 列表)。同时测试运行器支持按 depends_on 传递依赖自动选取用例,新增统一的脱敏诊断契约(可能原因、只读定位命令、Agent 提示),报告与资源清理也相应增强,并将最低 E2B SDK 版本提升至 2.19。该 PR 主要面向功能与验证能力扩展,属于测试套件内部改动。

主要改动

  • 扩展用例目录与 handler 模块: 新增 e2e_extended_cases.py(含 BG-*、FS-*、SI-*、SNP-*、CPR-*、PRC-*、PTY-*、TSDK-* 等约 60 个用例),并为各场景新增 e2e_command_handlers.py、e2e_filesystem_handlers.py、e2e_snapshot_handlers.py、e2e_checkpoint_handlers.py、e2e_pause_resume_handlers.py、e2e_pty_handlers.py、e2e_template_handlers.py 等模块;e2e_models.py 的 Business 枚举新增 BACKGROUND_COMMAND、CHECKPOINT_RESTORE、PAUSE_RESUME、TEMPLATE_SDK 等 14 个业务类型,e2e_test_cases.py 将扩展用例并入目录并增加用例 ID 唯一性校验。
  • 用例选择与依赖解析: e2e_test_runner.py 新增 select_cases_with_dependencies,按 depends_on 递归选取用例及其传递依赖,并检测未知依赖与循环依赖;运行循环改为通过 build_diagnostics 生成诊断、print_case_result/print_run_summary 输出结果,替代原有简单打印。
  • 生命周期 REST 断言: 新增 e2e_api_client.py,提供 create_sandbox、pause、resume、connect、set_timeout、list_snapshots 等接口及响应解析辅助函数;e2e_pause_resume_handlers.py 据此验证状态码(如 204/201/409/404)、状态迁移、autoPause/autoResume 能力探测与 filesystem-only 能力判定。
  • 诊断与报告增强: 新增 e2e_diagnostics.py 构建统一脱敏诊断契约(possible_causes、next_commands、analysis_prompt、Agent 约束等);e2e_report.py 新增递归脱敏函数 redact_data 及 Query 参数签名脱敏规则,报告增加通过率、正负向/边界用例统计、业务覆盖、资源清理汇总等章节。
  • 资源清理与 SDK 版本要求: e2e_resources.py 新增 summarize_cleanup 及 record_background_process、record_pty、record_watcher、record_snapshot、record_template_tag 等资源登记方法;runner 按"先释放后台进程/PTY/watcher,再清理 Sandbox,最后删除 Snapshot 与 Template"的顺序执行清理并登记结果;bootstrap.py 将 MINIMUM_E2B 提升为 (2, 19, 0) 并以 E2B_REQUIREMENT = "e2b>=2.19.0,<3" 替代原有 requirements.txt 安装方式。
likedislike
Incorrect?
atomgit-bot
atomgit-bot
Aug 28 Comments:

代码审查

✅ 未发现问题

likedislike
Incorrect?
openeuler-ci-botopeneuler-ci-botCollaborators
Aug 28 Set weibaohui,yangzhao_kl,jimmieme,duguhaotian,wonleing,zmr_2020,gaodaweiky,lu-wei-army,zhaoyifan28 as approver
openeuler-ci-botopeneuler-ci-botCollaborators
Aug 28 Added label: sig/sig-CloudNative
openeuler-ci-bot
openeuler-ci-botCollaborators
Aug 28 Comments:

Welcome To openEuler Community

Hey @fqy_Sandbox , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands. You can self-configure the PR merge rules for this repository. For more details, please refer to Here.

Contact Guide

If you have any questions, please contact the SIG: sig-CloudNative ,
and any of the maintainers: @duguhaotian, @gaodaweiky, @jimmieme, @lu-wei-army, @weibaohui, @wonleing, @yangzhao_kl, @zhaoyifan28, @zmr_2020 ,
and any of the committers: @feijianqiang, @zhourenjianz .

likedislike
openeuler-ci-botopeneuler-ci-botCollaborators
Aug 28 Added label: openeuler-cla/yes
openeuler-ci-botopeneuler-ci-botCollaborators
Aug 28 Added label: ci_processing
openeuler-ci-bot
openeuler-ci-botCollaborators
Aug 28 Comments:

门禁正在运行, 您可以通过以下链接查看实时门禁检查结果.
若您对门禁结果含义不清晰或者遇到问题不知如何解决,可参考门禁指导手册
门禁入口及编码规范检查: multiarch/openeuler/trigger/KASandbox/243/console

likedislike
openeuler-ci-botopeneuler-ci-botCollaborators
Aug 28 Removed label: ci_processing
openeuler-ci-bot
openeuler-ci-botCollaborators
Aug 28 Comments:
Check Name Build Result 详情 Build Details
check_sca ✅SUCCESS #243
check_package_license ✅SUCCESS
x86_64 check_build ✅SUCCESS #246
aarch64 check_build ✅SUCCESS #262
DT check_build ✅SUCCESS #259
likedislike
openeuler-ci-botopeneuler-ci-botCollaborators
Aug 28 Added label: ci_successful
openeuler-ci-bot
openeuler-ci-botCollaborators
Aug 28 Comments:
likedislike
fqy_Sandboxfqy_Sandbox
Aug 29 Pre merge succeeded (commit_id: ad912fe083270baa1c81ef70cbf92d9cbd7b6d52)
5 event messages are collapsed here。 See more
openeuler-ci-botopeneuler-ci-botCollaborators
Aug 29 Removed label: ci_successful
openeuler-ci-bot
openeuler-ci-botCollaborators
Aug 29 Comments:

CLA Signature Pass

fqy_Sandbox, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
openeuler-ci-bot
openeuler-ci-botCollaborators
Aug 29 Comments:

Notification

This pull request has been changed(code update) or closed, so removes the following label(s): ci_successful.

likedislike
openeuler-ci-botopeneuler-ci-botCollaborators
Aug 29 Added label: ci_processing
openeuler-ci-bot
openeuler-ci-botCollaborators
Aug 29 Comments:

门禁正在运行, 您可以通过以下链接查看实时门禁检查结果.
若您对门禁结果含义不清晰或者遇到问题不知如何解决,可参考门禁指导手册
门禁入口及编码规范检查: multiarch/openeuler/trigger/KASandbox/254/console

likedislike
openeuler-ci-botopeneuler-ci-botCollaborators
Aug 29 Removed label: ci_processing
openeuler-ci-bot
openeuler-ci-botCollaborators
Aug 29 Comments:
Check Name Build Result 详情 Build Details
check_sca ✅SUCCESS #254
check_package_license ✅SUCCESS
x86_64 check_build ✅SUCCESS #257
aarch64 check_build ✅SUCCESS #273
DT check_build ✅SUCCESS #270
likedislike
openeuler-ci-botopeneuler-ci-botCollaborators
Aug 29 Added label: ci_successful
openeuler-ci-bot
openeuler-ci-botCollaborators
Aug 29 Comments:
likedislike
zhourenjian
zhourenjianCollaborators
Aug 29 Comments:

/lgtm
/approve

likedislike
openeuler-ci-botopeneuler-ci-botCollaborators
Aug 29 Added label: approvedlgtm
openeuler-ci-bot
openeuler-ci-botCollaborators
Aug 29 Comments:

Review Code Feedback

  • The label lgtm, approved was added to this pull request. It means that zhourenjianz reviewed the code changes. 👋
Tips
  • If this pull request is not merged while all conditions are met, comment /check-pr to try again. 😄
likedislike
openeuler-ci-botopeneuler-ci-botCollaborators
Aug 29 Merged pull request, merge node SHA: a0f056e24a051ad4466e2095413ddee04dca2b8d