opendatahub-io / ai-edge

ODH integration with AI at the Edge usecases
Apache License 2.0
9 stars 18 forks source link

RHOAIENG-2758: Accept one or more target image tags as a param #211

Closed grdryn closed 6 months ago

grdryn commented 6 months ago

JIRA: https://issues.redhat.com/browse/RHOAIENG-2758

Description

Before this change, the image registry, image name, and image tag, were all hardcoded or generated by the pipeline, rather than customizable through parameters.

This change makes it possible to specify one or more targets as full image tag references.

Accepting more than just a single image tag target allows for both uniqueness and meaning. The simplest example scenario is where there's a primary tag that's unique, which has the model version and pipelinerun id; then a secondary tag with just the model version, which tracks the current blessed image for that model version. Quay (and possibly other registries) even has a UI feature for visualising that different tags actually point to the same manifest.

It's still possible to use other parameters to generate a name just like before, as demonstrated in the example PipelineRun files.

How has this been tested

Merge criteria:

openshift-ci[bot] commented 6 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
openshift-ci-robot commented 6 months ago

@grdryn: This pull request references RHOAIENG-2758 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/211): >JIRA: https://issues.redhat.com/browse/RHOAIENG-2758 > >Before this change, the image registry, image name, and image tag, were all hardcoded or generated by the pipeline, rather than customizable through parameters. > >This change makes it possible to specify one or more targets as full image tag references. > >Accepting more than just a single image tag target allows for both uniqueness and meaning. The simplest example scenario is where there's a primary tag that's unique, which has the model version and pipelinerun id; then a secondary tag with just the model version, which tracks the current blessed image for that model version. Quay (and possibly other registries) even has a UI feature for visualising that different tags actually point to the same manifest. > >It's still possible to use other parameters to generate a name just like before, as demonstrated in the example PipelineRun files. 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 6 months ago

@grdryn: This pull request references RHOAIENG-2758 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/211): >JIRA: https://issues.redhat.com/browse/RHOAIENG-2758 > >## Description >Before this change, the image registry, image name, and image tag, were all hardcoded or generated by the pipeline, rather than customizable through parameters. > >This change makes it possible to specify one or more targets as full image tag references. > >Accepting more than just a single image tag target allows for both uniqueness and meaning. The simplest example scenario is where there's a primary tag that's unique, which has the model version and pipelinerun id; then a secondary tag with just the model version, which tracks the current blessed image for that model version. Quay (and possibly other registries) even has a UI feature for visualising that different tags actually point to the same manifest. > >It's still possible to use other parameters to generate a name just like before, as demonstrated in the example PipelineRun files. > >## How has this been tested >- Pipelines run manually, using both example PipelineRuns >- `make go-test` passes > >## 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.
grdryn commented 6 months ago

/retest

grdryn commented 6 months ago

/retest

openshift-ci-robot commented 6 months ago

@grdryn: This pull request references RHOAIENG-2758 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/211): >JIRA: https://issues.redhat.com/browse/RHOAIENG-2758 > >## Description >Before this change, the image registry, image name, and image tag, were all hardcoded or generated by the pipeline, rather than customizable through parameters. > >This change makes it possible to specify one or more targets as full image tag references. > >Accepting more than just a single image tag target allows for both uniqueness and meaning. The simplest example scenario is where there's a primary tag that's unique, which has the model version and pipelinerun id; then a secondary tag with just the model version, which tracks the current blessed image for that model version. Quay (and possibly other registries) even has a UI feature for visualising that different tags actually point to the same manifest. > >It's still possible to use other parameters to generate a name just like before, as demonstrated in the example PipelineRun files. > >## How has this been tested >- Pipelines run manually, using both example PipelineRuns >- `make go-test` passes >- Verified that this works with the following image registries: > - [x] quay.io > - [x] docker.io > - [x] internal registry in OpenShift cluster > >## 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.
MarianMacik commented 6 months ago

/retest

jackdelahunt commented 6 months ago

Tested with make go-test, both pipelines passed :+1:

Passing the json to the make command is a bit weird though TARGET_IMAGE_TAGS_JSON='[\"quay.io/jackdelahunt/edgetesting:latest\"]'

grdryn commented 6 months ago

it'd be great if you can also update the pipelines/README with the new parameters and how to use it

I've added a line to the "Other parameters" section of that README now, thanks :+1:

grdryn commented 6 months ago

Passing the json to the make command is a bit weird though TARGET_IMAGE_TAGS_JSON='[\"quay.io/jackdelahunt/edgetesting:latest\"]'

@jackdelahunt how would you feel if I dropped that parameter altogether, and just forced in the test to push to the internal registry like I mentioned in a comment? That would also mean the test setup wouldn't have to configure image registry credentials.

Edit: Also, I don't think you should need to escape the double quotes as you've got them in your comment :thinking: did you have to do that? I've got it in the local.vars.mk file, without escaping and it seems to work.

devguyio commented 6 months ago

/lgtm