Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

test(e2e): the history-jsonpath pin misses guard calls that do not start a line

未关闭
#4,735 2 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
76/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
go, kubernetes, shell
领域
devops, testing

调研方向

Start in internal/fluxcontract/snapshot_shape_test.go, reading TestChainsawSuitesReadHistoryThroughTheSharedName and its guardConsumers and scriptSteps helpers. Check how it scans run-kubernetes.sh and Chainsaw suites, then run the focused contract test. Done when calls after &&, || or ; are detected and shell command operations' -c arguments are checked as steps.

由索引模型根据 Issue 内容生成。

描述

area/testing kind/bug triage/needs-triage

The contract test that holds every guard caller to the shared history jsonpath only sees calls in two shapes, so a caller written another way goes unchecked. The test is TestChainsawSuitesReadHistoryThroughTheSharedName and its neighbours in internal/fluxcontract/snapshot_shape_test.go, extended to the Chainsaw suites in #4689.

The guardConsumers pattern is anchored to the start of a line. A call such as cond && helmrelease_has_remediation_cycle "$x", or one after ; or ||, is not matched, in run-kubernetes.sh or in a suite. Today the opensearch suite is the only suite caller, so the callers == 0 check would catch it there. A second suite written that way would pass silently.

scriptSteps walks Chainsaw script operations only. A command operation (entrypoint: sh, args: [-c, ...]) that runs the guard is not read at all. No suite uses one today.

The fix is to match a call after &&, || and ; as well, and to read the -c argument of a shell command operation as a step.

主要语言
Go
星标
2.2k
派生
209
平均合并
3 天 12 小时
30 天内合并 PR
230

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

cozystack/cozystack 的其他 Issue

查看 cozystack/cozystack 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。