-
Epic
-
Resolution: Unresolved
-
Normal
-
None
-
Kessel Inventory Quality of Life Improvements
-
Product / Portfolio Work
-
False
-
-
False
-
Unset
-
In Progress
-
CRCPLAN-410 - Kessel | Developer Documentation Enhancements and Migration Guides
-
36% To Do, 0% In Progress, 64% Done
-
-
Summary and Goal
This epic focuses on improving the quality, maintainability, and developer experience of the Kessel Inventory service. The work encompasses code quality improvements, technical debt reduction, infrastructure modernization, and developer tooling enhancements to ensure the service is robust, maintainable, and follows best practices.
Original Slack thread with requirements
Scope
This epic addresses quality of life improvements across several key areas:
Code Quality & Testing (5 issues)
- Implement test coverage enforcement for PRs to maintain code quality standards
- Add GitHub actions to check test coverage thresholds for new code
- Block PRs with low patch coverage
- Create end-to-end tests for common inventory API
- Add goimports to inventory linters to enforce Go best practices for import ordering
Database & Infrastructure (4 issues)
- Create a robust database migration process to replace gorm automigrate with repeatable, versioned migrations with rollback capability (similar to OCM's approach)
- Upgrade inventory database to PostgreSQL 17
- Ensure inventory configurations enforce proper precedence
- Update Grafana dashboards to match Relations API
Technical Debt & Code Cleanup (6 issues)
- Delete legacy v1beta2 upsert implementation
- Remove all old persistence code and zookie code
- Remove persistence for k8sclusters and policy services, keeping only eventing contract
- Eliminate duplication between domain model and gorm model
- Cleanup consumer to make it purely an infrastructure concern by adding a ReplicationService
- Create an optional type for consistent handling of optional fields
API Improvements (2 issues)
- Return proper HTTP status codes for InventoryService handlers so clients can handle errors appropriately
- Support empty reporter representation data to allow service providers to send completely empty reporter objects
Build & Development Environment (4 issues)
- Use go-toolset in inventory dockerfiles instead of upstream go for better parity between testing and production environments
- Create integration environment for testing code changes that rely on production-like infrastructure (AWS MSK, RDS)
- Establish process, checks, and alerts to keep service versions updated
- Remove inventory disabled persistence flag
SpiceDB Management (1 issue)
- Improve SpiceDB/SpiceDB operator code syncing and update process to reduce risk and ensure following recommended upgrade paths
Acceptance Criteria
- All code quality and linting improvements are implemented and enforced in CI/CD pipeline
- Database migration process is established with documentation and repeatable procedures
- Legacy code and technical debt identified in child issues are removed
- API returns appropriate HTTP status codes for all error conditions
- Build and development environments use standardized tooling (go-toolset)
- SpiceDB update process is documented and follows best practices
- Test coverage is maintained or improved across all changes
Business Value
These improvements will:
- Reduce operational risk through better database migration processes
- Improve developer velocity by removing technical debt and simplifying codebase
- Enhance service reliability through better error handling and status codes
- Increase code quality and maintainability through enforced testing standards
- Reduce time between upstream syncs and updates, minimizing risk of breaking changes
- Provide better parity between testing and production environments
Open Questions
- Priority and sequencing of technical debt removal - which items should be tackled first?
- Target test coverage percentage for PR blocking
- Timeline for PostgreSQL 17 upgrade in production environments