Skip to content

ci: simplify SAI activation and use job-scoped API credentials - #12

Merged
userchba merged 3 commits into
userchba:developfrom
Stardust0831:ci/sai-deployment-activation
Nov 18, 2026
Merged

userchba merged 3 commits into
userchba:developfrom
Stardust0831:ci/sai-deployment-activation

Conversation

@Stardust0831

@Stardust0831 Stardust0831 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

SAI validation currently skips pushes unless branch protection is enabled, and its publisher needs a separately provisioned token to read repository variables. Trust pushes to the upstream main and develop branches using the repository's existing write permissions, and let each job supply its automatically issued read-only GITHUB_TOKEN to the site publisher. PR and manual runs still require a trusted Environment approval; exact SHA and run-attempt checks remain in place.

The runner writes the short-lived token to a private request mailbox, separate from published artifacts, and removes it during cleanup. The publisher uses it only to query GitHub and rejects links and special files. No personal PAT or Variables API permission is needed. Site administrators must mount the mailbox and set SAI_REQUESTS as documented.

Owner setup: configure sai-libddla reviewers with main, develop, and refs/pull/*/merge allowed; configure sai-libddla-push for the two upstream branches without per-push approval; set SAI_CI_ENABLED=true after site acceptance. Branch protection remains optional. Keep the check informational while deployment acceptance and the known CUDA failures remain outstanding.

Validation: actionlint, four admission/cancellation/mailbox tests, and whitespace checks passed. Site acceptance submitted and cancelled a real Slurm job and collected its failure evidence. The runner is online; the first enabled GitHub GPU run remains to be verified.


目前 SAI 验证把分支保护作为推送测试的硬条件,站点服务还需要额外凭据读取仓库变量。本改动直接信任已有写权限者对上游 main、develop 的推送,并让任务把 GitHub 自动签发的只读、短期 GITHUB_TOKEN 交给站点核对运行信息。PR 和手动运行仍需可信维护者审批;完整 SHA、当前 PR 提交和运行编号的检查保留。

短期 token 放在独立的私有请求目录中,不上传为测试产物,结束时清理;站点拒绝符号链接和特殊文件。无需另配个人 PAT 或 Variables API 权限。SAI 管理员需挂载请求目录并设置 SAI_REQUESTS,具体见部署说明。

Owner 需要:给 sai-libddla 配维护者审批并允许 main、develop、refs/pull/*/merge;给 sai-libddla-push 配两个上游分支且不要求逐次审批;站点验收后设置 SAI_CI_ENABLED=true。分支保护由仓库自行决定。部署与已知 CUDA 失败项验收前,继续保持为非必过检查。

验证:actionlint、四项授权/取消/请求目录测试及空白检查通过。站点验收已实际提交、取消 Slurm 作业并回收失败证据;runner 已上线,首次启用后的 GitHub GPU 测试仍待验收。

@userchba
userchba merged commit 7f2e37c into userchba:develop Nov 18, 2026
4 checks passed
userchba added a commit that referenced this pull request Nov 21, 2026
ci: simplify SAI activation and use job-scoped API credentials
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.

2 participants