Skip to content

fix(release): render compose images from the release repository - #15

Merged
sunyalou merged 2 commits into
mainfrom
fix/oac15-compose-image-repository
Oct 3, 2026
Merged

sunyalou merged 2 commits into
mainfrom
fix/oac15-compose-image-repository

Conversation

@sunyalou

@sunyalou sunyalou commented Oct 3, 2026

Copy link
Copy Markdown
Owner

目标

修复 fork release 渲染出的 compose.yaml 镜像引用。模板把 ghcr.io/minimax-ai/openagentcore/... 写死,导致 fork release 把镜像推到 ghcr.io/sunyalou/openagentcore/...,却发布一份默认拉上游镜像的 compose(OAC-14 人类裁决 ②)。修复后:release 渲染的 OAC_IMAGE_{CORE,WEB,INGRESS} 默认指向该 release 实际推送的仓库与 tag;非 fork 场景仍为上游 ghcr.io/minimax-ai/...。

改动

  • deploy/compose/compose.yaml:OAC_IMAGE_{CORE,WEB,INGRESS} 默认值改为 token __OAC_IMAGE_REPOSITORY__/...:__OAC_IMAGE_TAG__。
  • scripts/render-compose.py:新增可选 IMAGE_REPOSITORY / IMAGE_TAG(缺省仍为上游 ghcr.io/minimax-ai/openagentcore + latest),并校验格式;未传值的既有调用(本地试用、smoke、测试)行为不变。
  • scripts/publish-core-release.py:渲染时传入发布仓库 ghcr.io/<repository.lower()> 与该 release 实际发布的 tag。稳定发布同时移动 latest,故保留浮动 latest(上游行为不变);预发布与手动 build-<SHA> 草稿渲染其发布的精确 tag。
  • 测试:deploy/compose/test_compose.py 覆盖 fork 引用、上游默认与非法值;scripts/publish-core-release.test.py 覆盖 fork draft 与稳定上游默认。
  • 文档:docs/maintainers.md、docs/zh/maintainers.md 按「发布仓库命名空间 + 渲染 compose 默认」更新。

验证(命令 + 结果)

  • python3 -m unittest discover -s deploy/compose -p 'test_*.py' → 8 passed
  • python3 scripts/publish-core-release.test.py → 40 passed
  • make check-names → passed
  • make check-docs → passed
  • go test ./services/web -count=1 → ok
  • 手工 docker compose config:
    • fork 渲染(IMAGE_REPOSITORY=ghcr.io/sunyalou/openagentcore、IMAGE_TAG=build-5423a68d…)→ ghcr.io/sunyalou/openagentcore/{ingress,core,web}:build-5423a68d…
    • OAC_IMAGE_CORE 覆盖仍优先生效
    • 不传 image 值 → 上游 ghcr.io/minimax-ai/openagentcore/{...}:latest

make check-distribution 在本机有两个与本改动无关的既有环境缺口(涉及文件与 origin/main 逐字节相同,git diff --stat origin/main 为空):

  • 本机未安装 pigz → scripts/core-distribution-manifest.test.py 6 个用例 FileNotFoundError: 'pigz'(CI 会安装 pigz)。
  • deploy/node/test_node_install.py 在进程内调用 installer.main() 会把 PATH 覆盖为 SAFE_PATH(deploy/node/node_install.py:994/:1150),使随后 test_node_proxy.NodeProxyTests.setUpClass 的 openssl 落到 /usr/bin/openssl(1.0.2k,不支持 -addext);CI 的 /usr/bin/openssl 为 3.x,不触发。

已知限制

  • 「新 release 的 compose 引用 == 该 release 推送的镜像」需一次新 release 复验(GHCR 推送 + release 流程),本 PR 不触发发布。
  • 本机无 gh,PR 通过 GitHub REST API 创建。

The release template hardcoded the upstream ghcr.io/minimax-ai namespace, so a
fork release published images to ghcr.io/<fork>/openagentcore but shipped a
compose.yaml that pulled upstream. Render the OAC_IMAGE_* defaults from the
repository the release actually published to and the tag it used.

A stable publication still moves latest, so it keeps the floating tag upstream
always shipped; every other release (prerelease or manual build-<SHA> draft)
renders the exact tag it published. Callers that omit the new values keep the
upstream latest defaults, so local trials and smoke tests are unchanged.

Tests cover the fork draft, the stable upstream default, and value validation.

Co-authored-by: multica-agent <github@multica.ai>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

The English sources changed with the compose image parameterization but both
Chinese source_hash values were stale, which fails the website translation
check. Recompute them after aligning the translations.

install-options now says Core and Web use the release repository's tag (latest
for a stable release) instead of a fixed latest image. maintainers names the
image path as ghcr.io/<owner>/<repository>/<component>, matching the publisher
for any repository name.

Add a publisher test asserting a prerelease publish renders the exact tag it
pushed (not latest), alongside the stable and draft cases.

Co-authored-by: multica-agent <github@multica.ai>
@sunyalou
sunyalou merged commit 9c41179 into main Oct 3, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant