Skip to content

Make sure to use random component names when copying sample Devfiles in integration tests#6504

Merged
openshift-merge-robot merged 3 commits intoredhat-developer:mainfrom
rm3l:use_random_component_names_in_integration_tests
Jan 18, 2023
Merged

Make sure to use random component names when copying sample Devfiles in integration tests#6504
openshift-merge-robot merged 3 commits intoredhat-developer:mainfrom
rm3l:use_random_component_names_in_integration_tests

Conversation

@rm3l
Copy link
Member

@rm3l rm3l commented Jan 18, 2023

What type of PR is this:
/kind tests
/area testing

What does this PR do / why we need it:
This updates the helper.CopyExampleDevfile function to accept a parameter that allows performing operations on the destination Devfile (like setting its metadata.name). This way, callers are able to pass a unique random component name.
Using a random name helps prevent conflicts when isolation is not possible (for example on Podman). This will allow fixing the Podman tests in #6499.

For consistency, the next step could be not to use odo init --devfile-path /path/to/example/devfile (so as not to depend on the odo init command), but instead rely on the updated helper.CopyExampleDevfile function everywhere. But this can be done in a subsequent PR.

Which issue(s) this PR fixes:

PR acceptance criteria:

  • Unit test

  • Integration test

  • Documentation

How to test changes / Special notes to the reviewer:

This will help prevent conflicts when isolation is not possible (for example on Podman)

For consistency, next step would be not to use 'odo init --devfile-path', but instead rely on the updated helper.CopyExampleDevfile function everywhere.
@openshift-ci openshift-ci bot added kind/tests area/testing Issues or PRs related to testing, Quality Assurance or Quality Engineering labels Jan 18, 2023
@openshift-ci openshift-ci bot requested review from feloy and rnapoles-rh January 18, 2023 08:15
@rm3l rm3l added this to the v3.6.0 🚀 milestone Jan 18, 2023
@rm3l rm3l requested review from anandrkskd and valaparthvi and removed request for rnapoles-rh January 18, 2023 08:16
@netlify
Copy link

netlify bot commented Jan 18, 2023

Deploy Preview for odo-docusaurus-preview canceled.

Name Link
🔨 Latest commit e8f0815
🔍 Latest deploy log https://app.netlify.com/sites/odo-docusaurus-preview/deploys/63c7b8592160b500082d2343

@rm3l rm3l mentioned this pull request Jan 18, 2023
3 tasks
@odo-robot
Copy link

odo-robot bot commented Jan 18, 2023

Windows Tests (OCP) on commit 22f274e finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jan 18, 2023

OpenShift Tests on commit 22f274e finished with errors.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jan 18, 2023

NoCluster Tests on commit 22f274e finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jan 18, 2023

Unit Tests on commit 22f274e finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jan 18, 2023

Validate Tests on commit 22f274e finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jan 18, 2023

Kubernetes Tests on commit 22f274e finished successfully.
View logs: TXT HTML

@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 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@rm3l
Copy link
Member Author

rm3l commented Jan 18, 2023

• [FAILED] [255.311 seconds]
E2E Test
/go/odo_1/tests/e2escenarios/e2e_test.go:19
  starting with non-empty Directory
  /go/odo_1/tests/e2escenarios/e2e_test.go:164
    [It] should verify developer workflow from non-empty Directory
    /go/odo_1/tests/e2escenarios/e2e_test.go:169
...
error while trying to GET "127.0.0.1:42467": Get "[http://127.0.0.1:42467":](http://127.0.0.1:42467%22/) EOF
    [odo] E0118 10:05:23.849776   12130 portforward.go:406] an error occurred forwarding 42467 -> 3000: error forwarding port 3000 to pod 04b08dc65d7d03a38fb0d94d02bf2a4652eb2e0910017dbd85d9338c899cf992, uid : port forward into network namespace "/var/run/netns/1b65695b-3aaf-4fe2-b6d0-01d61dec48da": failed to connect to localhost:3000 inside namespace 04b08dc65d7d03a38fb0d94d02bf2a4652eb2e0910017dbd85d9338c899cf992: dial tcp [::1]:3000: connect: connection refused
    [odo] E0118 10:05:23.850002   12130 portforward.go:234] lost connection to pod
    [odo]  -  Forwarding from 127.0.0.1:44475 -> 3000
...

Summarizing 1 Failure:
  [FAIL] E2E Test starting with non-empty Directory [It] should verify developer workflow from non-empty Directory
  /go/odo_1/tests/e2escenarios/e2e_test.go:41

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

Flaky E2E test (reported in #6463 )

@openshift-ci
Copy link

openshift-ci bot commented Jan 18, 2023

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

Details

In response to this:

• [FAILED] [255.311 seconds]
E2E Test
/go/odo_1/tests/e2escenarios/e2e_test.go:19
 starting with non-empty Directory
 /go/odo_1/tests/e2escenarios/e2e_test.go:164
   [It] should verify developer workflow from non-empty Directory
   /go/odo_1/tests/e2escenarios/e2e_test.go:169
...
error while trying to GET "127.0.0.1:42467": Get "[http://127.0.0.1:42467":](http://127.0.0.1:42467%22/) EOF
   [odo] E0118 10:05:23.849776   12130 portforward.go:406] an error occurred forwarding 42467 -> 3000: error forwarding port 3000 to pod 04b08dc65d7d03a38fb0d94d02bf2a4652eb2e0910017dbd85d9338c899cf992, uid : port forward into network namespace "/var/run/netns/1b65695b-3aaf-4fe2-b6d0-01d61dec48da": failed to connect to localhost:3000 inside namespace 04b08dc65d7d03a38fb0d94d02bf2a4652eb2e0910017dbd85d9338c899cf992: dial tcp [::1]:3000: connect: connection refused
   [odo] E0118 10:05:23.850002   12130 portforward.go:234] lost connection to pod
   [odo]  -  Forwarding from 127.0.0.1:44475 -> 3000
...

Summarizing 1 Failure:
 [FAIL] E2E Test starting with non-empty Directory [It] should verify developer workflow from non-empty Directory
 /go/odo_1/tests/e2escenarios/e2e_test.go:41

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

Flaky E2E test (reported in #6463 )

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-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Jan 18, 2023
@rm3l
Copy link
Member Author

rm3l commented Jan 18, 2023

/test v4.11-integration-e2e

Tests failing due to user no longer being authenticated.

    Running oc with args [oc get pods -n cmd-describe-list-binding-test581wmo -o jsonpath='{range .items[*]}{.metadata.name}'] and odo env: []
    [oc] error: You must be logged in to the server (Unauthorized)
...
    Running oc with args [oc get pods --namespace cmd-dev-test458zqh --selector=component=zumcbf -o jsonpath={.items[*].metadata.name}] and odo env: []
    [oc] zumcbf-app-6bff8dfbb9-zphp4Running oc with args [oc exec zumcbf-app-6bff8dfbb9-zphp4 --namespace cmd-dev-test458zqh -c runtime -- cat /projects/server.js] and odo env: []
    [odo] Error connecting to the cluster. Please log in again
    [odo] 
    [odo] I0118 13:57:42.390774   34324 watch.go:465] Error from Push: watch command was unable to push component: unable to determine if component zumcbf exists: unable to get Deployments for the selector: app.kubernetes.io/instance=zumcbf,app.kubernetes.io/managed-by=odo,app.kubernetes.io/part-of=app,component=zumcbf,odo.dev/mode=Dev: unable to list Deployments: Unauthorized
    [oc] error: You must be logged in to the server (Unauthorized)
    [odo] I0118 13:57:42.393747   34324 backo.go:23] wait for 100ms
    [odo] read: read /dev/stdin: input/output error
    [odo] Cleaning resources, please wait
...

@openshift-merge-robot openshift-merge-robot merged commit 51ebf26 into redhat-developer:main Jan 18, 2023
@rm3l rm3l deleted the use_random_component_names_in_integration_tests branch January 18, 2023 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/testing Issues or PRs related to testing, Quality Assurance or Quality Engineering 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.

3 participants