-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add backend routes and frontend service for admin CRUD of ModelRegistries #2812
Add backend routes and frontend service for admin CRUD of ModelRegistries #2812
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just add the permissions and I think it would be ready to go
7a4fbab
to
64b56fc
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2812 +/- ##
==========================================
- Coverage 77.32% 77.23% -0.09%
==========================================
Files 1093 1094 +1
Lines 23026 23059 +33
Branches 5799 5799
==========================================
+ Hits 17805 17810 +5
- Misses 5221 5249 +28
... and 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
…ries Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu>
64b56fc
to
b5b8257
Compare
@lucferbux @gitdallas I updated this to add the DELETE route, if you don't mind re-reviewing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gitdallas, lucferbux The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Closes https://issues.redhat.com/browse/RHOAIENG-7058
Description
Adds the following admin-only backend API routes:
GET /api/modelRegistries
- lists ModelRegistriesPOST /api/modelRegistries
- creates a ModelRegistryGET /api/modelRegistries/:modelRegistryName
- gets a ModelRegistryPATCH /api/modelRegistries/:modelRegistryName
- updates a ModelRegistryDELETE /api/modelRegistries/:modelRegistryName
- deletes a ModelRegistryAnd adds the new
frontend/src/services/modelRegistryService.ts
with functions to call these routes using axios.Also adds a new constant
MODEL_REGISTRY_NAMESPACE
tobackend/src/utils/constants.ts
since there are some places where we were hard-coding the use of theodh-model-registries
namespace.How Has This Been Tested?
The admin page where this will be used does not exist yet (it is being created in #2810). I tested the two GET routes by inserting this temporary code into another existing page:
This worked as expected. I did not yet test the POST, PATCH or DELETE routes because I don't want to mess with what's currently set up on the shared cluster. Those will be tested as part of upcoming PRs to consume these routes, and any issues we find at that time can be addressed in those PRs.
Test Impact
No tests here currently. There are no existing tests for any of these backend routes or corresponding services. They are also a temporary workaround to be removed when we access these services via a passthrough API (per @lucferbux) so tests here would be removed soon anyway.
Request review criteria:
Self checklist (all need to be checked):
If you have UI changes:
After the PR is posted & before it merges:
main