fix: CLI storage lifecycle set returns INTERNAL error#493
Conversation
The domain.LifecycleRule struct had TenantID added but the database schema and repository were never updated, causing INTERNAL errors when creating lifecycle rules. This adds: - Migration 109: adds tenant_id column to lifecycle_rules table - Repository: updates Create, Get, List, Delete, GetEnabledRules queries to include tenant_id - Tests: update mocks to match new query signatures
|
Warning Rate limit exceeded
To continue reviewing without waiting, purchase usage credits in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
tenant_idcolumn tolifecycle_rulestable via migration 109tenant_idRoot Cause
The
domain.LifecycleRulestruct hadTenantIDadded (commit79134609) but the database schema and repository INSERT were never updated, causing INTERNAL errors when creating lifecycle rules.Test plan
go test -v ./internal/repositories/postgres/... -run Lifecyclepassesgo build ./cmd/cloud/...succeeds