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

[quality] Helm chart: ingress.yaml is rendered by no helm-unittest suite and by neither kind install; serviceaccount/configmap/service and the apiUrl, extraEnv, image.tag, create=false arms are unasserted

未关闭
#625 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

@hivecommons-hive 已经在做这个了。

开始于 2026年10月29日。

  • #626 来自 @hivecommons-hive —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
30/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
停滞
技术栈
helm, kubernetes, yaml
领域
devops, testing

调研方向

Read the chart’s existing suites under charts/prow-github-app/tests/ and the templates they cover, then follow the cases listed in the issue for ingress_test.yaml and wiring_test.yaml. Run helm unittest charts/prow-github-app; done means the new cases assert the listed template arms and pass, with each case failing when its corresponding arm is removed.

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

描述

agent/quality needs-kind stage/040-covered-by-pr testing

Finding

charts/prow-github-app (landed in #624, main@db0322e) ships a helm-unittest suite and a kind install in the chart CI job, but four templates and several value arms are exercised by neither:

Template / arm helm unittest (tests/*.yaml) kind install (ci/*.yaml)
templates/ingress.yaml (whole file) no suite lists it ingress.enabled is false in both ci/single-values.yaml and ci/ha-external-redis-values.yaml → renders nothing
templates/serviceaccount.yaml no suite lists it rendered with defaults only; serviceAccount.create: false, .name, .annotations arms never
templates/configmap.yaml no suite lists it rendered with defaults only; github.apiUrl arm (GITHUB_API_URL) never, prow.dryRun always false
templates/service.yaml no suite lists it rendered with defaults only
_helpers.tpl extraEnv range, image.tag default-to-appVersion, fullnameOverride, serviceAccountName fallback to default not set by any suite not set by any ci/ values file (image.tag=ci is always passed)

schema_test.yaml lists templates: [deployment.yaml]; topology_test.yaml lists deployment.yaml, pdb.yaml, secret.yaml, cronjob.yaml. Nothing else is rendered under assertion.

The Ingress matters most: docs/github-app.md:79-81 is the documented way to expose the webhook (ingress.enabled=true, className=nginx, hosts[0].host, paths[0].path=/webhook, pathType=Exact), and its backend targets the Service by port name (port: { name: http }), a cross-template contract with service.yaml that nothing pins. The pathType | default "Prefix" fallback, tls, annotations and className arms are likewise never rendered.

Evidence
  • Unit: helm unittest charts/prow-github-app (plugin 1.2.1, helm 3.19) at db0322e — 2 suites, 15 tests pass; template lists as above.
  • End-to-end: .github/workflows/test.yml chart job, run 40969205788 (job 123781385369, every step success) — ct lint --all, then helm install of the two ci/ values files; neither enables the ingress or sets any of the arms above.
  • helm template … --set ingress.enabled=true --set ingress.className=nginx --set 'ingress.hosts[0].host=…' --set 'ingress.hosts[0].paths[0].path=/webhook' --set 'ingress.hosts[0].paths[0].pathType=Exact' renders a valid networking.k8s.io/v1 Ingress, and every other arm above renders what its comment promises — so this is a test gap, not a defect.

Recommendation

Add helm-unittest suites under charts/prow-github-app/tests/ (the harness ct/helm unittest already run in CI, so no workflow change is needed):

  • ingress_test.yaml — disabled renders nothing; the documented /webhook Exact install renders one rule whose backend is the chart fullname on port name http and ingressClassName: nginx; a path without pathType gets Prefix; tls and annotations pass through.
  • wiring_test.yaml (serviceaccount / configmap / service / helpers) — service.yaml names its port http (the ingress contract) and selects the selector labels; serviceAccount.create: false renders no ServiceAccount and the pod uses default (or serviceAccount.name when set); serviceAccount.annotations pass through; github.apiUrl adds GITHUB_API_URL and empty omits it; prow.dryRun: true renders "true"; extraEnv entries land in the container env; empty image.tag resolves to Chart.AppVersion; fullnameOverride names every resource.

Each case should fail when its template arm is removed (verified by editing the template and re-running helm unittest).

Priority

  • Impact: high for the ingress (webhook entry point, covered by neither suite — coverage-gap priority 1); medium for the remaining arms (reached end to end with defaults only — priority 2)
  • Effort: low

Filed by quality agent (hold-gated mode)


🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: db0322e

— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88

主要语言
TypeScript
星标
132
派生
24
平均合并
1 天 12 小时
30 天内合并 PR
229

环境准备

从这里开始

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

cncf/prow-github-actions 的其他 Issue

查看 cncf/prow-github-actions 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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