chore(rest-api): Migrate Tenant and Fabric DAOs to use param structs#2308
Conversation
7946eae to
0447072
Compare
🔐 TruffleHog Secret Scan✅ No secrets or credentials found! Your code has been scanned for 700+ types of secrets and credentials. All clear! 🎉 🕐 Last updated: 2026-06-08 18:16:47 UTC | Commit: 0447072 |
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
0447072 to
adc2ff0
Compare
🔍 Container Scan Summary
Per-CVE detail lives in the per-service |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
🌿 Preview your docs: https://nvidia-preview-pull-request-2308.docs.buildwithfern.com/infra-controller |
thossain-nv
left a comment
There was a problem hiding this comment.
Looks good @nvlitagaki Left 2 suggestions.
| @@ -96,11 +115,11 @@ type TenantDAO interface { | |||
| // | |||
| GetAllByOrg(ctx context.Context, tx *db.Tx, org string, includeRelations []string) ([]Tenant, error) | |||
There was a problem hiding this comment.
Should we convert this to a regular GetAll
There was a problem hiding this comment.
I think not, at least not unless we see the need to fetch all tenants across orgs. Elsewhere in our code, GetAll tends to refer to functions where parameters are optional, whereas functions that require a particular parameter tend to be GetAllByX -- see getAllByEntityID in statusdetail.go and getAllByOrg in infrastructureprovider.org
…#2309) ## Description Avoid enforcing REPO_ROOT at compile time so checks like clippy can run without requiring the environment variable during compilation. ## Type of Change - [ ] **Add** - New feature or capability - [ ] **Change** - Changes in existing functionality - [ ] **Fix** - Bug fixes - [ ] **Remove** - Removed features or deprecated functionality - [ ] **Internal** - Internal changes (refactoring, tests, docs, etc.) ## Related Issues (Optional) NVIDIA#2257 ## Breaking Changes - [ ] This PR contains breaking changes ## Testing - [ ] Unit tests added/updated - [ ] Integration tests added/updated - [ ] Manual testing performed - [x] No testing required (docs, internal refactor, etc.) ## Additional Notes Signed-off-by: Dmitry Porokh <dporokh@nvidia.com>
5166db8 to
c7c2e1c
Compare
| Name: userOrgDetails.Name, | ||
| DisplayName: &userOrgDetails.DisplayName, | ||
| Org: org, | ||
| OrgDisplayName: cutil.GetPtr(org), |
There was a problem hiding this comment.
This should be OrgDisplayName: &userOrgDetails.DisplayName,
Description
This refactor updates the tenant and fabric DAOs to use more convenient structs for parameters rather than accepting a ton of different params.
Type of Change
Related Issues (Optional)
Breaking Changes
Testing
Additional Notes