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

Set vcs-uri annotation on podman #6746

Conversation

feloy
Copy link
Contributor

@feloy feloy commented Apr 18, 2023

What type of PR is this:

/kind feature

What does this PR do / why we need it:

Which issue(s) this PR fixes:

Fixes #6493

PR acceptance criteria:

  • Unit test

  • Integration test

  • Documentation

How to test changes / Special notes to the reviewer:

@netlify
Copy link

netlify bot commented Apr 18, 2023

Deploy Preview for odo-docusaurus-preview canceled.

Name Link
🔨 Latest commit 1ddc37f
🔍 Latest deploy log https://app.netlify.com/sites/odo-docusaurus-preview/deploys/643feb87455ea10008ad71c1

@odo-robot
Copy link

odo-robot bot commented Apr 18, 2023

OpenShift Unauthenticated Tests on commit 6522e64 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Apr 18, 2023

NoCluster Tests on commit 6522e64 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Apr 18, 2023

Unit Tests on commit 6522e64 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Apr 18, 2023

Validate Tests on commit 6522e64 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Apr 18, 2023

Kubernetes Tests on commit 6522e64 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Apr 18, 2023

Windows Tests (OCP) on commit 6522e64 finished with errors.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Apr 18, 2023

Kubernetes Docs Tests on commit 912f6d1 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Apr 18, 2023

OpenShift Tests on commit 6522e64 finished with errors.
View logs: TXT HTML

@feloy feloy closed this Apr 18, 2023
@feloy feloy reopened this Apr 18, 2023
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. Required by Prow. label Apr 18, 2023
@feloy feloy force-pushed the feature-6493/vcs-uri-annotation branch from 19920d2 to fd9f6e0 Compare April 18, 2023 15:01
@feloy feloy changed the title [WIP] Set vcs-uri annotation on podman Set vcs-uri annotation on podman Apr 18, 2023
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. Required by Prow. label Apr 18, 2023
@feloy
Copy link
Contributor Author

feloy commented Apr 18, 2023

Podman v3 cannot get annotations from a running pod, so it is not possible to test it on GitHub ACtion with Podman v3 for now.

@feloy feloy requested review from rm3l and valaparthvi April 18, 2023 16:14
@@ -2373,7 +2373,7 @@ CMD ["npm", "start"]
devfileCmpName := "nodejs"
BeforeEach(func() {
if podman {
Skip("Not implemented yet on Podman - see https://github.com/redhat-developer/odo/issues/6493")
Skip("Getting annotations is not available with Podman v3")
Copy link
Member

Choose a reason for hiding this comment

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

Would it be possible to be more specific (as we are able to determine the actual version of Podman) and skip the test only if it is < v4? So that we can still have this tested with Podman v4..
I am perfectly okay if you think it is not worth the effort for now.

It would be great to look into how we could have tests on both Podman v3 and v4, but that's the scope of #6583

@feloy feloy requested a review from rm3l April 19, 2023 11:28
tests/helper/helper_podman.go Outdated Show resolved Hide resolved
@feloy feloy requested a review from rm3l April 19, 2023 13:24
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Apr 19, 2023
@feloy
Copy link
Contributor Author

feloy commented Apr 19, 2023

/override OpenShift-Integration-tests/OpenShift-Integration-tests

[FAILED] [362.577 seconds]
odo list with devfile when a component created in 'app' application when dev is running on cluster [BeforeEach] verifying the managedBy Version in the odo list output should show managedBy Version
  [BeforeEach] /go/odo_1/tests/integration/cmd_devfile_list_test.go:133
  [It] /go/odo_1/tests/integration/cmd_devfile_list_test.go:181
[...]
Expected
      <string>:   __
       /  \__     Developing using the "lnlzfy" Devfile
       \__/  \    Namespace: cmd-devfile-list-test181opf
       /  \__/    odo version: v3.9.0
       \__/
      
      ↪ Running on the cluster in Dev mode
       •  Waiting for Kubernetes resources  ...
       âš   Pod is Pending
       ✓  Pod is Running
       •  Syncing files into the container  ...
      ↵
 ✓  Syncing files into the container [1s]
       •  Building your application in container (command: install)  ...
      ↵
 ✓  Building your application in container (command: install) [4s]
       •  Executing the application (command: run)  ...
       •  Waiting for the application to be ready  ...
      
  to contain substring
      <string>: [Ctrl+c] - Exit
  In [BeforeEach] at: /go/odo_1/tests/helper/helper_run.go:54 @ 04/19/23 13:52:16.515
odo dev command tests checking if odo dev matches local Devfile K8s resources and remote resources when odo dev is executed to run a devfile containing a k8s resource with apply command [BeforeEach] should have deleted the old resource and created the new resource
  [BeforeEach] /go/odo_1/tests/integration/cmd_dev_test.go:730
  [It] /go/odo_1/tests/integration/cmd_dev_test.go:757
[...]
  Expected
      <string>: Updating Component...
      
      Error occurred on Push - watch command was unable to push component: unable to delete remote resources: unable to delete resource: Deployment/my-k8s-component: timeout while waiting for "my-k8s-component" resource to be deleted
      
      Pushing files...
      
      
      File /tmp/3884646612/devfile.yaml changed
       •  Waiting for Kubernetes resources  ...
      Error occurred on Push - watch command was unable to push component: unable to delete remote resources: unable to delete resource: Deployment/my-k8s-component: timeout while waiting for "my-k8s-component" resource to be deleted
      
       •  Waiting for Kubernetes resources  ...
      Error occurred on Push - watch command was unable to push component: unable to delete remote resources: unable to delete resource: Deployment/my-k8s-component: timeout while waiting for "my-k8s-component" resource to be deleted
      
       •  Waiting for Kubernetes resources  ...
       •  Syncing files into the container  ...
      ↵
 ✓  Syncing files into the container [846ms]
       •  Building your application in container (command: build)  ...
      ↵
 ✓  Building your application in container (command: build) [3s]
      
      ↪ Building & Pushing Image: quay.io/unknown-account/myimage
       •  Building image locally  ...
      build -t quay.io/unknown-account/myimage -f /tmp/3884646612/Dockerfile /tmp/3884646612
      ↵
 ✓  Building image locally [8ms]
       •  Pushing image to container registry  ...
      push quay.io/unknown-account/myimage
      ↵
 ✓  Pushing image to container registry [5ms]
      
      ↪ Deploying Kubernetes Component: my-new-k8s-component
       •  Creating resource Deployment/my-new-k8s-component  ...
      ↵
 ✓  Creating resource Deployment/my-new-k8s-component 
      
      ↪ Deploying Kubernetes Component: my-new-openshift-component
       •  Creating resource Deployment/my-new-openshift-component  ...
      ↵
 ✓  Creating resource Deployment/my-new-openshift-component 
      ↵
 ✓  Finished executing the application (command: start) [5m]
       •  Executing the application (command: start)  ...
       •  Waiting for the application to be ready  ...
      
  to contain substring
      <string>: Dev mode
  In [BeforeEach] at: /go/odo_1/tests/helper/helper_run.go:54 @ 04/19/23 13:58:41.795
 [FAILED] [362.663 seconds]
odo list with devfile devfile has missing metadata when projectType and language is missing when the component is pushed [BeforeEach] should show 'nodejs' for 'Type' in odo list
  [BeforeEach] /go/odo_1/tests/integration/cmd_devfile_list_test.go:354
  [It] /go/odo_1/tests/integration/cmd_devfile_list_test.go:363
[...]
  Expected
      <string>:   __
       /  \__     Developing using the "aname" Devfile
       \__/  \    Namespace: cmd-devfile-list-test363jta
       /  \__/    odo version: v3.9.0
       \__/
      
      ↪ Running on the cluster in Dev mode
       •  Waiting for Kubernetes resources  ...
       âš   Pod is Pending
       ✓  Pod is Running
       •  Syncing files into the container  ...
      ↵
 ✓  Syncing files into the container [989ms]
       •  Building your application in container (command: defaultbuild)  ...
      ↵
 ✓  Building your application in container (command: defaultbuild) [41s]
       •  Executing the application (command: defaultrun)  ...
       ✗  Finished executing the application (command: defaultrun) [6s]
       •  Waiting for the application to be ready  ...
      
  to contain substring
      <string>: [Ctrl+c] - Exit
  In [BeforeEach] at: /go/odo_1/tests/helper/helper_run.go:54 @ 04/19/23 14:00:52.143

@openshift-ci
Copy link

openshift-ci bot commented Apr 19, 2023

@feloy: Overrode contexts on behalf of feloy: OpenShift-Integration-tests/OpenShift-Integration-tests

In response to this:

/override OpenShift-Integration-tests/OpenShift-Integration-tests

[FAILED] [362.577 seconds]
odo list with devfile when a component created in 'app' application when dev is running on cluster [BeforeEach] verifying the managedBy Version in the odo list output should show managedBy Version
 [BeforeEach] /go/odo_1/tests/integration/cmd_devfile_list_test.go:133
 [It] /go/odo_1/tests/integration/cmd_devfile_list_test.go:181
[...]
Expected
     <string>:   __
      /  \__     Developing using the "lnlzfy" Devfile
      \__/  \    Namespace: cmd-devfile-list-test181opf
      /  \__/    odo version: v3.9.0
      \__/
     
     ↪ Running on the cluster in Dev mode
      •  Waiting for Kubernetes resources  ...
      âš   Pod is Pending
      ✓  Pod is Running
      •  Syncing files into the container  ...
     ↵
✓  Syncing files into the container [1s]
      •  Building your application in container (command: install)  ...
     ↵
✓  Building your application in container (command: install) [4s]
      •  Executing the application (command: run)  ...
      •  Waiting for the application to be ready  ...
     
 to contain substring
     <string>: [Ctrl+c] - Exit
 In [BeforeEach] at: /go/odo_1/tests/helper/helper_run.go:54 @ 04/19/23 13:52:16.515
odo dev command tests checking if odo dev matches local Devfile K8s resources and remote resources when odo dev is executed to run a devfile containing a k8s resource with apply command [BeforeEach] should have deleted the old resource and created the new resource
 [BeforeEach] /go/odo_1/tests/integration/cmd_dev_test.go:730
 [It] /go/odo_1/tests/integration/cmd_dev_test.go:757
[...]
 Expected
     <string>: Updating Component...
     
     Error occurred on Push - watch command was unable to push component: unable to delete remote resources: unable to delete resource: Deployment/my-k8s-component: timeout while waiting for "my-k8s-component" resource to be deleted
     
     Pushing files...
     
     
     File /tmp/3884646612/devfile.yaml changed
      •  Waiting for Kubernetes resources  ...
     Error occurred on Push - watch command was unable to push component: unable to delete remote resources: unable to delete resource: Deployment/my-k8s-component: timeout while waiting for "my-k8s-component" resource to be deleted
     
      •  Waiting for Kubernetes resources  ...
     Error occurred on Push - watch command was unable to push component: unable to delete remote resources: unable to delete resource: Deployment/my-k8s-component: timeout while waiting for "my-k8s-component" resource to be deleted
     
      •  Waiting for Kubernetes resources  ...
      •  Syncing files into the container  ...
     ↵
✓  Syncing files into the container [846ms]
      •  Building your application in container (command: build)  ...
     ↵
✓  Building your application in container (command: build) [3s]
     
     ↪ Building & Pushing Image: quay.io/unknown-account/myimage
      •  Building image locally  ...
     build -t quay.io/unknown-account/myimage -f /tmp/3884646612/Dockerfile /tmp/3884646612
     ↵
✓  Building image locally [8ms]
      •  Pushing image to container registry  ...
     push quay.io/unknown-account/myimage
     ↵
✓  Pushing image to container registry [5ms]
     
     ↪ Deploying Kubernetes Component: my-new-k8s-component
      •  Creating resource Deployment/my-new-k8s-component  ...
     ↵
✓  Creating resource Deployment/my-new-k8s-component 
     
     ↪ Deploying Kubernetes Component: my-new-openshift-component
      •  Creating resource Deployment/my-new-openshift-component  ...
     ↵
✓  Creating resource Deployment/my-new-openshift-component 
     ↵
✓  Finished executing the application (command: start) [5m]
      •  Executing the application (command: start)  ...
      •  Waiting for the application to be ready  ...
     
 to contain substring
     <string>: Dev mode
 In [BeforeEach] at: /go/odo_1/tests/helper/helper_run.go:54 @ 04/19/23 13:58:41.795
[FAILED] [362.663 seconds]
odo list with devfile devfile has missing metadata when projectType and language is missing when the component is pushed [BeforeEach] should show 'nodejs' for 'Type' in odo list
 [BeforeEach] /go/odo_1/tests/integration/cmd_devfile_list_test.go:354
 [It] /go/odo_1/tests/integration/cmd_devfile_list_test.go:363
[...]
 Expected
     <string>:   __
      /  \__     Developing using the "aname" Devfile
      \__/  \    Namespace: cmd-devfile-list-test363jta
      /  \__/    odo version: v3.9.0
      \__/
     
     ↪ Running on the cluster in Dev mode
      •  Waiting for Kubernetes resources  ...
      âš   Pod is Pending
      ✓  Pod is Running
      •  Syncing files into the container  ...
     ↵
✓  Syncing files into the container [989ms]
      •  Building your application in container (command: defaultbuild)  ...
     ↵
✓  Building your application in container (command: defaultbuild) [41s]
      •  Executing the application (command: defaultrun)  ...
      ✗  Finished executing the application (command: defaultrun) [6s]
      •  Waiting for the application to be ready  ...
     
 to contain substring
     <string>: [Ctrl+c] - Exit
 In [BeforeEach] at: /go/odo_1/tests/helper/helper_run.go:54 @ 04/19/23 14:00:52.143

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.

@feloy
Copy link
Contributor Author

feloy commented Apr 19, 2023

/override windows-integration-test/Windows-test

[FAILED] [148.887 seconds]
odo describe/list binding command tests [AfterEach] when creating a component with a spec binding (service in namespace "") when Starting a Pg service when running dev session when changing the current namespace should list the binding with --namespace flag
  [AfterEach] C:/Users/Administrator.ANSIBLE-TEST-VS/3741/tests/integration/cmd_describe_list_binding_test.go:25
  [It] C:/Users/Administrator.ANSIBLE-TEST-VS/3741/tests/integration/cmd_describe_list_binding_test.go:787
[...]
[oc] Unable to connect to the server: dial tcp 158.177.79.34:31700: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

@openshift-ci
Copy link

openshift-ci bot commented Apr 19, 2023

@feloy: Overrode contexts on behalf of feloy: windows-integration-test/Windows-test

In response to this:

/override windows-integration-test/Windows-test

[FAILED] [148.887 seconds]
odo describe/list binding command tests [AfterEach] when creating a component with a spec binding (service in namespace "") when Starting a Pg service when running dev session when changing the current namespace should list the binding with --namespace flag
 [AfterEach] C:/Users/Administrator.ANSIBLE-TEST-VS/3741/tests/integration/cmd_describe_list_binding_test.go:25
 [It] C:/Users/Administrator.ANSIBLE-TEST-VS/3741/tests/integration/cmd_describe_list_binding_test.go:787
[...]
[oc] Unable to connect to the server: dial tcp 158.177.79.34:31700: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

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.

@openshift-merge-robot openshift-merge-robot merged commit b843ce8 into redhat-developer:main Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged. Required by Prow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add app.openshift.io/vcs-uri annotation on Podman resources
3 participants