Skip to content

docs: translate KEDA autoscaler guide to English - #416

Open
Echo-Nie wants to merge 4 commits into
redai-studio:mainfrom
Echo-Nie:docs/translate-keda-guide
Open

Echo-Nie wants to merge 4 commits into
redai-studio:mainfrom
Echo-Nie:docs/translate-keda-guide

Conversation

@Echo-Nie

@Echo-Nie Echo-Nie commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

What

发现这个是中文文档...

https://redai-studio.github.io/Relax/en/guide/autoscaler-k8s-keda.html

Why

因为在en目录下

How

翻译,不过先用Astra翻了一下,明天人肉check一下,先提一个draft

二编:检查了一下,稍微改了一点点内容。然后还发现一个问题是 docs/.vitepress/config.mts 里面好像没注册?加了一下

Testing

  • pre-commit run --all-files passes
  • Tests pass (pytest tests/)
  • New tests added (if applicable)
  • Documentation updated (if applicable)

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • CI/CD or build changes

Screenshots / Logs

@rai-studio-bot

Copy link
Copy Markdown
Contributor

Thanks for contributing to Relax, @Echo-Nie! 感谢你为 Relax 做出贡献!

Contribution guide / 贡献指南

Describe the problem, your changes, and how you validated them. Keep each PR focused and run pre-commit run --all-files before submitting.

请说明问题、改动和验证方式,保持 PR 聚焦,并在提交前运行 pre-commit run --all-files。

English contribution guide · 中文贡献指南

CI commands / CI 指令
Command / 指令 Usage / 用途
/rerun Retry failed CI / 重跑失败的 CI
/rerun <target> Rerun a workflow or check / 重跑指定 workflow 或检查
/cancel <workflow> Cancel an entire workflow / 取消整个 workflow
/help Show commands and targets / 查看指令和 target
/review Request a code review / 请求代码 review

Put one command on the first line of a new PR comment. Rerun/cancel require PR authorship or repository write access.

在新 PR 评论的首行写一条指令。PR 作者或有仓库写权限的贡献者可以重跑、取消 CI。

CI usage and targets · CI 用法与 target

@Echo-Nie
Echo-Nie marked this pull request as ready for review October 6, 2026 10:50
@rai-studio-bot

rai-studio-bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Nyanpasu 审查看板

审查状态: 💬 已完成 · 有补充意见

审查版本: ba730d5

目标分支: main

审查已全部完成并应用户请求发布最终结论:F1 已修复确认(线程已标记 resolved),F2 按作者对 KEDA 官方文档的更正撤回,唯一剩余项为 F3(L411 cooldownPeriod 行描述建议,非阻塞,采用与否由作者决定)。翻译结构一致性、代码引用、链接与侧边栏注册均已核对通过,无阻塞问题。

审查阶段进度范围与结果
常规审查 ✅ 已完成 已核对 KEDA ScaledObject 官方文档(cooldownPeriod 定义、scale-to-0 适用条件、minReplicaCount>0 时 HPA 驱动全部扩缩),确认作者反驳成立并撤回 F2;据此把同文件 L411 表格行的“缩容冷却”描述作为 F3 提出修正建议。
深度审查 ➖ 无需执行 讨论仅涉及文档表述与外部文档核对,无生产代码、测试或示例改动;无需深度子任务。

审查发现

待处理
编号 严重性 问题状态规则来源
F3 Low severity 更正 cooldownPeriod 的作用描述:仅在缩容到 0 时生效 🚧 未解决 —
已解决或已取代
编号 严重性 问题状态规则来源
F1 Low severity 更正 --scale-in-shutdown-timeout 默认值:代码中是 30s ✅ 已解决 —
F2 Low severity 补回漏译的 KEDA cooldownPeriod ➖ 已被后续变更取代 —
提交范围 · 接收 5 · 建议移出 0 · 待确认 0

接收 5 个文件 · 建议移出 0 个文件 · 待确认 0 个文件。移出与待确认部分暂停深审,不代表审查通过。

文件结论仓库维护必要性依据替代去向或方案
docs/en/guide/autoscaler-k8s-keda.md
接收 英文文档树中该指南此前为纯中文内容,本 PR 补全英文翻译;这是面向用户、随仓库 docs 站点一起维护的正式文档,且此前审查(PR #409)已把该页面的英文缺失记录为遗留问题。责任与上一轮判定一致,无变化。 PR #416 描述(https://github.com//pull/416)与既有页面 docs/en/guide/autoscaler-k8s-keda.md;PR #409 审查记录中的 P3 遗留项。 仅把译文存放在 PR 证据或外部归档中,英文文档站点仍会保留一个中文页面,docs/en 树的语言一致性问题依旧存在。
docs/.vitepress/config.mts
接收 为已存在的 /en 与 /zh KEDA 页面补上侧边栏注册项;缺少该改动译文页面无法从站点导航到达,是翻译工作可用的必要配置。责任与上一轮判定一致,无变化。 PR #416 描述中的作者说明(“config.mts 里面好像没注册?加了一下”);docs/.vitepress/config.mts 中相邻条目均为已注册页面。 不加注册项会让页面成为孤儿页面;没有更小的现有机制可以自动发现该页面。
docs/zh/guide/autoscaler-k8s-keda.md
接收 更正本 PR 译文的中文原页同表中的默认值错误(20s → 30s,与 relax/utils/arguments.py:1171 的 30.0 一致);与译文属于同一文档责任,随 docs 站点一起维护。 审查发现 F1(https://github.com//pull/416#discussion_r4194523309);relax/utils/arguments.py:1171 实际默认值 30.0。 只改英文译文会让 zh/en 两页数值不一致;不修则默认值错误继续误导 terminationGracePeriodSeconds 预算估算。
docs/en/guide/elastic-rollout.md
docs/zh/guide/elastic-rollout.md
接收 同一默认值错误(20s)也存在于弹性扩缩容主文档的参数表中,本提交顺带更正;这是随仓库维护的用户文档,与 KEDA 指南互为引用,保持两处数值一致是文档正确性要求。 审查发现 F1 指出的 relax/utils/arguments.py:1171 默认值 30.0;docs/en/guide/elastic-rollout.md 参数表原为默认值 20。 留给后续 PR 单独修正会让同一错误值在四份文档中继续存在;不修则用户按错误默认值估算缩容预算。
Powered by Nyanpasu with glm-5.3-flash max, please check the suggestions carefully.

@rai-studio-bot rai-studio-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审查结论:两处低优先级补充意见

翻译结构与中文原版逐行对应(41 个标题、代码块与表格位置一致),文档中的事实性引用已与代码逐一核对:scale_out/scale_in/engines 端点、HTTP 409 互斥、LIFO 缩容、初始引擎下限保护、状态机枚举、relax/components/rollout.py:29 的幂等说明均属实;./elastic-rollout.md 与 ./fully-async-training.md 链接有效;config.mts 新增的 en/zh 侧边栏项均指向已存在页面;当前 head 上没有失败的 CI 检查。余下两处低优先级问题(默认值笔误与一处漏译)见上方行内评论。

看板:Nyanpasu 审查看板

Powered by Nyanpasu with glm-5.3-flash max, please check the suggestions carefully.

Comment thread docs/en/guide/autoscaler-k8s-keda.md Outdated
Comment thread docs/en/guide/autoscaler-k8s-keda.md
Signed-off-by: Echo-Nie <nyxchaoji123@163.com>

@rai-studio-bot rai-studio-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审查补充:一条低优先级修正建议

F2 讨论串中已确认 cooldownPeriod 仅在缩容到 0 时生效(KEDA 官方文档明确 “only applies when scaling to 0”,本示例 minReplicaCount: 2 下不生效),据此撤回 F2,英文版现有表述比中文原版更准确;同时把关键时间参数表中该参数行的描述修正为准确口径,见行内评论。F1 此前已确认修复,无其他遗留问题。

看板:Nyanpasu 审查看板

Powered by Nyanpasu with glm-5.3-flash max, please check the suggestions carefully.

| `--scale-in-drain-timeout` (Relax) | 30s (default) | Timeout for in-flight requests to finish |
| `--scale-in-shutdown-timeout` (Relax) | 30s (default) | Graceful engine shutdown timeout |
| preStop `MAX_WAIT` | 150s | Must be less than `terminationGracePeriodSeconds` |
| KEDA `cooldownPeriod` | 300s | Scale-down cooldown to avoid frequent scaling |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Low severity P3 · 更正 cooldownPeriod 的作用描述

接 F2 讨论串的结论:KEDA ScaledObject spec 明确 “the KEDA cooldownPeriod only applies when scaling to 0”,1 到 N 之间的扩缩由 Kubernetes HPA 负责。本示例 minReplicaCount: 2,永远不会缩到 0,该参数在这套配置里实际不生效——“Scale-down cooldown to avoid frequent scaling” 会误导读者以为它能抑制 2↔N 的缩容(实际由上一行的 stabilizationWindowSeconds / policies 控制)。

建议改为:

Suggested change
| KEDA `cooldownPeriod` | 300s | Scale-down cooldown to avoid frequent scaling |
| KEDA `cooldownPeriod` | 300s | Cooldown before scaling to 0; not used when `minReplicaCount` > 0 |

同一说法还出现在 ScaledObject YAML 示例的 cooldownPeriod: 300 注释(“Scale-down cooldown in seconds”),以及中文原页同位置的表格行与“互斥保护”一句,可按同一口径一并修正。

@rai-studio-bot rai-studio-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审查结论:无阻塞问题,仅剩一条可选修正

收到审查邀请,确认当前状态:F1(shutdown 超时默认值)已由 ba730d58 修复并核对无误;F2 已按你对 KEDA 官方文档的更正撤回,英文版现有表述更准确;唯一剩余项是 F3——关键时间参数表中 cooldownPeriod 行的描述建议(行内评论已附 suggestion),采用与否由你决定,不阻塞合并。我这边审查已全部完成,其余内容(翻译结构一致性、代码引用、链接、侧边栏注册)均已核对通过。

看板:Nyanpasu 审查看板

Powered by Nyanpasu with glm-5.3-flash max, please check the suggestions carefully.

This branch has not been deployed

No deployments
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