feat: extract shared infrastructure into internal/platform layer#2644
feat: extract shared infrastructure into internal/platform layer#2644Al-Pragliola wants to merge 2 commits intokubeflow:mainfrom
Conversation
Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
|
fuzz tests result https://github.com/kubeflow/hub/actions/runs/25005001401 ✅ |
pboyd
left a comment
There was a problem hiding this comment.
Looks good in general.
Is it possible to clean up comments in another PR? It's hard to follow those changes across renames and they seem outside the focus of this PR.
There was a problem hiding this comment.
Can you restore the doc comments in this file? Some of them may not add much, but some of them do.
There was a problem hiding this comment.
These comments too. It's helpful to know what it's mapping.
There was a problem hiding this comment.
Most of the doc comments in this file seem to be restating the function name, but they weren't hurting anything either. Can we restore them?
| // validateStringParameter validates string parameters for unsafe characters | ||
| // Null bytes are not allowed in string parameters as they can cause database errors |
There was a problem hiding this comment.
This one seems useful because it's otherwise unclear what validation is being done.
Description
Introduces internal/platform/, a new package tree that separates reusable infrastructure from model-registry-specific internals, then migrates the model registry to use it.
Problem
The catalog (and any future registry) must import packages from the model registry's internal/ tree — internal/db/, internal/datastore/, internal/apiutils/, etc. These packages mix generic database infrastructure with model-registry-specific logic. This makes the model registry the platform itself rather than a consumer of it, and makes it impossible to add a new registry without depending on model-specific code.
What this does
Design constraint
The platform layer has zero imports from model-specific packages. No file in internal/platform/ references internal/core/, internal/db/models/, internal/converter/, internal/server/openapi/, or internal/defaults/.
How Has This Been Tested?
Merge criteria:
DCOcheck)ok-to-testhas been added to the PR.