-
Notifications
You must be signed in to change notification settings - Fork 0
Development and Testing
- Go 1.24 or newer; CI tests Go 1.24.x and stable.
- GNU Make, Git, Docker Buildx, Helm, and golangci-lint for the corresponding gates.
- Optional local
promtoolandkubeconform; CI installs pinned versions.
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 additionally runs formatting/import checks, govulncheck, gosec, coverage at or above 79%, chart/dashboard/rule/docs tests, container smoke, and multi-architecture builds.
v1 adds versioned configuration, metrics, and HTTP contract fixtures, an 85% core-coverage floor, gitleaks, and a deterministic 20-target/20,000-series capacity test. For v1.0.0, the 24-hour stability run, sanitized real AWS least-privilege validation, and v0.3.0 upgrade/rollback exercise were explicitly deferred by the maintainer and are not reported as passed. Future results must be recorded without account IDs, costs, SQL, or credentials.
- Domain tests validate sorting, uniqueness, amount conservation, provider/basis identity, and immutable traversal.
- AWS adapter tests use fake endpoints for pagination, retry, cancellation, malformed results, and sensitive-data redaction.
- Scheduler/cache tests cover single-flight, target isolation, old-data retention, shutdown, and goroutine recovery.
- Golden metrics lock names, types, and fixed label order.
- Integration/E2E tests verify multiple targets, readiness, binary shutdown, and that
/metricsnever calls AWS. - Asset tests validate Helm, kubeconform, dashboard PromQL, rules, IAM, release configuration, and Wiki contracts.
Write a failing test before changing behavior. Keep interfaces narrow and defined in the consuming package. Do not introduce AWS SDK response types into domain packages or arbitrary labels into Prometheus descriptors.
Follow CONTRIBUTING.md, keep changes focused, explain operational risk, update docs for public contracts, and sign commits with the Developer Certificate of Origin:
git commit --signoff -m "docs: describe the change"Security reports use the private process in SECURITY.md, not public issues.
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。