-
Notifications
You must be signed in to change notification settings - Fork 244
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
Allow using imageName
as a selector
#6768
Allow using imageName
as a selector
#6768
Conversation
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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! 0 Bugs No Coverage information |
Flaky E2E test (#6582) /override OpenShift-Integration-tests/OpenShift-Integration-tests |
@rm3l: Overrode contexts on behalf of rm3l: OpenShift-Integration-tests/OpenShift-Integration-tests In 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 In 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 In 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
imageName
field onImage
components as a selector. This means that, for each Image component with a relative image name,odo
will 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 anyContainer
orKubernetes
/OpenShift
components.See devfile/api#985 (comment) for more context and details.
For this to work however, this PR exposes a new
ImageRegistry
preference, 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"
odo
will 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 dev
andodo deploy
, and should work the same way on both Podman and cluster.