Repository navigation
feat: prepare single-machine offline deployment and same-origin frontend - #362
Merged
EricWvi merged 4 commits intoNov 17, 2026
Merged
Conversation
wanglongan587
force-pushed
the
feat/1120-offline-deployment
branch
2 times, most recently
from
November 17, 2026 02:44
f4394ea to
c4607d0
Compare
wanglongan587
force-pushed
the
feat/1120-offline-deployment
branch
from
November 17, 2026 11:38
c4607d0 to
85bc9a5
Compare
wanglongan587
marked this pull request as ready for review
November 17, 2026 11:39
zhangxinhao
approved these changes
Nov 17, 2026
zhangxinhao
left a comment
Contributor
There was a problem hiding this comment.
LGTM(85bc9a5)
@wanglongan587 我看了这个 PR,理解它是要补齐单机离线部署的预检底座,提供可搬移且校验摘要的运行资源、同源前端托管和显式关闭官方市场的能力,并记录安装升级边界。整体没问题,可以合并。
- 测试:
cd v2-server && go test -count=1 -run 'Test(LoginPreflightBeforeEffects|OptionalIntegrationUnsetAndEmpty|DeploymentPreflightPreservesExistingData|ResourceRelocationAndLegacyAbsolutePath|FrontendBoundary|FrontendPreservesRealAPIRouting|MarketSourcesReportsOfficialCapabilityWithoutCatalog|OfficialMarketCapabilityUsesConfiguration)$' . ./internal/preparedassets ./internal/server ./internal/store通过;cd v2-server && python3 -B scripts/package_offline_test.py通过;cd frontend-v2 && npm test -- src/features/settings/plugins/page.test.tsx没跑(未安装前端依赖,命令因找不到 vitest 而无法执行。);git diff --check f4560815db354f041393a4db5674706490bc871f HEAD通过;没跑全量和 e2e。
涉及对外 API/协议、鉴权,建议 owner 再看一眼。
以上都是建议,怎么处理由你决定。
自动检视 · 基于 85bc9a5 · 第 1 轮(全量)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
部署资源原先依赖开发机路径,服务端不托管前端,官方市场也无法显式关闭。本 PR 增加单机离线包、可搬移并验证摘要的 Node 资源、同源静态前端和关闭官方市场的配置,并提供中英安装、升级及首次内网验收说明。
这是 preflight 预开发实现,尚不可部署上线:IDaaS 登录、版本化迁移和 HTTPS 终止方案尚需集成与确定。构建不启用前端 mock,不打包演示命令、用户配置、源码或数据卷。
package-offline.py直接读取prepare-node.sh中的固定source_commit(当前c5265072ace476b6cdd88fc69fb58ffafec20066);部署说明已同步自定义市场 Git HTTPS 认证(http.followRedirects=false、改 URL 需更新/清除凭据及内网认证报错核对)、私有项目仓库令牌与租户 MCP 设置对V2_MARKET_CREDENTIAL_KEY的复用,并按cloud#383合入后的现状说明部署版保留服务端「角色」页与工作流角色字段(仅隐藏浏览器的「模型连接」页)。ADR:部分落实
decisions/cloud/lifecycle/0-single-process-cloud-on-enterprise-intranet.md的 D2 / D6 第 8 条与decisions/cloud/login/0-idaas-or-email-login-with-shared-web-and-desktop-sessions.md的 D1;两份 ADR 仍为approved。本 PR 未补齐全部实现,不改为implemented;核心用例证据已同步至 ora-space/specs#296,剩余集成与现场验收由关联运行继续跟进。Refs ora-space/circus#1120
Evidence
After: 配置、HTTP 路由、旧市场快照/自定义源及空目录重试有回归测试;
officialEnabled经候选契约生成客户端;资源使用相对路径及摘要校验,package-offline.py与prepare-node.sh单一来源同步校验固定提交;双语部署与验收说明已对齐当前main(含服务端角色可见性、租户 MCP / 自定义市场 Git / 私有仓库对V2_MARKET_CREDENTIAL_KEY的复用规则)。85bc9a5f(已 rebase 至upstream/mainf4560815)本地验证:gofmt -l .无未格式化文件,go vet ./...通过,python3 -B scripts/package_offline_test.py1/1 通过,真实 PostgreSQL 18.6 上go test -race -p 2 -count=1 ./...29 个有测试的包全部ok。npm run api:generate无漂移,npm run check(14 项api:check:*、tsc -b、oxlint --deny-warnings、Vitest114文件 /951测试、vite build)全部通过;隔离 PostgreSQL 与端口上npm run e2e通过(78 passed、14 skipped,需真实 Node 资源的 opt-in 用例按前提跳过)。85bc9a5f的 v2 CI 44075843715 三项(server、frontend、e2e)全部success。c4607d05(同打包与搬移脚本代码)完成:300M 离线包SHA256SUMS校验通过,assets.json为相对路径与releaseprofile,V2_LOGIN=idaas在触碰数据前拒绝,V2_LOGIN=email搬移后-fixture-check与同源边界均通过;本次 rebase 至85bc9a5f后未重新生成 tar 包。Merge Danger
Door: two-way
无数据库迁移或删除已有数据。当前为不可独立上线的 preflight 底座实现,按 owner 指示先作为底座审阅合并;正式可用仍待
#1051(版本化迁移)、#1052(IDaaS 登录)、HTTPS 方案确认及内网现场验收。Blast Radius: deployment
启动要求显式
V2_LOGIN,变更触及启动接线、静态路由、市场目录和构建脚本;升级时需同步服务端与生成客户端。包是预检交付物,不是正式可用部署版。