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

Py: Fix misleading errors on missing list results #65

Merged
merged 2 commits into from
Apr 16, 2024

Conversation

isinyaaa
Copy link
Contributor

Description

Addresses opendatahub-io/model-registry-bf4-kf#169.

How Has This Been Tested?

Merge criteria:

  • The commits and have meaningful messages; the author will squash them after approval or will ask to merge with squash.
  • 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

Copy link
Member

@tarilabs tarilabs left a comment

Choose a reason for hiding this comment

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

I understand tests demonstrate get_artifacts/contexts methods now will return empty list instead of an error when registry is empty. An error TypeNotFoundException explicitly when the type definition is missing (ie: registry with no types initialized)

thank you @isinyaaa

/lgtm
/approve

Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: isinyaaa, tarilabs

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

@google-oss-prow google-oss-prow bot merged commit 65613f9 into kubeflow:main Apr 16, 2024
9 checks passed
@isinyaaa isinyaaa deleted the list-error branch April 16, 2024 14:31
openshift-merge-bot bot referenced this pull request in opendatahub-io/model-registry Apr 17, 2024
* Py: Fix misleading errors on missing list results (#65)

* py: fix type annotations to return concrete types

Signed-off-by: Isabella Basso do Amaral <[email protected]>

* py: fix missing type check on empty list results

Signed-off-by: Isabella Basso do Amaral <[email protected]>

---------

Signed-off-by: Isabella Basso do Amaral <[email protected]>

* fix: OpenAPI ModelVersion shall contain registeredModelId property (#61)

need to adapt property definition in OpenAPI
to accomodate openapi-codegen result;
according to contract (as also visible in swagger)
the ModelVersion is to contain property: registeredModelId

Signed-off-by: Matteo Mortari <[email protected]>

---------

Signed-off-by: Isabella Basso do Amaral <[email protected]>
Signed-off-by: Matteo Mortari <[email protected]>
Co-authored-by: Isabella Basso <[email protected]>
Co-authored-by: Matteo Mortari <[email protected]>
tarilabs pushed a commit to tarilabs/model-registry that referenced this pull request Jun 19, 2024
[pull] main from kubeflow:main
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