Allow using imageName as a selector#6768
Allow using imageName as a selector#6768openshift-merge-robot merged 11 commits intoredhat-developer:mainfrom
imageName as a selector#6768Conversation
|
Skipping CI for Draft Pull Request. |
✅ Deploy Preview for odo-docusaurus-preview ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
3728d7d to
087f3c3
Compare
0b63226 to
aebee2d
Compare
b0f98a9 to
928dc86
Compare
928dc86 to
ef35008
Compare
ef35008 to
b88c24d
Compare
Co-authored-by: Philippe Martin <[email protected]>
| By("creating a different Devfile", func() { | ||
| b, err := os.ReadFile(filepath.Join(commonVar.Context, "devfile.yaml")) | ||
| Expect(err).To(BeNil()) | ||
| devfileContent := string(b) | ||
| Expect(devfileContent).ShouldNot(BeEquivalentTo(originalDevfileContent)) | ||
| }) |
There was a problem hiding this comment.
Is it what we want? We are changing the behaviour, as odo init was copying the child devfile as is before
There was a problem hiding this comment.
Whoops - I missed your comments..
Indeed, previously, the child Devfile was copied as is. Then it was parsed by odo init to set user-defined fields like the component name. The test here was previously asserting that the resulting Devfile had the same fields as the original one.
But now, with the new changes in the Devfile library, this Devfile can no longer be parsed. My initial goal was to make odo init always return an effective Devfile as a result. But with your comments, I agree this is a change in behavior and can be discussed and considered separately.
I'll revert the changes done here and report the parsing issue to the Devfile library.
There was a problem hiding this comment.
Issue reported in devfile/api#1119, and changes done in 3603642 (#6768)
This reverts commit 78868b0. Co-authored-by: Philippe Martin <[email protected]>
This would change the behavior of `odo init`. Furthermore, due to an issue [1] in the Devfile library, it is not possible to parse some Devfiles with parents linked as GitHub URLs (like GitHub release artifacts). [1] devfile/api#1119 Co-authored-by: Philippe Martin <[email protected]>
|
Kudos, SonarCloud Quality Gate passed!
|
Flaky E2E test (#6582) /override OpenShift-Integration-tests/OpenShift-Integration-tests |
|
@rm3l: Overrode contexts on behalf of rm3l: OpenShift-Integration-tests/OpenShift-Integration-tests DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Same issue with interactive tests, as reported in #6812. Overriding because the previous run passed, and there is an ongoing PR (#6830) for this specific issue. /override OpenShift-Integration-tests/OpenShift-Unauth-Integration-tests |
|
@rm3l: Overrode contexts on behalf of rm3l: OpenShift-Integration-tests/OpenShift-Unauth-Integration-tests DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Network issues in 3 out of 4 failures. The other one was about Persistent Volumes not being bound in a timely manner: Overriding because all those tests passed in the previous run (with the same changes). /override windows-integration-test/Windows-test |
|
@rm3l: Overrode contexts on behalf of rm3l: windows-integration-test/Windows-test DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |








What type of PR is this:
/kind feature
/area devfile-spec
What does this PR do / why we need it:
This PR allows handling
imageNamefield onImagecomponents as a selector. This means that, for each Image component with a relative image name,odowill automatically build and push a fully qualified image (using a user-defined registry and a generated image tag), and will replace any matching image names found in anyContainerorKubernetes/OpenShiftcomponents.See devfile/api#985 (comment) for more context and details.
For this to work however, this PR exposes a new
ImageRegistrypreference, which users need to set first. And, for Kubernetes/OpenShift components, replacement is done for matching image names found in core Kubernetes resources (like Pods, Deployments, DaemonSets, ...).Which issue(s) this PR fixes:
Fixes #6677
PR acceptance criteria:
Unit test
Integration test
Documentation
How to test changes / Special notes to the reviewer:
odo preference set ImageRegistry "quay.io/$USER"odowill treat all relative image names in Devfile Image components as selectors, i.e.:See devfile/api#985 (comment) for examples of how image names are matched against selectors.
Note that this behavior applies to both
odo devandodo deploy, and should work the same way on both Podman and cluster.