webui 仓库容器化构建与测试验证报告

仓库:openUBMC/webui · 镜像:openubmc/ubuntu:24.04.2 · 生成时间:2026-09-07T06:21:00 · 敏感信息已脱敏
构建 Build
成功
91 秒
测试 Test
部分失败
vitest 210/211 · lint/vue-tsc 失败
样例 Sample
成功
静态检查
通过
pre-commit 10/13
总体结论:可在容器中成功构建;测试环节存在文档与环境的兼容性问题及少量用例失败,建议修复 tsconfig 选项、统一 /bin shell 或调整 lint 脚本通配符写法、修正 date.spec.ts 时区相关断言

1. 元信息 Metadata

repo_path/opt/agent_***/workspace/***
repo_urlhttps://gitcode.com/openUBMC/webui.git
repo_namewebui
commit132fc1b (!578 fix:修复多Raid卡配置下逻辑盘统计出错问题)
start_time2026-09-07T05:58:00
end_time2026-09-07T06:21:00
duration_seconds1380
total_steps22

2. 环境规格 Machine Spec

宿主机

architecturex86_64
cpu_modelIntel(R) Xeon(R) Gold 6151 CPU @ 3.00GHz
cpu_cores32
memory62Gi
disk197G (40G available)
docker_versionDocker version 29.1.3, build 29.1.3-0ubuntu3~24.04.2

容器

osUbuntu 24.04.3 LTS
architecturex86_64
cpu_cores32
memory62Gi (共享宿主机)

镜像来源

type文档推荐镜像
image_nameswr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2
selection_reasonREADME 系统要求章节明确声明本组件仅支持 Ubuntu 24.04 LTS,并给出推荐镜像 swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2;.devcontainer/devcontainer.json 同样基于 openubmc/ubuntu 镜像,故采用文档推荐镜像

3. 文档阅读摘要

architecture
{
  "source": "README.md - 系统要求章节",
  "value": "x86-64(amd64)"
}
recommended_image
{
  "source": "README.md - 系统要求章节 / .devcontainer/devcontainer.json",
  "value": "swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2(README 推荐);devcontainer 标签为 24.04.2_26.06"
}
dependencies
{
  "source": "README.md 环境依赖章节 + manifest 仓库 README 构建指导书 + conanfile.py + package.json",
  "value": [
    "Ubuntu 24.04 LTS(仅支持此版本,openEuler/CentOS/Debian 不支持)",
    "Python >= 3.10(init.py 运行依赖)",
    "Node.js >= 18 LTS(前端开发依赖,init.py 安装 v20.18.0)",
    "bingo 构建工具(由 manifest 仓库 init.py 一键安装,禁止手动 pip install conan)",
    "Conan C/C++ 包管理器(init.py 安装 conan 2.32.0,并配置 openubmc_opensource 远程仓库并登录)",
    "manifest 仓库 init.py 自动安装:gcc/g++、libcurl4t64、libcurl4-openssl-dev、pkg-config、git、wget、curl、pre-commit 工具链(stylua/luacheck)、openubmc-qemu、BMC SDK(/opt/RTOS、/opt/hcc_arm64le)",
    "前端 npm 依赖:Vue 3 + Element Plus + OpenDesign V2 + Vite + Pinia + ESLint + vue-tsc(package.json 声明,bingo build 时 npm install 自动拉取)"
  ]
}
build_commands
{
  "source": "README.md - 构建/组件级构建章节 + manifest README 第3.3节",
  "value": "cd /home/workspace/webui && bingo build --stage=dev"
}
ut_commands
{
  "source": "README.md - 测试章节",
  "value": "npm run lint && npx vue-tsc --noEmit(README 测试章节仅记录此两条命令;仓库另在 package.json 配置 vitest 单元测试套件 \"test\": \"vitest\",tests/unit/ 下有 10 个用例文件,但 README 未提及)"
}
sample_commands
{
  "source": "README.md - 本地开发调试章节",
  "value": "npm install && npm run dev(启动 Vite 开发服务器 http://localhost:5173,非可执行样例)"
}
special_dependencies
{
  "source": "manifest README 第2.6节 + conanfile.py",
  "value": [
    "manifest 仓库 init.py -user <用户名> -psw <密码>(Conan 远程仓库登录认证,凭证由 openUBMC 用户中心注册的社区账号提供)",
    "Conan 远程仓库:openubmc_opensource https://conan.openubmc.cn/openubmc_opensource",
    "npm 镜像源 registry.npmmirror.com(init.py 配置)",
    "openUBMC APT 源 openubmc-apt-repo.obs.cn-north-4.myhuaweicloud.com"
  ]
}

4. 执行日志 Execution Log

时间命令结果返回码耗时输出/错误
2026-09-07T05:58:00pre-commit run --all-files(宿主机本地执行)成功030s
输出
Check .sr Files...(no files to check)Skipped
Check JSON...Passed
Check YAML...Passed
prettier...Passed
trim trailing whitespace...Passed
fix end of files...Passed
check for merge conflicts...Passed
check for added large files...Passed
check for case conflicts...Passed
detect private key...Passed
normalize-package-lock...Passed
错误:
2026-09-07T05:58:05find . -name '.lint-runner.*' -o -name 'lint-runner.config.*' -o -name '.lintrunner.*'成功01s
输出
未找到 lint-runner 相关配置文件
错误:
2026-09-07T05:58:10ls .devcontainer/ && cat .devcontainer/devcontainer.json成功01s
输出
devcontainer.json 存在;image=swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2_26.06,workspaceFolder=/workspace,forwardPorts=[8000,8080],配置 12 个 VSCode 扩展
错误:
2026-09-07T05:58:30docker pull swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2成功02s
输出
Digest: sha256:9dc159af07be6f78d586ba6f3ab67fc8ff115a76710427d0699be30068671103
Status: Image is up to date
错误:
2026-09-07T05:58:35docker run -d --name ttfhw-webui-env -v <仓库目录>:/home/workspace/webui -w /home/workspace swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2 tail -f /dev/null成功02s
输出
Container ID: b02f016f1bad;Ubuntu 24.04.3 LTS;ARCH x86_64;CORES 32;MEM 62Gi
错误:
2026-09-07T05:59:00docker exec ... apt-get update && apt-get install -y python3 sudo make locales wget curl git libcurl4t64 libcurl4-openssl-dev pkg-config成功060s
输出
基础工具安装完成(裸镜像不含 git/python3/sudo,按 manifest README 1.4 节先安装)
错误:
2026-09-07T06:03:00git config --global user.name z***g && git config --global user.email z***g@openubmc.cn && git clone --depth 1 https://gitcode.com/openUBMC/manifest.git /home/workspace/manifest成功08s
输出
manifest 仓库克隆成功,init.py 就位
错误:
2026-09-07T06:04:08cd /home/workspace/manifest && export OPENUBMC_LICENSE=true && echo 'Y' | python3 init.py -user z***g -psw '***'成功0388s
输出
系统检测 Ubuntu(legacy-full);安装 APT 依赖、bingo(apt deb 源+pip 升级)、Conan 2.32.0、Node v20.18.0/npm 10.8.2、pre-commit 工具(stylua/luacheck)、BMC SDK(/opt/RTOS/208.11.0、/opt/hcc_arm64le)、QEMU;配置并登录 Conan 远程 openubmc_opensource;摘要:openUBMC开发者环境初始化完成
错误:
备注:init.py 内部执行 ln -snf /bin/bash /bin/sh,将容器 /bin/sh 软链由 dash 改为 bash
2026-09-07T06:10:40bingo --version && conan --version && node --version && npm --version && ls /opt/RTOS/ && conan remote list && conan search -r openubmc_opensource '*'成功015s
输出
bingo 0.8.14;Conan 2.32.0;node v20.18.0;npm 10.8.2;/opt/RTOS/208.11.0;openubmc_opensource 远程已配置且可检索到 abseil/account 等包
错误:
2026-09-07T06:11:00cd /home/workspace/webui && bingo build --stage=dev成功091s
输出
Conan 导出 webui/1.100.113@openubmc.dev/dev;build() 执行 npm install(1034 packages in 35s)、npm run build(vite build ✓ built in 38.77s)、post-build gzip(426 files compressed);package() 执行 npm install --production(94 packages in 7s),打包产物到 opt/bmc/web/htdocs/;构建成功
错误:
备注:并发由 vite/esbuild 自管理,编译并发 ≤ 容器核数 60%(≤19)
2026-09-07T06:12:40ls /root/.conan2/p/b/webuiab0328b94dbcb/p/opt/bmc/web/htdocs/ && head index.html && du -sh dist/ && conan list webui成功05s
输出
打包产物 htdocs 含 index.html、assets(333)、font、image、style、style_config.json;dist 目录 14M;Conan 本地缓存 webui/1.100.113@openubmc.dev/dev
错误:
2026-09-07T06:13:07cd /home/workspace/webui && npm install --no-audit --no-fund成功030s
输出
added 1032 packages in 30s(为执行 README 测试章节命令准备完整 devDependencies)
错误:
2026-09-07T06:13:31npm run lint失败21s
输出
ESLint 8.57.1 启动后退出
错误:
No files matching the pattern "src/**/*.js" were found.(exit 2)
备注:根因:init.py 将 /bin/sh 软链为 bash,bash 对 src/**/*.{js,ts,vue,jsx,tsx} 做 brace 展开为 5 个独立 pattern;src 下无 .js 文件(仅 440 .ts / 354 .vue),src/**/*.js 无匹配且未开 nullglob,原样传给 eslint,eslint 报错退出
2026-09-07T06:15:30npm run lint --script-shell=/bin/dash(环境兼容性重试:改用标准 dash shell 避免 brace 展开)失败137s
输出
eslint 正常执行,检出 284 problems(256 errors, 28 warnings);主要规则:max-lines-per-function、max-len、complexity、camelcase;涉及 VideoPlayer.vue、VncH5.vue、utils.ts、port-service.ts、header.service.ts 等
错误:
256 个不可自动修复的 ESLint 错误(--fix 无法修复,max-lines/max-len/complexity/camelcase 均为非自动修复规则)
备注:改用 dash 后命令本身可运行,证实源码未达到 lint 零错误
2026-09-07T06:13:59npx vue-tsc --noEmit失败231s
输出
tsconfig.json(17,5): error TS5101
错误:
Option 'suppressImplicitAnyIndexErrors' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption "ignoreDeprecations": "5.0" to silence this error.(exit 2,配置解析阶段即失败,未进入类型检查)
备注:tsconfig.json 第17行启用 suppressImplicitAnyIndexErrors,在仓库自身锁定的 typescript 5.5.2 中为硬错误;属仓库配置问题,未修改源码
2026-09-07T06:17:14CI=true npx vitest run(仓库 package.json 配置的单元测试套件,README 测试章节未记录)失败117s
输出
Test Files 1 failed | 9 passed (10);Tests 1 failed | 210 passed (211);Duration 3.29s;JUnit 报告 tests/reports/js_test.xml
错误:
tests/unit/utils/date.spec.ts > Date.prototype.pattern Tests > should format hour correctly:AssertionError expected '12' to be '20'(HH 24 小时格式输出与预期不符,疑似时区/时间相关用例)
2026-09-07T06:18:00cat dist/index.html | head && ls dist/assets | wc -l(构建产物冒烟检查)成功05s
输出
打包 htdocs/index.html 有效(DOCTYPE、title version=3.0、favicon 引用、ptc 解析脚本);assets 目录 333 个文件;总包 4.4M
错误:
2026-09-07T06:20:00docker rm -f ttfhw-webui-env成功02s
输出
容器已停止并删除
错误:

5. 过程时间线 Process Timeline

时间步骤动作结果详情
2026-09-07T05:58:00start开始 webui 仓库容器化构建与测试验证流程已启动
{}
2026-09-07T05:58:05document_reading阅读 README.md、package.json、conanfile.py、.pre-commit-config.yaml、.devcontainer/devcontainer.json 及 manifest 仓库构建指导书成功
{
  "sections_read": [
    "系统要求",
    "环境依赖",
    "构建",
    "测试",
    "本地开发调试"
  ],
  "manifest_doc": "openUBMC 26.06 版本构建指导书"
}
2026-09-07T05:58:10static_analysis_scan检查仓库 pre-commit 配置已配置
{
  "config_file": ".pre-commit-config.yaml",
  "hooks_total": 13,
  "repos": [
    "openUBMC/pre-commit-hooks@0.1.1",
    "gh_mirrors/pr/pre-commit-hooks@v6.0.0",
    "local"
  ]
}
2026-09-07T05:58:00static_analysis_execution执行 pre-commit run --all-files全部通过
{
  "passed": 10,
  "failed": 0,
  "skipped": 3,
  "skipped_reason": "conventional-commit/add-signoff-and-change-id 为 commit-msg 钩子在 --all-files 模式不执行;check-sr 无 .sr 文件"
}
2026-09-07T05:58:05static_analysis_scan检查 lint-runner 配置未配置
{
  "searched_patterns": [
    ".lint-runner.yaml",
    ".lint-runner.json",
    "lint-runner.config.*",
    ".lintrunner.toml"
  ]
}
2026-09-07T05:58:10devcontainer_scan检查 .devcontainer 目录及配置已配置
{
  "config_dir": ".devcontainer",
  "files": [
    "devcontainer.json"
  ],
  "image": "swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2_26.06",
  "forwardPorts": [
    8000,
    8080
  ],
  "extensions_count": 12
}
2026-09-07T05:58:25image_selection选择基础镜像openubmc/ubuntu:24.04.2
{
  "selection_reason": "README 明确仅支持 Ubuntu 24.04 LTS 并推荐该镜像"
}
2026-09-07T05:58:35container_setup拉取镜像并启动容器成功
{
  "image": "swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2",
  "container": "ttfhw-webui-env",
  "mount": "仓库目录:/home/workspace/webui"
}
2026-09-07T05:59:00dependency_installation安装容器基础工具(python3/sudo/git/curl/libcurl 等)成功
{
  "packages": [
    "python3",
    "sudo",
    "make",
    "locales",
    "wget",
    "curl",
    "git",
    "libcurl4t64",
    "libcurl4-openssl-dev",
    "pkg-config"
  ]
}
2026-09-07T06:03:00dependency_installation配置 Git 并克隆 manifest 仓库成功
{
  "manifest_repo": "https://gitcode.com/openUBMC/manifest.git",
  "path": "/home/workspace/manifest"
}
2026-09-07T06:04:08dependency_installation执行 init.py 一键初始化(安装 bingo/Conan/Node/pre-commit 工具/SDK/QEMU,配置并登录 Conan 远程)成功
{
  "bingo": "0.8.14",
  "conan": "2.32.0",
  "node": "v20.18.0",
  "npm": "10.8.2",
  "rtos": "/opt/RTOS/208.11.0",
  "conan_remote": "openubmc_opensource",
  "duration_seconds": 388
}
2026-09-07T06:11:00build_attempt执行 bingo build --stage=dev 组件级构建成功
{
  "concurrency_ratio": "60%(≤19)",
  "duration_seconds": 91,
  "package": "webui/1.100.113@openubmc.dev/dev"
}
2026-09-07T06:12:40build_verification验证构建产物成功
{
  "dist_size": "14M",
  "htdocs_size": "4.4M",
  "assets_count": 333,
  "index_html_valid": true
}
2026-09-07T06:13:31ut_execution执行 README 测试命令 npm run lint失败
{
  "error": "/bin/sh 被 init.py 软链为 bash,brace 展开导致 eslint 找不到 src/**/*.js 文件"
}
2026-09-07T06:15:30problem_resolution环境兼容性重试:改用 dash script-shell 执行 npm run lint命令可运行但源码不达标
{
  "solution": "改用 /bin/dash 避免 brace 展开",
  "outcome": "检出 256 个不可自动修复的 ESLint 错误"
}
2026-09-07T06:13:59ut_execution执行 README 测试命令 npx vue-tsc --noEmit失败
{
  "error": "TS5101:tsconfig.json 第17行 suppressImplicitAnyIndexErrors 在 typescript 5.5.2 中为硬错误"
}
2026-09-07T06:17:14ut_execution执行仓库配置的 vitest 单元测试套件(npx vitest run)部分成功
{
  "total": 211,
  "passed": 210,
  "failed": 1,
  "failed_test": "tests/unit/utils/date.spec.ts > should format hour correctly"
}
2026-09-07T06:18:00sample_execution对构建产物(web htdocs 静态包)执行冒烟检查成功
{
  "index_html_valid": true,
  "assets_count": 333,
  "package_size": "4.4M"
}
2026-09-07T06:20:00cleanup停止并删除容器成功
{
  "container": "ttfhw-webui-env"
}
2026-09-07T06:21:00report_generation生成验证报告 JSON 并转换为静态 HTML成功
{
  "output_file": "verification_report_WSL_webui_20260907.json"
}

6. 最终结果 Final Results

6.1 静态检查

检测到 pre-commit 配置(13 个 hooks,--all-files 模式下 10 通过、3 跳过、0 失败),未检测到 lint-runner 配置

pre-commit

configured✓ 是
config_file.pre-commit-config.yaml
status通过
duration_seconds30
total_hooks13
passed10
failed0
skipped3
failures
[]

lint-runner

configured✗ 否
config_file—

6.2 DevContainer

已配置 devcontainer,基于 openubmc/ubuntu:24.04.2_26.06 镜像,工作目录 /workspace,转发端口 8000/8080,预装 12 个 VSCode 扩展(C++、CMake、Python、Ruff、GitLens 等)

enabled✓ 是
config_dir.devcontainer
config_files
[
  "devcontainer.json"
]
summary已配置 devcontainer,基于 openubmc/ubuntu:24.04.2_26.06 镜像,工作目录 /workspace,转发端口 8000/8080,预装 12 个 VSCode 扩展(C++、CMake、Python、Ruff、GitLens 等)

6.3 构建 Build

status成功
duration_seconds91
concurrencyvite/esbuild 自管理(≤ 容器核数 60% = 19)

构建产物

nameConan 组件包
path~/.conan2/p/b/webuiab0328b94dbcb/p
referencewebui/1.100.113@openubmc.dev/dev
size4.4M
nameWeb 静态资源 htdocs
path~/.conan2/p/b/webuiab0328b94dbcb/p/opt/bmc/web/htdocs/
size4.4M
contentsindex.html + assets(333) + font + image + style + style_config.json
nameVite 构建产物 dist
path~/.conan2/p/b/webuiab0328b94dbcb/b/dist/
size14M

6.4 测试 UT

status部分失败
duration_seconds86
summaryREADME 文档要求的测试命令 npm run lint 与 npx vue-tsc --noEmit 均失败;仓库配置的 vitest 单元测试套件执行 211 项,通过 210 项,失败 1 项(date.spec.ts 时区相关断言)。详见 execution_log。
total211
passed210
failed1

README 文档要求命令

npm_run_lint
status失败
reasoninit.py 将 /bin/sh 软链为 bash,brace 展开致 eslint 找不到 src/**/*.js;改用 dash 后检出 256 个不可自动修复的 ESLint 错误
npx_vue_tsc_noEmit
status失败
reasontsconfig.json 第17行 suppressImplicitAnyIndexErrors 在 typescript 5.5.2 中为硬错误 TS5101

vitest 单元测试

total211
passed210
failed1
test_files10(1 failed | 9 passed)
duration_seconds17

失败用例

test_filetests/unit/utils/date.spec.ts
test_nameDate.prototype.pattern Tests > should format hour correctly
errorAssertionError: expected '12' to be '20'(HH 24 小时格式输出与预期不符,疑似时区/时间相关用例)

6.5 样例 Sample

status成功
duration_seconds5
sample_nameWeb htdocs 静态包冒烟检查
execution_status成功
output_summary打包产物 index.html 结构有效(DOCTYPE、title version=3.0、favicon 引用、ptc 解析脚本),assets 目录 333 个文件,font/image/style 资源齐全,总包 4.4M,Conan 本地缓存 webui/1.100.113@openubmc.dev/dev 可检索
execution_time5秒

7. 文档缺口 Documentation Gaps

  1. README 测试章节仅记录 npm run lint 与 npx vue-tsc --noEmit 两条命令,未提及仓库已在 package.json 配置的 vitest 单元测试套件("test": "vitest",tests/unit/ 下 10 个用例文件、211 个用例)
  2. README 测试命令 npm run lint 与 init.py 初始化环境不兼容:init.py 内部执行 ln -snf /bin/bash /bin/sh 将 /bin/sh 软链为 bash,导致 eslint 的 src/**/*.{js,ts,vue,jsx,tsx} 被 bash brace 展开为 5 个独立 pattern,src 下无 .js 文件(仅 440 .ts / 354 .vue),src/**/*.js 无匹配致 eslint 报错退出
  3. tsconfig.json 第17行启用 suppressImplicitAnyIndexErrors 选项,在仓库自身锁定的 typescript 5.5.2 中为硬错误(TS5101),导致 npx vue-tsc --noEmit 在配置解析阶段即失败;需添加 ignoreDeprecations: "5.0" 或移除该选项方可执行类型检查
  4. README 推荐镜像标签 swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2 与 .devcontainer/devcontainer.json 中 24.04.2_26.06 标签不一致
  5. npm run lint 即便改用标准 dash shell 可正常运行,仍检出 256 个不可自动修复的 ESLint 错误(max-lines-per-function、max-len、complexity、camelcase),源码未达到 lint 零错误
  6. README 构建章节声明禁止手动 pip install conan(会导致 Conan 远程认证失败),依赖必须经 manifest init.py 安装;该约束仅在 README 文字说明,未在 conanfile.py 或构建配置中体现

8. 遇到的问题 Problems Encountered

问题:README 测试命令 npm run lint 执行失败(exit 2):eslint 报 No files matching the pattern "src/**/*.js" were found

解决方案:根因为 init.py 将 /bin/sh 软链为 bash 导致 brace 展开;尝试环境兼容性重试:npm run lint --script-shell=/bin/dash,命令可运行但检出 256 个真实 ESLint 错误(不可自动修复),未修改源码

来源:manifest 仓库 init.py 内部 ln -snf /bin/bash /bin/sh + package.json lint 脚本 src/**/*.{js,ts,vue,jsx,tsx}

问题:README 测试命令 npx vue-tsc --noEmit 执行失败(exit 2):tsconfig.json(17,5): error TS5101

解决方案:tsconfig.json 第17行 suppressImplicitAnyIndexErrors 在 typescript 5.5.2 中为硬错误,属仓库配置问题;按约束不改源码,记录失败原因

来源:tsconfig.json 第17行: "suppressImplicitAnyIndexErrors": true

问题:vitest 单元测试 1 项失败:tests/unit/utils/date.spec.ts should format hour correctly,expected '20' received '12'

解决方案:HH 24 小时格式输出与预期不符,疑似时区/时间相关用例;未修改源码,记录失败详情

来源:tests/unit/utils/date.spec.ts:38

9. 结论 Conclusion

构建结论

成功——bingo build --stage=dev 在 Ubuntu 24.04 容器中按文档流程构建成功,产出 Conan 组件包 webui/1.100.113@openubmc.dev/dev 与 Web 静态资源 htdocs(4.4M,333 个 assets)

测试结论

部分失败——README 文档要求的测试命令 npm run lint 与 npx vue-tsc --noEmit 均失败(前者因 init.py /bin/sh 软链 bash 致 brace 展开且源码存在 256 个 ESLint 错误;后者因 tsconfig 与锁定 TS 5.5.2 不兼容);仓库配置的 vitest 单元测试 211 项中通过 210 项、失败 1 项(时区相关 date 用例)

总体结论

可在容器中成功构建;测试环节存在文档与环境的兼容性问题及少量用例失败,建议修复 tsconfig 选项、统一 /bin shell 或调整 lint 脚本通配符写法、修正 date.spec.ts 时区相关断言