-
Notifications
You must be signed in to change notification settings - Fork 0
Development and Testing zh CN
github-actions[bot] edited this page Jul 31, 2026
·
3 revisions
v1 增加版本化配置、指标与 HTTP Contract Fixture、85% 核心覆盖率门槛、gitleaks, 以及确定性的 20 个 target/20,000 Series 容量测试。v1.0.0 的 24 小时稳定性、 脱敏真实 AWS 最小权限验证和 v0.3.0 升级/回滚演练已由维护者明确延期,不能记为 通过。后续记录结果时不能包含 Account ID、成本、SQL 或凭证。
- Go 1.24 或更新版本;CI 测试 Go 1.24.x 和 stable。
- 对应门禁需要 GNU Make、Git、Docker Buildx、Helm、golangci-lint。
- 本地可选安装
promtool、kubeconform;CI 使用固定版本。
git clone https://github.com/Sakuya1998/aws-cost-exporter.git
cd aws-cost-exporter
go mod download
make buildgo test ./...
go test -race ./...
go vet ./...
golangci-lint runCI 还执行 formatting/import、govulncheck、gosec、不低于 79% 覆盖率、Chart/Dashboard/Rule/Docs 测试、容器 Smoke 和多架构构建。
- Domain:排序、唯一性、金额守恒、Provider/Basis 身份、immutable 遍历。
- AWS Adapter:Fake Endpoint 覆盖分页、retry、取消、异常结果和敏感信息脱敏。
- Scheduler/Cache:single-flight、target 隔离、旧数据保留、shutdown、goroutine 回收。
- Golden Metrics:锁定名称、类型和固定 Label 顺序。
- Integration/E2E:多 target、readiness、二进制关闭以及
/metrics不调用 AWS。 - Asset:Helm、kubeconform、Dashboard PromQL、Rules、IAM、Release 和 Wiki Contract。
修改行为前先写失败测试。接口保持窄并定义在消费方 Package。禁止让 AWS SDK Response 进入 Domain,禁止向 Prometheus Descriptor 加入任意 Label。
遵循 CONTRIBUTING.md,保持改动聚焦,解释运维风险,更新公开契约文档,并使用 Developer Certificate of Origin sign-off:
git commit --signoff -m "docs: describe the change"安全漏洞必须通过 SECURITY.md 的私有流程报告,不要提交公开 Issue。
AWS Cost Exporter current stable v1.0.0 · Source repository · Generated from docs/wiki on master; do not edit the published Wiki directly. / 当前稳定版 v1.0.0;文档由 master 分支的 docs/wiki 自动生成,请勿直接编辑已发布 Wiki。