Skip to content

Conversation

@rsun19
Copy link
Contributor

@rsun19 rsun19 commented Jul 14, 2025

Description

Ported https://github.com/opendatahub-io/odh-dashboard/blob/main/frontend/src/pages/modelRegistrySettings/__tests__/ModelRegistryTableRowStatus.spec.tsx and https://github.com/opendatahub-io/odh-dashboard/blob/main/frontend/src/pages/modelRegistry/screens/__tests__/utils.spec.ts from the midstream

How Has This Been Tested?

Unit tests passing

Merge criteria:

  • All the commits have been signed-off (To pass the DCO check)
  • The commits have meaningful messages
  • Automated tests are provided as part of the PR for major new functionalities; testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work.
  • Code changes follow the kubeflow contribution guidelines.
  • For first time contributors: Please reach out to the Reviewers to ensure all tests are being run, ensuring the label ok-to-test has been added to the PR.

If you have UI changes

  • The developer has added tests or explained why testing cannot be added.
  • Included any necessary screenshots or gifs if it was a UI change.
  • Verify that UI/UX changes conform the UX guidelines for Kubeflow.

Copy link
Member

@ederign ederign left a comment

Choose a reason for hiding this comment

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

@rsun19 thank you so much for the PR. On the PR description, can you please avoid using directly Red Hat issues on the description?

export const isRedHatRegistryUri = (uri: string): boolean => uri.startsWith('oci://example.io/'); // TODO: Change this to a proper check

export const isRedHatRegistryUri = (uri: string): boolean =>
uri.startsWith('oci://registry.redhat.io/');
Copy link
Member

Choose a reason for hiding this comment

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

Can we avoid hard code red hat here?

@lucferbux
Copy link
Contributor

/assign @lucferbux

@lucferbux
Copy link
Contributor

Everything looks great, @rsun19 once you fix that would be ready to go (remember not porting rhoai related code)

@rsun19
Copy link
Contributor Author

rsun19 commented Jul 15, 2025

Everything looks great, @rsun19 once you fix that would be ready to go (remember not porting rhoai related code)

@ederign @lucferbux Should I just remove the whole function then?

@lucferbux
Copy link
Contributor

Great question tbh, we can parametrize it, change it to "isCompanyUri" and the string for company can be an env variable, so we got a default upstream and then we can override it downstream with 'oci://registry.redhat.io/'

@rsun19 rsun19 force-pushed the port-unit-tests branch from f6f5b16 to 2aaf0fa Compare July 15, 2025 15:01
@rsun19
Copy link
Contributor Author

rsun19 commented Jul 15, 2025

I did something like const COMPANY_URI = process.env.COMPANY_URI || 'oci://kubeflow.io';, let me know if this works

Copy link
Contributor

@lucferbux lucferbux left a comment

Choose a reason for hiding this comment

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

/lgtm

@google-oss-prow google-oss-prow bot added the lgtm label Jul 18, 2025
rsun19 added 3 commits July 18, 2025 10:39
Signed-off-by: rsun19 <[email protected]>
Signed-off-by: rsun19 <[email protected]>
@rsun19 rsun19 force-pushed the port-unit-tests branch from 2aaf0fa to 7a9656a Compare July 18, 2025 14:39
@google-oss-prow google-oss-prow bot removed the lgtm label Jul 18, 2025
@lucferbux
Copy link
Contributor

/lgtm

@lucferbux
Copy link
Contributor

/approve

@google-oss-prow google-oss-prow bot added the lgtm label Jul 29, 2025
@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lucferbux

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@google-oss-prow google-oss-prow bot merged commit a81ed96 into kubeflow:main Jul 29, 2025
18 checks passed
Taj010 pushed a commit to Taj010/model-registry that referenced this pull request Aug 8, 2025
* added unit test files

Signed-off-by: rsun19 <[email protected]>

* fixed lint errors

Signed-off-by: rsun19 <[email protected]>

* updated uri function

Signed-off-by: rsun19 <[email protected]>

---------

Signed-off-by: rsun19 <[email protected]>
Signed-off-by: Taj010 <[email protected]>
Taj010 pushed a commit to Taj010/model-registry that referenced this pull request Aug 8, 2025
* added unit test files

Signed-off-by: rsun19 <[email protected]>

* fixed lint errors

Signed-off-by: rsun19 <[email protected]>

* updated uri function

Signed-off-by: rsun19 <[email protected]>

---------

Signed-off-by: rsun19 <[email protected]>
Signed-off-by: Taj010 <[email protected]>
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.

3 participants