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

fix: OpenAPI ModelVersion shall contain registeredModelId property #61

Merged

Conversation

tarilabs
Copy link
Member

need to adapt property definition in OpenAPI
to accomodate openapi-codegen result;
according to contract (as also visible in swagger)
Screenshot 2024-04-12 at 12 43 02

the ModelVersion is to contain property: registeredModelId

Description

  • change OpenAPI definition to a variant which accomodates the intended openapi-codegen result we need
  • implement goverter functions
  • new unit test functions
  • extend integration test
  • extend E2E test (robotframework)

How Has This Been Tested?

  • make test
  • robot test/robot/UserStory.robot

Merge criteria:

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

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]>
Copy link
Member

@lampajr lampajr left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @tarilabs

@@ -22,7 +22,7 @@ type OpenAPIConverter interface {
// goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch
ConvertModelVersionCreate(source *openapi.ModelVersionCreate) (*openapi.ModelVersion, error)

// goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Name
// goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Name RegisteredModelId
Copy link
Member

Choose a reason for hiding this comment

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

good catch 😃

Copy link
Member Author

Choose a reason for hiding this comment

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

🙏

Copy link
Member

Choose a reason for hiding this comment

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

Don't know exactly why we have these changes in this PR as nothing should have changed, but I tried locally as well and they are generated as is.
Moreover I don't even think they are called somewhere.

Copy link
Member Author

Choose a reason for hiding this comment

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

I believe is something different than file scanning order, I never figured out as I guess it's something internal to the openapi-codegen 🤷

Copy link
Member

Choose a reason for hiding this comment

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

yeah, the usual issue. Good for me 👍

Copy link
Contributor

@rareddy rareddy left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lampajr, rareddy, 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 734eb9e into kubeflow:main Apr 16, 2024
10 checks passed
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]>
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