add path field and optimize bulk record fetching#88
Conversation
✅ Deploy Preview for drs-server ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8dae9f7977
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if strings.TrimSpace(targetProfile) == "" { | ||
| targetProfile = cliauth.ResolvedProfile() |
There was a problem hiding this comment.
Avoid auto-filling target profile for basic-auth imports
Auto-populating targetProfile from cliauth.ResolvedProfile() causes targetAuthFromInputs to reject valid --target-basic-user/--target-basic-password runs with --target-profile cannot be combined... whenever a root profile is set (for example via SYFON_PROFILE), even though the user did not request profile auth. This is a functional regression in migrate import for local/basic-auth targets and blocks imports in common environments where profile defaults are configured.
Useful? React with 👍 / 👎.
…field in the backend
… providers would cause duplicate name issues in syfon
…s. Rip out authz cache
PR Summary:
feature/optimizeOverview
This branch is a broad optimization and cleanup pass across Syfon server runtime, generated API contracts, client/CLI behavior, storage and path handling, auth middleware, metrics, and reviewer-facing docs.
At a high level, the branch does five things at once:
The raw diff is large, but a meaningful part of the size comes from generated API output and large package splits rather than entirely new product behavior.
Main Themes
1) OpenAPI and generated API contract cleanup
The branch reorganizes
apigeninputs and outputs so generation is clearer and closer to how the runtime actually serves specs:apigen/openapiapigen/codegen.openapi-generatorartifacts and stale generated model packages are removedThis also adds the missing bucket-management generated surfaces for:
The bucket client config now uses
response-type-suffix: Respso schema model names can coexist withClientWithResponseswrapper names without producing invalid Go.2) Internal API refactor by responsibility
Several oversized runtime packages are split into smaller units:
internal/api/drsapiaccess.go,mutations.go,objects.go,registration.go,routes.gointernal/api/internaldrsinternal/api/metricsinternal/api/middlewareThis is largely maintainability work, but it changes enough routing and request handling code that reviewers should treat it as behavioral risk, not a mechanical move.
3) Auth and middleware semantics
The branch changes how Syfon reasons about authenticated access, especially in Gen3 mode:
This area matters because it affects who is allowed to read, mutate, and enumerate scoped resources, especially around organization/project behavior.
4) Storage, scope, and object-model improvements
A large part of the branch improves how Syfon handles project-scoped objects and their backing storage:
This is the main product-level behavior bucket for the branch.
5) Index and browsing performance work
The branch includes multiple changes aimed at large-project browsing and bulk record access:
Several supporting docs in this branch explain the intended behavior around:
/indexpage sizing6) Client and CLI restructuring
The client side is heavily reorganized:
client/confbecomesclient/configclient/syfonclientbecomesclient/servicesclient/xferbecomesclient/transferThis is not only a rename pass. The branch also adds or improves:
upload,download,list,rm,metrics, and related testsReviewers should expect both package-structure cleanup and end-user CLI behavior changes here.
7) Metrics surface changes
Metrics handling is significantly reworked:
This appears to be a shift away from one monolithic metrics route set toward narrower, composable metrics behaviors.
8) Documentation, deployment, and CI alignment
The branch also updates non-runtime surfaces so the new behavior is operable:
README.mdCONTRIBUTING.mdThis is important because the codegen and runtime changes would otherwise be difficult to operate or review correctly.
Biggest Reviewer Buckets
If someone is reviewing this PR end to end, the highest-value buckets are:
A) Runtime API behavior
Focus on:
internal/api/internaldrsinternal/api/drsapiinternal/api/middlewareinternal/api/metricsQuestions to ask:
B) Storage and object correctness
Focus on:
internal/coreinternal/db/postgresinternal/db/sqliteinternal/commonQuestions to ask:
{organization, project}?C) Client and CLI compatibility
Focus on:
client/servicesclient/transfercmd/*Questions to ask:
D) Generated contract drift
Focus on:
apigen/openapi/*apigen/codegen/*apigen/client/*apigen/server/*Questions to ask:
make gennow produce stable, compilable output?Suggested Reading Order
For a reviewer trying to get through the branch efficiently:
internal/api/internaldrsinternal/api/middlewareinternal/coreinternal/db/postgresandinternal/db/sqliteclient/services,client/transfer, andcmd/*apigenoutput last, after understanding the source OpenAPI and runtime intentTesting and Risk Notes
The branch carries risk in four areas:
Testing focus should include:
make gengo build .internal/api/internaldrsBottom Line
This is not one feature. It is a branch-wide optimization and reorganization pass that also ships real behavior changes in:
The right way to review it is by subsystem, with generated output treated as a consequence of the OpenAPI and runtime changes rather than as the main event.