基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/kubernetes-sigs/kueue --skill push-guards-to-callees命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Create (or reuse) the manager + worker kind clusters for Kueue MultiKueue e2e development. Use when a user asks to spin up MultiKueue e2e clusters, get a local multi-cluster environment ready, or debug/iterate against a MultiKueue e2e suite (baseline, extended, sequential, DRA).
Create (or reuse) a single kind cluster for Kueue e2e development. Use when a user asks to spin up an e2e cluster, get a local kind environment ready for e2e tests, or debug/iterate against a single-cluster e2e suite (baseline, extended, sequential, TAS, cert-manager, DRA).
Build and manage a kind cluster for Workload-Aware Scheduling (WAS) e2e tests. Use when the user wants to set up, run tests against, or tear down a WAS test cluster built from Kubernetes main.
| name | push-guards-to-callees |
| description | Review that repeated guards at multiple call sites are moved inside the callee instead. |
| license | Apache-2.0 |
| metadata | {"copyright":"The Kubernetes Authors"} |
Flag: The same conditional guard appears at multiple call sites before the same function:
// repeated at 3+ places in workload_controller.go
if !concurrentadmission.IsParent(w) {
r.queues.AddOrUpdateWorkload(w)
}
Ask: Move the guard inside the callee so callers don't need to know about the special case:
func (m *Manager) AddOrUpdateWorkload(w *kueue.Workload) {
if features.Enabled(features.ConcurrentAdmission) && concurrentadmission.IsParent(w) {
return
}
// ... existing logic
}
// call sites are now clean — guard cannot be accidentally omitted
r.queues.AddOrUpdateWorkload(w)
Exception: if the guard is load-bearing at the call site because it avoids constructing expensive arguments, keep it there and document why explicitly.