Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5ae521a
feat(prometheus): add Savings Plan utilization query method
diranged Dec 8, 2025
f90bc8f
feat(config): add overlay management configuration
diranged Dec 8, 2025
5096416
docs(prometheus): clarify optional fields in SP structs
diranged Dec 8, 2025
5aa19c8
feat(overlay): implement overlay decision engine with comprehensive t…
diranged Dec 8, 2025
1b79d6c
feat(prometheus): use exported metric constants from Lumina 0.4.0
diranged Dec 8, 2025
ff1f10d
feat(overlay): Implement SP/RI aggregation to prevent duplicate overl…
diranged Dec 8, 2025
66cace5
fix(overlay): Fix floating point precision in aggregation tests
diranged Dec 8, 2025
a274f8e
chore(build): Add lint target and fix golangci-lint compatibility
diranged Dec 8, 2025
fea8066
feat(dev): Add local development support with config.local.yaml
diranged Dec 8, 2025
02c671f
docs: Add comprehensive DEVELOPMENT.md guide
diranged Dec 8, 2025
df4b09b
fix(build): Remove local Lumina replace directive for CI compatibility
diranged Dec 8, 2025
d7fd518
fix(lint): Fix golangci-lint issues for CI compatibility
diranged Dec 8, 2025
7377a2a
fix(lint): Fix remaining linting issues - line length and prealloc
diranged Dec 8, 2025
7d5c9b7
refactor(prometheus): Use hourly commitment metric directly from Lumina
diranged Dec 9, 2025
62fb288
fix(prometheus): Use consistent query time for both metrics
diranged Dec 9, 2025
eeaed8c
fix(prometheus): use commitment metric as primary source for SP queries
diranged Dec 9, 2025
7ef013b
feat(config): add AWS account ID and region configuration
diranged Dec 9, 2025
b389996
feat(overlay): add region-aware overlay naming and AWS scoping
diranged Dec 9, 2025
7fdb9b4
refactor(config): rename overlayManagement to overlays
diranged Dec 9, 2025
03d3a12
fix(tests): update tests for region-aware prometheus queries and over…
diranged Dec 15, 2025
6c53a2a
refactor(overlay): simplify utilization calculation to use capacity r…
diranged Dec 16, 2025
28716db
fix(prometheus): correctly filter Compute vs EC2 Instance Savings Plans
diranged Dec 16, 2025
f9a5387
refactor(prometheus): remove unused operating_system label and field
diranged Dec 16, 2025
214e9a7
style: fix line length violations for linter
diranged Dec 16, 2025
5ac4ab4
fix(e2e): add required AWS config fields to test ConfigMap
diranged Dec 16, 2025
00a27c9
docs(prometheus): clarify Client scoping applies only to region-speci…
diranged Dec 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ go.work
# Kubeconfig might contain secrets
*.kubeconfig

# Allow local config.yaml for testing
# Allow local config.yaml for testing (use config.local.yaml for development)
config.yaml

# Helm chart artifacts
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ linters:
- nakedret
- prealloc
- revive
- staticcheck
- unconvert
- unparam
- unused
# Note: staticcheck removed from enable list due to Go 1.24/golangci-lint v1.59 version incompatibility
settings:
revive:
rules:
Expand Down
29 changes: 11 additions & 18 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,19 @@ Before committing any code:

### 2. Code Coverage Requirements

**100% code coverage is mandatory** for all code in this repository.
**Strive for maximum code coverage** for all code in this repository.

Requirements:
- All packages must maintain 100% test coverage
- Use `// coverage:ignore` comments ONLY when 100% coverage is genuinely not reasonable
- Every `// coverage:ignore` must have a clear comment explaining why coverage is not possible
- CI/CD must fail if coverage drops below 100%
- All packages should aim for highest reasonable test coverage
- When adding new code, tests must be included in the same commit/PR
- Focus coverage on valuable, testable logic paths
- Don't obsess over covering unreachable defensive code

Valid reasons for `// coverage:ignore`:
- Pure data structures with no logic (e.g., type definitions)
- Unreachable error conditions in generated code
- Defensive programming checks that cannot be triggered in tests
- Platform-specific code that cannot be tested in CI environment

Invalid reasons:
- "Hard to test" - refactor the code to make it testable
- "Takes too long" - optimize the test or use appropriate mocking
- "Edge case" - edge cases must be tested
Coverage best practices:
- Test all normal execution paths
- Test error conditions that can realistically occur
- Test boundary conditions and edge cases
- Don't write tests solely to hit 100% coverage on unreachable defensive code

**Do NOT write tests for pure data structures**: Testing that struct field assignment works (e.g., `config.Field = "value"`) provides zero value. These types are covered through their usage in real tests.

Expand Down Expand Up @@ -116,7 +110,7 @@ If either the linter or tests fail:

Before submitting code for review:
- [ ] No Nextdoor-specific references or internal data
- [ ] 100% code coverage (or justified coverage:ignore comments)
- [ ] Comprehensive test coverage for new functionality
- [ ] Integration tests included for new functionality
- [ ] All tests pass locally
- [ ] Code follows Go best practices and project conventions
Expand All @@ -127,15 +121,14 @@ Before submitting code for review:

1. Write integration tests first (TDD approach encouraged)
2. Implement the feature with unit tests
3. Verify 100% coverage
3. Verify good test coverage
4. Run full test suite including integration tests
5. Check for any internal references that need to be genericized
6. Update documentation

## CI/CD Expectations

The CI pipeline must enforce:
- Code coverage at 100% (fail if below)
- All tests pass (unit + integration)
- Linting passes
- No hardcoded internal references (future enhancement)
Expand Down
Loading
Loading