feat: Integrate cleanup service into main server - #6
Merged
Conversation
- Add cleanup service registration to main server - Wire up cleanup dependencies (repository, location service) - Integrate authorization and audit middleware - Add health check for cleanup service - Configure AES-256 encryption for credentials - Register location service (dependency for cleanup) Integration includes: - CleanupService with full middleware chain - LocationService for S3 provider management - Authorization middleware for RBAC enforcement - Audit middleware for operation logging - Proper service health status registration Build verified: Server compiles successfully with all services
k8ika0s
added a commit
that referenced
this pull request
Jan 19, 2026
Implement comprehensive React components for storage cleanup feature: ## Components Created ### 1. CleanupDashboard (407 lines) - Main dashboard with 3 tabs: Scan & Cleanup, Jobs, Analytics - Scan configuration form with location, bucket, prefix selection - Scan type selector: orphaned uploads, corrupt objects, versions, empty objects - Conditional fields based on scan type (minAgeDays, keepVersions) - Dry-run mode toggle for safe preview - Break-glass mode indicator and validation - Integration with all child components ### 2. ScanResults (318 lines) - Displays scan results based on scan type - Orphaned uploads table: bucket, key, age, parts, size - Corrupt objects list: corruption type, error message, recoverability - Orphaned versions table: version IDs, latest flag, size - Empty objects simple table - Formatted bytes and relative dates - Severity indicators for corrupt objects ### 3. JobMonitor (268 lines) - Active job card with real-time statistics - Auto-refresh every 3 seconds for running jobs - Job history list with status icons and badges - Statistics: scanned, processed, failed, bytes freed - Cancel job functionality with confirmation - Dry-run and break-glass mode indicators - Click to set active job for detailed view ### 4. StorageAnalytics (346 lines) - Overview cards: total storage, bucket count, average object size - Bucket statistics table with size distribution - Object age distribution with visual progress bars - Largest objects table - Provider diagnostics: capabilities, recommendations, warnings - Performance metrics: latency, throughput, error rate, availability ## Type Updates - Updated OrphanedUpload: estimatedSizeBytes, storageClass, ageDays - Updated CorruptObject: size, lastModified, corruptionType, errorMessage, isRecoverable - Updated ObjectVersion: isDeleteMarker, ageDays - Added EmptyObject type: bucket, key, versionId, lastModified, ageDays - All types now match backend protobuf definitions exactly ## Features - Real-time job monitoring with auto-refresh - Comprehensive error handling and loading states - Responsive design with Tailwind CSS - Accessible UI with proper ARIA labels - Type-safe with TypeScript - Integration with Zustand store for state management Part of storage cleanup feature implementation. Related to #5, #6
k8ika0s
added a commit
that referenced
this pull request
Jan 19, 2026
Add Cleanup tab to AdminPage with the following changes: - Add 'cleanup' to AdminTab type union - Import CleanupDashboard component from cleanup module - Import Trash2 icon from lucide-react for tab icon - Fetch locations using React Query for cleanup dashboard - Add Cleanup tab to navigation with Trash2 icon - Render CleanupDashboard when cleanup tab is active - Pass locations array to CleanupDashboard component The Cleanup tab provides administrators with: - Storage scanning capabilities (orphaned uploads, corrupt objects, versions, empty objects) - Job monitoring with real-time updates - Storage analytics and provider diagnostics - Break-glass mode support for elevated access Part of storage cleanup feature implementation. Related to #5, #6
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Integrates the cleanup service into the main gRPC server, completing the server-side implementation.
Changes: 1 file, 33 lines added
Build: ✅ Compiles successfully
What's Included
Files Changed
backend/cmd/server/main.go:Testing
✅ Build verification:
go buildsuccessful✅ All imports resolve correctly
✅ Type safety verified
Configuration Notes
Next Steps
Checklist
Related: PR #5 (merged)