-
Notifications
You must be signed in to change notification settings - Fork 178
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
Model Registry Settings: Add model registries table with db config viewer, delete action and stub for permission management modal #2829
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2829 +/- ##
==========================================
+ Coverage 78.16% 78.23% +0.06%
==========================================
Files 1101 1109 +8
Lines 23421 23531 +110
Branches 5902 5922 +20
==========================================
+ Hits 18307 18409 +102
- Misses 5114 5122 +8
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
@mturley Thanks for all the work! They look really great! Can you use a plain alert for the case when the password cannot load? Additionally, is it possible for the user to successfully fetch the password with another attempt? If so, it might be beneficial to add a retry button here, like my second screenshot. |
@yih-wang I'll change to a plain alert, thanks. I don't think it's possible to succeed on retry here, the only reason an error would happen when loading the password but not the rest of the registry info is if the data is malformed (e.g. the ModelRegistry object refers to a passwordSecret that doesn't exist), which can only happen if the user is manually messing around with the objects on the cluster and would not be fixed until they corrected that mistake. If there's a network issue or other reason for the failure, it would also affect the rest of the data on the page and they wouldn't reach this modal. |
9dd6b22
to
30a5b04
Compare
Pushed the change to switch to plain alert and updated the screenshot in the description. |
@lucferbux if you look at the Delete modal screenshots, am I correct in assuming that the default permission group shown in the message there (currently "TODO: group here") is something we can't fill in until we figure out RHOAIENG-6636 (RBAC story), or is that maybe known based on the registry name? |
/hold |
30a5b04
to
e55ded1
Compare
e55ded1
to
c817226
Compare
c817226
to
6820c58
Compare
6017907
to
30cc710
Compare
/unhold @lucferbux this is ready for review now, sorry for the delay on the cypress tests! |
/hold |
/unhold |
30cc710
to
2165cc9
Compare
2165cc9
to
d973ef8
Compare
Pushed changes to address some feedback after a Slack conversation with @gitdallas:
cc @yih-wang |
…ewer, delete action and stub for permission management modal Signed-off-by: Mike Turley <[email protected]>
d973ef8
to
fe007f1
Compare
// eslint-disable-next-line no-restricted-properties | ||
return Buffer.from(value || '').toString('base64'); | ||
}; | ||
const base64decode = (encodedValue?: string): string => |
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.
Mmmm yeah, great idea having the utility function, we've always encoded/decoded without having a declared function in the backend
}; | ||
|
||
const CreateModal: React.FC<CreateModalProps> = ({ isOpen, onClose }) => { | ||
const CreateModal: React.FC<CreateModalProps> = ({ isOpen, onClose, refresh }) => { |
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.
Mmmmm didn't comment this before, and it's not a bad addition cause in the admin panel we were using old not refactored forms, but we got useGenericObjectState
for creating objects and using them for forms.
We should refactor this modal in the near future with a custom hook that feeds from useGenericObjectState
@@ -88,7 +89,8 @@ const CreateModal: React.FC<CreateModalProps> = ({ isOpen, onClose }) => { | |||
}, | |||
}; | |||
try { | |||
await createModelRegistryBackend(data); | |||
await createModelRegistryBackend({ modelRegistry: data, databasePassword: password }); |
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.
Remind me of talking about the posibility of using descriptive names for model registries, we sholud have a display name option, but we should talk with ux first.
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 |
Code looks great, there are a few open questions that i wanna discuss with you @mturley so we can do follow ups, but so far, it can be merged! |
(feel free to resolve all comments once you read them so we can proceed merging the pr) |
Looks like the bot is happy to merge with unresolved conversations now 🤷 @lucferbux should we open followup issues for the 2 points you raised above (refactoring to use |
Closes RHOAIENG-6970
Closes RHOAIENG-2230 (followup to #2828)
Description
databasePassword
to the values passed when submitting the CreateModalNote: Does not include the Database Status column from the mockups, that is blocked by backend work and has been moved into a followup story.
cc @yih-wang
Table:
Kebab menu:
Password loading state:
Password loaded (clicking the eyeball shows it):
Password loading error state:
Delete modal:
Delete modal with name entered correctly:
How Has This Been Tested?
Tested viewing existing model registries that were created on the shared cluster for testing, including viewing database details. Tested the password loading error by creating a model registry referencing a nonexistent secret and trying to view its details. Tested the delete operation.
Test Impact
Cypress tests will be added in a separate PR, they'll conflict with tests @gitdallas has already started on
Request review criteria:
Self checklist (all need to be checked):
If you have UI changes:
After the PR is posted & before it merges:
main