-
Notifications
You must be signed in to change notification settings - Fork 7
Config refactor split files #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Config refactor split files #27
Conversation
Add viper for configuration management and other required dependencies. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add default config.yaml template and comprehensive documentation explaining the new configuration system. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add specialized config structs for different commands: - app.go: Application-level config - migrate_config.go: Migration command config - serve_config.go: Serve command config - Corresponding test files with comprehensive coverage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Refactor all config components to integrate with viper-based configuration system: - config.go: Core config loading and validation - db.go: Database configuration - health_check.go: Health check configuration - metrics.go: Metrics configuration - ocm.go: OCM configuration - server.go: Server configuration - config_test.go: Updated tests for new system 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add HTTP handlers to expose configuration via API endpoint for runtime inspection and debugging. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Refactor environment framework to integrate with the new viper-based configuration system. Simplify environment-specific configurations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Update migrate and serve commands to use the new configuration framework with command-specific config structs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Update API, healthcheck, and metrics servers to use the new configuration system. Add config endpoint to routes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Update test helpers to work with new config system and fix integration tests to use updated configuration. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Update build and test targets to support the new configuration system and testing requirements. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Comment |
Config Refactor based on proposed standard
This PR refactors the configuration system to use https://github.com/spf13/viper for more flexible and maintainable configuration management.
What Changed
How to Review This PR
The commits are organized in a logical sequence to make reviewing easier. Review them in order:
1️⃣ Dependencies (Commit 1)
Files: go.mod, go.sum
Focus: Verify viper and related dependencies are appropriate
2️⃣ Documentation & Template (Commit 2)
Files: configs/config.yaml, docs/config.md
Focus:
3️⃣ New Config Components (Commit 3)
Files: pkg/config/app.go, pkg/config/migrate_config.go, pkg/config/serve_config.go, tests
Focus:
4️⃣ Core Config Refactor (Commit 4)
Files: pkg/config/*.go
Focus:
5️⃣ Config Handlers (Commit 5)
Files: pkg/handlers/config.go, pkg/handlers/config_test.go
Focus:
6️⃣ Environment Framework (Commit 6)
Files: cmd/hyperfleet-api/environments/*.go
Focus:
7️⃣ Command Updates (Commit 7)
Files: cmd/hyperfleet-api/migrate/cmd.go, cmd/hyperfleet-api/servecmd/cmd.go
Focus:
8️⃣ Server Components (Commit 8)
Files: cmd/hyperfleet-api/server/*.go
Focus:
9️⃣ Test Updates (Commit 9)
Files: test/helper.go, test/integration/*.go
Focus:
🔟 Build System (Commit 10)
Files: Makefile
Focus:
Testing Checklist
Acceptance Criteria