opendatahub-io / ai-edge

ODH integration with AI at the Edge usecases
Apache License 2.0
8 stars 17 forks source link

RHOAIENG-3459: Implement images cmd #235

Closed devguyio closed 3 months ago

devguyio commented 5 months ago

[!WARNING] This PR is stacked on top of #234 by adding one extra commit. Please review #234 first and focus the review here on the last commit only.

Description

Add an images command to list & build model images.

This PR implement following odh subcommands:

How Has This Been Tested?

cd cli
make cli-build
./odh images

2024-04-22_15-05

./odh images update -i <model-id> -v <version-name>

2024-04-29_20-31

./odh images build -i <model-id> -v <version-name>

2024-04-29_20-40

Merge criteria:

openshift-ci-robot commented 5 months ago

@devguyio: This pull request references RHOAIENG-3459 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set.

In response to [this](https://github.com/opendatahub-io/ai-edge/pull/235): > >>[!WARNING] >> This PR is stacked on top of #234 by adding one extra commit. >> Please review #234 first and focus the review here on the last commit only. > >## Description > >Add an images command to list & build model images. > >This PR implement following odh subcommands: > >- images: Lists model images from the model registry. >- images sync: Synchronize an edge model image information with the model registry. >- images build: Creates a new pipelinerun using the build params synced and stored in the model registry. > >## How Has This Been Tested? > > > >```shell >cd cli >make cli-build >./odh images >``` >![image](https://github.com/opendatahub-io/ai-edge/assets/1930204/10b02167-ef03-4b9b-9388-4c87b6c2544a) > >```shell >./odh images sync >``` >![image](https://github.com/opendatahub-io/ai-edge/assets/1930204/cecede76-bab8-4b9e-b76a-75ac6686835f) > >```shell >./odh images build >``` >![image](https://github.com/opendatahub-io/ai-edge/assets/1930204/f615e974-0d19-4d04-b0d6-5447a4905b8e) > > >## Merge criteria: > > > >- [ ] The commits are squashed in a cohesive manner and have meaningful messages. >- [ ] 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 > Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=opendatahub-io%2Fai-edge). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
openshift-ci-robot commented 5 months ago

@devguyio: This pull request references RHOAIENG-3459 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set.

In response to [this](https://github.com/opendatahub-io/ai-edge/pull/235): > >>[!WARNING] >> This PR is stacked on top of #234 by adding one extra commit. >> Please review #234 first and focus the review here on the last commit only. > >## Description > >Add an images command to list & build model images. > >This PR implement following odh subcommands: > >- images: Lists model images from the model registry. >- images sync: Synchronize an edge model image information with the model registry. >- images build: Creates a new pipelinerun using the build params synced and stored in the model registry. > >## How Has This Been Tested? > > > >```shell >cd cli >make cli-build >./odh images >``` >![image](https://github.com/opendatahub-io/ai-edge/assets/1930204/10b02167-ef03-4b9b-9388-4c87b6c2544a) > >```shell >./odh images sync >``` >![image](https://github.com/opendatahub-io/ai-edge/assets/1930204/cecede76-bab8-4b9e-b76a-75ac6686835f) > >```shell >./odh images build >``` >![image](https://github.com/opendatahub-io/ai-edge/assets/1930204/f615e974-0d19-4d04-b0d6-5447a4905b8e) > > >## Merge criteria: > > > >- [x] The commits are squashed in a cohesive manner and have meaningful messages. >- [ ] 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 > Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=opendatahub-io%2Fai-edge). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
openshift-ci-robot commented 5 months ago

@devguyio: This pull request references RHOAIENG-3459 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set.

In response to [this](https://github.com/opendatahub-io/ai-edge/pull/235): > >>[!WARNING] >> This PR is stacked on top of #234 by adding one extra commit. >> Please review #234 first and focus the review here on the last commit only. > >## Description > >Add an images command to list & build model images. > >This PR implement following odh subcommands: > >- images: Lists model images from the model registry. >- images sync: Synchronize an edge model image information with the model registry. >- images build: Creates a new pipelinerun using the build params synced and stored in the model registry. > >## How Has This Been Tested? > > > >```shell >cd cli >make cli-build >./odh images >``` >![image](https://github.com/opendatahub-io/ai-edge/assets/1930204/10b02167-ef03-4b9b-9388-4c87b6c2544a) > >```shell >./odh images sync >``` >![image](https://github.com/opendatahub-io/ai-edge/assets/1930204/cecede76-bab8-4b9e-b76a-75ac6686835f) > >```shell >./odh images build >``` >![image](https://github.com/opendatahub-io/ai-edge/assets/1930204/f615e974-0d19-4d04-b0d6-5447a4905b8e) > > >## Merge criteria: > > > >- [x] The commits are squashed in a cohesive manner and have meaningful messages. >- [x] Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious). >- [x] The developer has manually tested the changes and verified that the changes work > Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=opendatahub-io%2Fai-edge). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
devguyio commented 5 months ago

/cc @biswassri

grdryn commented 4 months ago

/remove-approve

(new process)

Sara4994 commented 4 months ago

@devguyio also, can we include instructions about models sync and images list commands in docs here

devguyio commented 4 months ago

@Sara4994 @MarianMacik

I've updated the documentation also the PR description with the new commands' syntax. I also updated the screenshot.

openshift-ci-robot commented 4 months ago

@devguyio: This pull request references RHOAIENG-3459 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set.

In response to [this](https://github.com/opendatahub-io/ai-edge/pull/235): > >>[!WARNING] >> This PR is stacked on top of #234 by adding one extra commit. >> Please review #234 first and focus the review here on the last commit only. > >## Description > >Add an images command to list & build model images. > >This PR implement following odh subcommands: > >- images: Lists model images from the model registry. >- images update: Updates the version image build parameters >- images build: Creates a new pipelinerun using the build params synced and stored in the model registry. > >## How Has This Been Tested? > > > >```shell >cd cli >make cli-build >./odh images >``` >![2024-04-22_15-05](https://github.com/opendatahub-io/ai-edge/assets/1930204/5e02cb06-d452-4524-bf12-86445657b9de) > >```shell >./odh images update -i -v >``` >![2024-04-22_23-47](https://github.com/opendatahub-io/ai-edge/assets/1930204/fe5aab84-fee3-4eba-83a1-7dc53833c0ba) > >```shell >./odh images build -i -v >``` >![2024-04-22_23-54](https://github.com/opendatahub-io/ai-edge/assets/1930204/93c79c32-f014-41b1-9545-0e18fe4a7929) > >## Merge criteria: > > > >- [x] The commits are squashed in a cohesive manner and have meaningful messages. >- [x] Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious). >- [x] The developer has manually tested the changes and verified that the changes work > Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=opendatahub-io%2Fai-edge). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
Sara4994 commented 3 months ago

Tested images and its subcommands locally along with Model-registry, they are working as expected. Will wait until the comments here are taken care of, before approving.

Sara4994 commented 3 months ago

@devguyio any update on this PR?

devguyio commented 3 months ago

Just repeating this to not get it lost. This shouldn't be needed I think. If there are no versions, the next range will be noop, right?

@MarianMacik yes, nice catch! Fixed. I also addressed all your other comments.

devguyio commented 3 months ago

@Sara4994 @MarianMacik @grdryn I've addressed all the comments.

openshift-ci-robot commented 3 months ago

@devguyio: This pull request references RHOAIENG-3459 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set.

In response to [this](https://github.com/opendatahub-io/ai-edge/pull/235): > >>[!WARNING] >> This PR is stacked on top of #234 by adding one extra commit. >> Please review #234 first and focus the review here on the last commit only. > >## Description > >Add an images command to list & build model images. > >This PR implement following odh subcommands: > >- images: Lists model images from the model registry. >- images update: Updates the version image build parameters >- images build: Creates a new pipelinerun using the build params synced and stored in the model registry. > >## How Has This Been Tested? > > > >```shell >cd cli >make cli-build >./odh images >``` >![2024-04-22_15-05](https://github.com/opendatahub-io/ai-edge/assets/1930204/5e02cb06-d452-4524-bf12-86445657b9de) > >```shell >./odh images update -i -v >``` >![2024-04-29_20-31](https://github.com/opendatahub-io/ai-edge/assets/1930204/f7d0bb51-df37-47be-9c9d-f1affc6c0899) > >```shell >./odh images build -i -v >``` >![2024-04-29_20-31_1](https://github.com/opendatahub-io/ai-edge/assets/1930204/51fe75e9-dab3-4814-ae0a-925dd2ce2c53) > >## Merge criteria: > > > >- [x] The commits are squashed in a cohesive manner and have meaningful messages. >- [x] Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious). >- [x] The developer has manually tested the changes and verified that the changes work > Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=opendatahub-io%2Fai-edge). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
devguyio commented 3 months ago

@Sara4994 @MarianMacik @grdryn I've addressed all the comments.

I've also updated the screenshots in the PR description.

openshift-ci-robot commented 3 months ago

@devguyio: This pull request references RHOAIENG-3459 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set.

In response to [this](https://github.com/opendatahub-io/ai-edge/pull/235): > >>[!WARNING] >> This PR is stacked on top of #234 by adding one extra commit. >> Please review #234 first and focus the review here on the last commit only. > >## Description > >Add an images command to list & build model images. > >This PR implement following odh subcommands: > >- images: Lists model images from the model registry. >- images update: Updates the version image build parameters >- images build: Creates a new pipelinerun using the build params synced and stored in the model registry. > >## How Has This Been Tested? > > > >```shell >cd cli >make cli-build >./odh images >``` >![2024-04-22_15-05](https://github.com/opendatahub-io/ai-edge/assets/1930204/5e02cb06-d452-4524-bf12-86445657b9de) > >```shell >./odh images update -i -v >``` >![2024-04-29_20-31](https://github.com/opendatahub-io/ai-edge/assets/1930204/f7d0bb51-df37-47be-9c9d-f1affc6c0899) > >```shell >./odh images build -i -v >``` >![2024-04-29_20-40](https://github.com/opendatahub-io/ai-edge/assets/1930204/69da8226-4667-4526-acdb-0f05440ca205) > >## Merge criteria: > > > >- [x] The commits are squashed in a cohesive manner and have meaningful messages. >- [x] Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious). >- [x] The developer has manually tested the changes and verified that the changes work > Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=opendatahub-io%2Fai-edge). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
devguyio commented 3 months ago

Looks good, I will put lgtm once the addDirWorkspace is removed as it is not needed.

Removed

Sara4994 commented 3 months ago

/lgtm

devguyio commented 3 months ago

/lgtm with some questions/comments inline

@grdryn comments addressed. You can view the changes here

openshift-ci[bot] commented 3 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: grdryn

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: - ~~[OWNERS](https://github.com/opendatahub-io/ai-edge/blob/main/OWNERS)~~ [grdryn] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment