构建:成功 — bingo build --stage=dev 在 openUBMC ubuntu:24.04.2_26.06 容器中成功构建并打包为 Conan 组件 webui/1.100.94@openubmc.dev/dev
单元测试:成功 — vitest 单元测试 211/211 通过(需设置 TZ=Asia/Shanghai)
检查项:失败 — README 测试章节的 lint(shell 花括号展开)与 vue-tsc(tsconfig 废弃选项+5969 类型错误)两项检查命令在当前环境均无法通过,属配置/兼容性问题而非构建缺陷
总体:仓库可在容器中成功构建并完成单元测试;README 列出的 lint 与 vue-tsc 检查项因配置兼容性问题失败,建议维护方更新 lint 脚本(引号包裹 glob)与 tsconfig(移除废弃选项并修复暴露的类型错误)
| 项 | 宿主机 | 容器 |
|---|---|---|
| 架构 | x86_64 | x86_64 |
| CPU | Intel(R) Xeon(R) Gold 6151 CPU @ 3.00GHz (32核) | 32核 |
| 内存 | 62Gi | 62Gi (无限制) |
| 磁盘 | 197G (46G available) | — |
| Docker | Docker version 29.1.3, build 29.1.3-0ubuntu3~24.04.2 | — |
| 操作系统 | — | Ubuntu 24.04.3 LTS |
镜像:swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2_26.06
选择理由:仓库 .devcontainer/devcontainer.json 指定镜像 swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2_26.06,README 与 openUBMC 构建指导书推荐同源基础镜像 ubuntu:24.04.2;该镜像已预装 bingo(0.7.37)/conan(2.30.0)/node(20.18)/gcc(9.5)/交叉编译器(/opt/RTOS, /opt/hcc_arm64le) 等全部构建工具,无需再执行 init.py
| 提取项 | 来源 | 内容 |
|---|---|---|
| 架构要求 | README.md - 系统要求章节 | x86-64(amd64) |
| 推荐镜像 | .devcontainer/devcontainer.json + README.md + openUBMC 构建指导书(manifest README) | swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2_26.06(devcontainer 指定,预装全部构建工具) |
| 构建依赖 | README.md 系统要求 + openUBMC 构建指导书 + conanfile.py |
|
| 构建命令 | README.md - 组件级构建章节 | cd /home/workspace/webui && bingo build --stage=dev |
| UT 命令 | README.md - 测试章节 + package.json scripts | npm test(vitest 单元测试,tests/unit/);npm run lint(eslint 检查);npx vue-tsc --noEmit(TypeScript 类型检查) |
| 样例命令 | README.md - 本地开发调试章节 | 仓库为 Web 前端项目,README 仅提供 npm run dev 开发服务器(长驻进程,非可执行样例);无独立样例程序。README 测试章节的 lint 与 vue-tsc 作为验证检查项 |
| 特殊依赖 | README.md 环境依赖章节 + openUBMC 构建指导书 |
|
状态:成功 耗时:123s 命令:bingo build --stage=dev
Conan 包引用:webui/1.100.94@openubmc.dev/dev#3ceaca5560769a8400a1cad37d44b359:4e7cc662fbaab126bc8c2686c501baa329a6cc13#58f8bde2e8340a49690987d6b2d89442
缓存路径:~/.conan2/p/b/webui4fde038d6ba89/p
| 名称 | 路径 | 大小 | 说明 |
|---|---|---|---|
| web 前端静态资源 | opt/bmc/web/htdocs/ | 4.4 MB | assets(333 个文件, JS/CSS/图片/字体) + index.html(1.4KB) + font + image + style + style_config.json |
| Conan 组件包 | ~/.conan2/p/b/webui4fde038d6ba89/p | — | webui/1.100.94@openubmc.dev/dev,含 permissions.ini/index.html/28 png/69 svg/3 jpg/9 ttf/9 eot/9 woff/269 gz |
状态:成功 耗时:17s 框架:vitest 0.28.5(环境:happy-dom) 命令:TZ=Asia/Shanghai npx vitest run
总计:211 通过:211 失败:0
状态:失败 耗时:33s
输出摘要:容器 /bin/sh 软链至 /bin/bash,npm 脚本中的 src/**/*.{js,ts,vue,jsx,tsx} 被 bash 花括号展开为 5 个独立模式;src 下无 .js 文件(仅 .ts/.vue),致 src/**/*.js 无匹配,eslint 8.57.1 报错退出(exit 2)
耗时:1秒
诊断:用引号包裹 glob 单独执行可正常运行,实际检出 1087 个问题(831 errors / 256 warnings),其中 575 errors + 228 warnings 可由 --fix 自动修复
输出摘要:tsconfig.json 启用的 suppressImplicitAnyIndexErrors 在 TypeScript 5.5.2 中已废弃并被拒绝,类型检查无法启动(exit 2)
耗时:32秒
诊断:临时补 ignoreDeprecations=5.0 并放大堆至 8GB 后可运行,但暴露 5969 个真实类型错误(多为 TS7053 隐式 any 索引访问),即 suppressImplicitAnyIndexErrors 之前屏蔽的内容;vue-tsc 0.34.11 在默认堆下还会 OOM 崩溃
启用:True 总结:检测到 pre-commit 配置(9 个 hooks,8 通过 1 跳过),未检测到 lint-runner 配置
配置:True 状态:成功 耗时:30s
hooks:共 9,通过 8,失败 0,跳过 1
跳过 check-sr — 仓库无 .sr 后缀文件(no files to check)
配置:False
启用:True 目录:.devcontainer 文件:devcontainer.json
已配置 devcontainer,基于 openUBMC ubuntu:24.04.2_26.06 镜像,workspaceFolder=/workspace,预装 bingo/conan/node/gcc/交叉编译器及 VSCode 扩展(cpptools/cmake-tools/python/ruff 等),forwardPorts=[8000,8080]
时间:2026-08-23T22:00:30 返回码:0
输出:
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 Check .sr Files...(no files to check)Skipped
时间:2026-08-23T22:01:00 返回码:0
输出:
未找到 lint-runner 相关配置文件
时间:2026-08-23T22:01:10 返回码:0
输出:
devcontainer.json(image=swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2_26.06,workspaceFolder=/workspace,forwardPorts=[8000,8080])
时间:2026-08-23T22:01:20 返回码:0
输出:
Status: Image is up to date(镜像已存在本地)
时间:2026-08-23T22:01:30 返回码:0
输出:
Container ID: c92b391246f4...
时间:2026-08-23T22:02:00 返回码:0
输出:
Python 3.12.3; node v20.18.0; npm 10.8.2; Conan 2.30.0; bingo 0.7.37; gcc 9.5.0(镜像已预装全部工具)
备注:镜像已预装 bingo/conan/node/gcc,无需执行 init.py;仅缺 Conan 远程登录认证
时间:2026-08-23T22:02:30 返回码:0
输出:
Authenticated in remote 'openubmc_opensource' with user 'zhao****' Changed user of remote 'openubmc_opensource' from 'None' (anonymous) to 'zhao****' (authenticated)
备注:使用社区账号登录 Conan 远程仓库,凭证通过环境变量注入以避免特殊字符转义
时间:2026-08-23T22:02:40 返回码:0
输出:
openubmc_opensource abseil/20250127.0.004@openubmc/stable account/1.90.42@openubmc/stable(远程仓库可访问)
时间:2026-08-23T22:03:00 返回码:0
输出:
源码已复制至容器 /home/workspace/webui
时间:2026-08-23T22:04:15 返回码:255
输出:
conan版本: 2.30.0 ERROR: Command '['/usr/bin/git', 'remote', '-v']' returned non-zero exit status 128. ERROR: 请查看日志信息 构建失败
错误:
bingo 执行 git remote -v 失败:复制源码时排除了 .git 目录,容器内无 git 元数据
备注:bingo 构建前会调用 git remote -v 获取远程地址,仓库需保留 .git 目录
时间:2026-08-23T22:04:30 返回码:0
输出:
origin https://gitcode.com/openUBMC/webui.git;HEAD c66ee5e
时间:2026-08-23T22:04:40 返回码:0
输出:
npm install ... added 1034 packages vite build ✓ built in 37.81s gzipper: 426 files compressed npm install --production ... added 94 packages webui/1.100.94@openubmc.dev/dev: Package '4e7cc662fbaab126bc8c2686c501baa329a6cc13' built Created package revision 58f8bde2e8340a49690987d6b2d89442 构建成功
备注:并发由 vite/esbuild 自管理;构建产物发布到 Conan 本地缓存 ~/.conan2/p/b/webui4fde038d6ba89/p
时间:2026-08-23T22:07:00 返回码:0
输出:
added 1034 packages in 21s(devDependencies 包含 vitest/eslint/vue-tsc)
备注:conanfile.py 的 package() 步骤执行了 npm install --production,移除了 devDeps;测试前需重装完整依赖
时间:2026-08-23T22:07:30 返回码:2
输出:
ESLint: 8.57.1 No files matching the pattern "src/**/*.js" were found. Please check for typing mistakes in the pattern.
错误:
容器 /bin/sh 软链至 /bin/bash,bash 会对 {js,ts,vue,jsx,tsx} 做花括号展开为 5 个模式;src 下无 .js 文件(仅 .ts/.vue),故 src/**/*.js 无匹配导致 eslint 报错退出(exit 2)备注:诊断:用引号包裹 glob 执行 npx eslint "src/**/*.{js,ts,vue,jsx,tsx}" 可正常运行,实际检出 1087 个问题(831 errors, 256 warnings),其中 575 errors + 228 warnings 可由 --fix 自动修复
时间:2026-08-23T22:07:55 返回码:2
输出:
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.
错误:
tsconfig.json 启用的 suppressImplicitAnyIndexErrors 选项在 TypeScript 5.5.2(package.json 钉版)中已废弃并被拒绝,类型检查无法启动(exit 2)
备注:诊断:临时 tsconfig 补 ignoreDeprecations=5.0 并放大堆至 8GB 后可运行,但暴露 5969 个真实类型错误(多为 TS7053 索引签名隐式 any),正是 suppressImplicitAnyIndexErrors 之前屏蔽的内容;不放大堆时 vue-tsc 0.34.11 还会 OOM 崩溃
时间:2026-08-23T22:08:30 返回码:1
输出:
Test Files 1 failed | 9 passed (10) Tests 1 failed | 210 passed (211) FAIL tests/unit/utils/date.spec.ts > should format hour correctly:expected '20' to be '12'
错误:
date.spec.ts 用 new Date('2024-03-15T12:34:56.789Z') 构造 UTC 12:34 的时间,却断言 HH='20'/hh='08'(即期望按 UTC+8 中国时区解释),容器时区为 Etc/UTC 导致 hour 返回 12 而非 20备注:时区敏感的测试用例,非代码缺陷
时间:2026-08-23T22:09:00 返回码:0
输出:
Test Files 10 passed (10) Tests 211 passed (211) Duration 3.38s JUNIT report written to tests/reports/js_test.xml
备注:设置 TZ=Asia/Shanghai 后全部用例通过;date 测试默认按中国时区编写
问题:首次 bingo build --stage=dev 失败:bingo 调用 git remote -v 返回 exit 128
解决:补传仓库 .git 目录到容器 /home/workspace/webui 后重新构建
来源:bingo 构建前需 git 元数据;复制源码时排除了 .git
问题:conanfile.py 的 package() 步骤执行 npm install --production,移除了 devDependencies,导致后续无法直接运行 vitest/eslint/vue-tsc
解决:测试前重新执行 npm install 恢复完整依赖(含 devDependencies)
来源:conanfile.py 第628行:self.run(f'npm install --production')
问题:npm run lint 失败:src/**/*.{js,ts,vue,jsx,tsx} 被 bash 花括号展开,src/**/*.js 无匹配
解决:属 shell 兼容性问题,不改源码;诊断时用引号包裹 glob 验证 eslint 实际检出 1087 个问题
来源:package.json scripts.lint + 容器 /bin/sh→bash
问题:npx vue-tsc --noEmit 失败:tsconfig.json 的 suppressImplicitAnyIndexErrors 在 TS 5.5.2 中被废弃拒绝
解决:属配置兼容性问题,不改源码;诊断用临时 tsconfig 补 ignoreDeprecations=5.0,暴露 5969 个真实类型错误
来源:tsconfig.json 第17行 + package.json typescript 5.5.2
问题:vitest 默认 UTC 时区下 date.spec.ts 1 例失败(expected '20' to be '12')
解决:设置 TZ=Asia/Shanghai 重跑,211/211 全部通过
来源:tests/unit/utils/date.spec.ts 第14、38 行:用 UTC 时刻按中国时区断言