OSAC-1532: Rename organizations table to tenants - #730
openshift-merge-bot[bot] merged 2 commits into
Conversation
|
@DakCrowder: This pull request references OSAC-1532 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Warning Review limit reached
More reviews will be available in 49 minutes and 43 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository: osac-project/coderabbit/.coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (2)
WalkthroughMigration 58 renames the ChangesRename organizations to tenants
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 10 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (10 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
No need for "down" files, we will never use them.
|
/retest |
Renames the organizations sql table to tenants and updates various references. Also allows for overriding the derived table name from .proto types to allow for exsting organizations golang code to reference the tenants table. This is a planned temporary change as the rename progresses as a part of OSAC-1532. Assisted-by: Claude Code
0412830 to
fb3eb58
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/database/migrations/58_rename_organizations_to_tenants_test.go`:
- Around line 24-33: The test cases in the It block are calling
tool.Migrate(ctx, 57) but should call tool.Migrate(ctx, 58) to properly run
migration 58 that renames the organizations table to tenants. Since the
BeforeEach already initializes the database at version 57, calling Migrate with
57 is a no-op and the actual migration never executes, causing the tenants table
insertion to fail. Update all instances of tool.Migrate(ctx, 57) to
tool.Migrate(ctx, 58) in all test cases within this test file (at lines 24, 36,
50, 64, and 84).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: e49c6c51-de98-4d3e-a871-dafe7c18c262
📒 Files selected for processing (16)
internal/database/dao/dao_immutability_test.gointernal/database/dao/generic_dao.gointernal/database/dao/generic_dao_events_test.gointernal/database/dao/generic_dao_immutability_test.gointernal/database/dao/generic_dao_integrity_test.gointernal/database/database_tool.gointernal/database/migrations/58_rename_organizations_to_tenants.up.sqlinternal/database/migrations/58_rename_organizations_to_tenants_test.gointernal/servers/generic_server.gointernal/servers/private_organizations_server.gointernal/servers/private_projects_server_test.gointernal/servers/private_public_ip_attachments_server_test.gointernal/servers/private_subnets_server_test.gointernal/servers/private_virtual_networks_server_test.gointernal/servers/projects_server_test.gointernal/servers/servers_tenancy_test.go
fb3eb58 to
a9883cf
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: DakCrowder, jhernand The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
44d236c
into
osac-project:main
Renames the organizations table to tenants.
The golang code is (largely) unmodified outside of an explicit SetTableName func added so that the current organizations code (such as the private server) can sit over the renamed tenants table. This functionality is viewed as temporary as a follow up PR will be put up with broader changes in the fulfillment-service to rename the services themselves from organizations to tenants.
The goal here is no net new behavior, and this change should be opaque to callers of the organizations apis/service.
Assisted-by: Claude Code
Summary by CodeRabbit
Refactor
Tests