Skip to content
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

Support for Trusty DB fields #3305

Merged

Conversation

andrewballantyne
Copy link
Member

@andrewballantyne andrewballantyne commented Oct 4, 2024

https://issues.redhat.com/browse/RHOAIENG-13084

Description

Refactored Trusty state as we are getting better status information.

Added DB modal. Screenshots below.

Screenshots

Screenshot 2024-10-07 at 1 08 29 PM
Screenshot 2024-10-07 at 1 14 30 PM
Screenshot 2024-10-07 at 1 14 40 PM
Screenshot 2024-10-07 at 12 51 24 PM

How Has This Been Tested?

  • Install Trusty in the DSC
    • trustyai:
        devFlags:
          manifests:
            - contextDir: config
              sourcePath: ''
              uri: https://api.github.com/repos/ruivieira/trustyai-service-operator/tarball/RHOAIENG-14041-db-status-dev
      
  • Make sure our flag is enabled (may need to use the ?devFeatureFlags param if you're on a cluster that is disabling trusty for RHOAI)

Deploy a DB & connect to it via the Trusty settings in the Project Settings tab.
Steps for mariadb: https://github.com/trustyai-explainability/reference/blob/main/db-connection/README.md

Test Impact

Modal & button state tests -- dropped old checkbox tests (component was removed)

Request review criteria:

Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has added tests or explained why testing cannot be added (unit or cypress tests for related changes)

If you have UI changes:

  • Included any necessary screenshots or gifs if it was a UI change.
  • Included tags to the UX team if it was a UI/UX change.

After the PR is posted & before it merges:

  • The developer has tested their solution on a cluster by using the image produced by the PR to main

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress This PR is in WIP state label Oct 4, 2024
@andrewballantyne andrewballantyne force-pushed the trusty-db-flow branch 4 times, most recently from 445a472 to 3977117 Compare October 4, 2024 18:38
Copy link
Member Author

@andrewballantyne andrewballantyne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Contextual review comments

frontend/src/concepts/trustyai/utils.ts Outdated Show resolved Hide resolved
@Gkrumbach07
Copy link
Member

Gkrumbach07 commented Oct 8, 2024

Ok I looked over the code and other than what i commented it looks alright. Going to test it live

update: tested live and it is looking good.

@andrewballantyne andrewballantyne changed the title [WIP] Support for Trusty DB fields Support for Trusty DB fields Oct 11, 2024
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress This PR is in WIP state label Oct 11, 2024
Copy link
Member

@Gkrumbach07 Gkrumbach07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code looks good and works on cluster live. a few things to follow up on after

  • if the secret is valid then it will recheck on blur even if no text change
  • you are allowed to submit a secret name such as "my-secret ". input says its valid but trusty may or may not think so?
    /lgtm

Copy link
Contributor

openshift-ci bot commented Oct 11, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Gkrumbach07

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

codecov bot commented Oct 11, 2024

Codecov Report

Attention: Patch coverage is 78.15700% with 64 lines in your changes missing coverage. Please review.

Project coverage is 84.81%. Comparing base (c4e2940) to head (5acc212).
Report is 21 commits behind head on main.

Files with missing lines Patch % Lines
frontend/src/concepts/trustyai/utils.ts 60.60% 13 Missing ⚠️
...ncepts/trustyai/content/useTrustyBrowserStorage.ts 52.63% 9 Missing ⚠️
...pts/trustyai/content/useTrustyInstallModalData.tsx 84.61% 8 Missing ⚠️
...ntend/src/concepts/trustyai/useManageTrustyAICR.ts 63.63% 8 Missing ⚠️
...c/concepts/trustyai/content/InstallTrustyModal.tsx 78.78% 7 Missing ⚠️
...concepts/trustyai/content/TrustyDBSecretFields.tsx 22.22% 7 Missing ⚠️
...src/concepts/trustyai/content/useTrustyCRState.tsx 80.64% 6 Missing ⚠️
...s/trustyai/content/TrustyDBExistingSecretField.tsx 87.09% 4 Missing ⚠️
frontend/src/concepts/k8s/utils.ts 66.66% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3305      +/-   ##
==========================================
+ Coverage   84.74%   84.81%   +0.06%     
==========================================
  Files        1308     1315       +7     
  Lines       29242    29517     +275     
  Branches     7936     8060     +124     
==========================================
+ Hits        24781    25034     +253     
- Misses       4461     4483      +22     
Files with missing lines Coverage Δ
frontend/src/api/trustyai/k8s.ts 100.00% <ø> (ø)
...rontend/src/components/FieldGroupHelpLabelIcon.tsx 100.00% <100.00%> (ø)
...src/concepts/k8s/ResourceNameDefinitionTooltip.tsx 100.00% <100.00%> (ø)
frontend/src/concepts/trustyai/const.ts 100.00% <100.00%> (ø)
...ai/content/statusStates/TrustyAIInstalledState.tsx 100.00% <100.00%> (ø)
.../content/statusStates/TrustyAIUninstalledState.tsx 100.00% <100.00%> (ø)
.../src/concepts/trustyai/context/TrustyAIContext.tsx 100.00% <100.00%> (+4.34%) ⬆️
...oncepts/trustyai/context/useDoesTrustyAICRExist.ts 100.00% <100.00%> (ø)
.../src/concepts/trustyai/context/useModelBiasData.ts 100.00% <100.00%> (ø)
frontend/src/concepts/trustyai/types.ts 100.00% <100.00%> (ø)
... and 17 more

... and 98 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c4e2940...5acc212. Read the comment docs.

@openshift-merge-bot openshift-merge-bot bot merged commit 0c15247 into opendatahub-io:main Oct 11, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants