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

Refactor StartDevMode to return a single object instead of multiple args #6886

Merged
merged 2 commits into from
Jun 16, 2023

Conversation

valaparthvi
Copy link
Contributor

@valaparthvi valaparthvi commented Jun 13, 2023

What type of PR is this:
/area testing
/kind code-refactoring

What does this PR do / why we need it:
I find it confusing to work with multiple args returned by StartDevMode, using a single object makes it easier.

Which issue(s) this PR fixes:

Latest commit Fixes #6876

PR acceptance criteria:

  • Unit test

  • Integration test

  • Documentation

How to test changes / Special notes to the reviewer:

@netlify
Copy link

netlify bot commented Jun 13, 2023

🔨 Deploy Preview deleted from internal cluster!

Name Link
🔨 Latest commit dc76118
😎 Deploy Preview https://odo-dev-pr-6886.odo-test-kubernetes-clust-49529fc6e6a4a9fe7ebba9a3db5b55c4-0000.eu-de.containers.appdomain.cloud/

@openshift-ci openshift-ci bot added area/testing Issues or PRs related to testing, Quality Assurance or Quality Engineering kind/code-refactoring labels Jun 13, 2023
@openshift-ci openshift-ci bot requested review from ritudes and rnapoles-rh June 13, 2023 11:47
@odo-robot
Copy link

odo-robot bot commented Jun 13, 2023

OpenShift Unauthenticated Tests on commit 9fe60bb finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jun 13, 2023

NoCluster Tests on commit 9fe60bb finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jun 13, 2023

Validate Tests on commit 9fe60bb finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jun 13, 2023

Kubernetes Tests on commit 9fe60bb finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jun 13, 2023

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

@valaparthvi valaparthvi changed the title Refactor StartDevMode to return a single object instead of multiple args WIP: Refactor StartDevMode to return a single object instead of multiple args Jun 13, 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 Jun 13, 2023
@odo-robot
Copy link

odo-robot bot commented Jun 13, 2023

Unit Tests on commit 9fe60bb finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jun 13, 2023

OpenShift Tests on commit 9fe60bb finished with errors.
View logs: TXT HTML

@valaparthvi valaparthvi requested review from rm3l and feloy and removed request for rnapoles-rh June 14, 2023 10:38
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. Required by Prow. label Jun 14, 2023
@odo-robot
Copy link

odo-robot bot commented Jun 14, 2023

Kubernetes Docs Tests on commit 803718a finished successfully.
View logs: TXT HTML

@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. Required by Prow. label Jun 15, 2023
@valaparthvi valaparthvi changed the title WIP: Refactor StartDevMode to return a single object instead of multiple args Refactor StartDevMode to return a single object instead of multiple args Jun 16, 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 Jun 16, 2023
@valaparthvi valaparthvi reopened this Jun 16, 2023
Signed-off-by: Parthvi Vala <[email protected]>
@valaparthvi valaparthvi temporarily deployed to external June 16, 2023 08:54 — with GitHub Actions Inactive
@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.5% 0.5% Duplication

Copy link
Contributor

@feloy feloy left a comment

Choose a reason for hiding this comment

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

Thanks @valaparthvi for this improvement

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

/override OpenShift-Integration-tests/OpenShift-Integration-tests
Network issue.

  [odo]  ✗  Syncing files into the container [4ms]
  [odo] Error occurred on Push - watch command was unable to push component: failed to sync to component with name mynode: failed to sync to component with name mynode: unable push files to pod: error while streaming command: error sending request: Post "https://c100-e.eu-de.containers.cloud.ibm.com:31049/api/v1/namespaces/cmd-remove-binding-test71qon/pods/mynode-app-57d77b45bb-xmjvz/exec?command=tar&command=xf&command=-&command=-C&command=%2Fprojects&command=--no-same-owner&container=runtime&stderr=true&stdin=true&stdout=true": dial tcp: lookup c100-e.eu-de.containers.cloud.ibm.com: operation was canceled
  [odo] 
  [odo] 
  [odo] ↪ Dev mode
  [odo]  Status:
  [odo]  Watching for changes in the current directory /tmp/3271381815
  [odo] 
  [odo]  Keyboard Commands:
  [odo] [Ctrl+c] - Exit and delete resources from the cluster
  [odo]      [p] - Manually apply local changes to the application on the cluster
  [odo] I0616 11:43:50.565792   17461 implem.go:114] The path for preference file is /tmp/4157871543/preference.yaml
  [odo] I0616 11:43:50.566355   17461 segment.go:264] Checking telemetry enable status
  [odo] I0616 11:43:50.566388   17461 segment.go:282] Sending telemetry disabled by env variable
  [odo] Cleaning resources, please wait
  [odo] I0616 11:43:50.614310   17461 delete.go:176] Ignoring resource: servicebindings/my-nodejs-app-cluster-sample-ocp; it does not exist on the cluster
  [odo] I0616 11:43:50.657616   17461 all.go:46] starting to concurrently query 200 APIs
  [odo] I0616 11:43:50.659814   17461 all.go:62] fired up all goroutines to query APIs
  [odo] I0616 11:43:51.528455   17461 all.go:67] all goroutines have returned in 870.837356ms
  [odo] I0616 11:43:51.528485   17461 all.go:76] query result: objects=546
  [odo]  ✗  Dev mode interrupted by user
  Deleting project: cmd-remove-binding-test71qon
  Running oc with args [oc delete project cmd-remove-binding-test71qon --wait=false] and odo env: []
  [oc] project.project.openshift.io "cmd-remove-binding-test71qon" deleted
  Setting current dir to: /go/odo_1/tests/integration
  Deleting dir: /tmp/3271381815
  Deleting dir: /tmp/4157871543
  << Timeline

  [FAILED] Expected
      <string>: 
  to contain substring
      <string>: not found

@openshift-ci
Copy link

openshift-ci bot commented Jun 16, 2023

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

In response to this:

/override OpenShift-Integration-tests/OpenShift-Integration-tests
Network issue.

 [odo]  ✗  Syncing files into the container [4ms]
 [odo] Error occurred on Push - watch command was unable to push component: failed to sync to component with name mynode: failed to sync to component with name mynode: unable push files to pod: error while streaming command: error sending request: Post "https://c100-e.eu-de.containers.cloud.ibm.com:31049/api/v1/namespaces/cmd-remove-binding-test71qon/pods/mynode-app-57d77b45bb-xmjvz/exec?command=tar&command=xf&command=-&command=-C&command=%2Fprojects&command=--no-same-owner&container=runtime&stderr=true&stdin=true&stdout=true": dial tcp: lookup c100-e.eu-de.containers.cloud.ibm.com: operation was canceled
 [odo] 
 [odo] 
 [odo] ↪ Dev mode
 [odo]  Status:
 [odo]  Watching for changes in the current directory /tmp/3271381815
 [odo] 
 [odo]  Keyboard Commands:
 [odo] [Ctrl+c] - Exit and delete resources from the cluster
 [odo]      [p] - Manually apply local changes to the application on the cluster
 [odo] I0616 11:43:50.565792   17461 implem.go:114] The path for preference file is /tmp/4157871543/preference.yaml
 [odo] I0616 11:43:50.566355   17461 segment.go:264] Checking telemetry enable status
 [odo] I0616 11:43:50.566388   17461 segment.go:282] Sending telemetry disabled by env variable
 [odo] Cleaning resources, please wait
 [odo] I0616 11:43:50.614310   17461 delete.go:176] Ignoring resource: servicebindings/my-nodejs-app-cluster-sample-ocp; it does not exist on the cluster
 [odo] I0616 11:43:50.657616   17461 all.go:46] starting to concurrently query 200 APIs
 [odo] I0616 11:43:50.659814   17461 all.go:62] fired up all goroutines to query APIs
 [odo] I0616 11:43:51.528455   17461 all.go:67] all goroutines have returned in 870.837356ms
 [odo] I0616 11:43:51.528485   17461 all.go:76] query result: objects=546
 [odo]  ✗  Dev mode interrupted by user
 Deleting project: cmd-remove-binding-test71qon
 Running oc with args [oc delete project cmd-remove-binding-test71qon --wait=false] and odo env: []
 [oc] project.project.openshift.io "cmd-remove-binding-test71qon" deleted
 Setting current dir to: /go/odo_1/tests/integration
 Deleting dir: /tmp/3271381815
 Deleting dir: /tmp/4157871543
 << Timeline

 [FAILED] Expected
     <string>: 
 to contain substring
     <string>: not found

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.

@valaparthvi
Copy link
Contributor Author

/override windows-integration-test/Windows-test

  [FAILED] No future change is possible.  Bailing out early after 1.212s.
  Running oc.exe with args [oc get csv -o jsonpath={.items[?(@.status.phase=="Succeeded")].metadata.name}] and odo env: []
  Expected
      <int>: 1
  to match exit code:
      <int>: 0
------------
  I0616 05:03:50.613347    6492 util.go:198] path C:\Users\Administrator.ANSIBLE-T
  EST-VS\AppData\Local\Temp\2170439783\devfile.yaml doesn't exist, skipping it    [92m
  ? [97mDo you want to list services from:[m  [36m[Use arrows to move, type to filter][m      [36m
  > current namespace[m[61X[61C
    all accessible namespaces[53X[53C[?25h[?25l[HI[?25h
  ======================
  Unexpected error:
      <*xpty.errPassthroughTimeout | 0xc0008cc020>: {
          error: <*errors.errorString | 0xc0008cc010>{
              s: "passthrough i/o timeout",
          },
      }
      passthrough i/o timeout
  occurred
  In [It] at: C:/Users/Administrator.ANSIBLE-TEST-VS/4170/tests/helper/helper_interactive.go:111 @ 06/16/23 05:05:50.661
------------------------------
Summarizing 3 Failures:
  [FAIL] odo devfile deploy command tests deploying devfile with long-running exec when Automount volumes are present in the namespace [It] should mount the volumes
  C:/Users/Administrator.ANSIBLE-TEST-VS/4170/tests/helper/helper_cmd_wrapper.go:120
  [FAIL] odo add binding interactive command tests when running a deployment when binding to a service in a different namespace [It] should successfully add binding without devfile
  C:/Users/Administrator.ANSIBLE-TEST-VS/4170/tests/helper/helper_interactive.go:111
  [FAIL] odo describe/list binding command tests when creating a component with a binding as environment variables (service in namespace "") when Starting a Pg service [BeforeEach] when running dev session when changing the current namespace should list the binding with --namespace flag - command: [list binding]
  C:/Users/Administrator.ANSIBLE-TEST-VS/4170/tests/helper/helper_generic.go:58

@openshift-ci
Copy link

openshift-ci bot commented Jun 16, 2023

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

In response to this:

/override windows-integration-test/Windows-test

 [FAILED] No future change is possible.  Bailing out early after 1.212s.
 Running oc.exe with args [oc get csv -o jsonpath={.items[?(@.status.phase=="Succeeded")].metadata.name}] and odo env: []
 Expected
     <int>: 1
 to match exit code:
     <int>: 0
------------
 I0616 05:03:50.613347    6492 util.go:198] path C:\Users\Administrator.ANSIBLE-T
 EST-VS\AppData\Local\Temp\2170439783\devfile.yaml doesn't exist, skipping it    [92m
 ? [97mDo you want to list services from:[m  [36m[Use arrows to move, type to filter][m      [36m
 > current namespace[m[61X[61C
   all accessible namespaces[53X[53C[?25h[?25l[HI[?25h
 ======================
 Unexpected error:
     <*xpty.errPassthroughTimeout | 0xc0008cc020>: {
         error: <*errors.errorString | 0xc0008cc010>{
             s: "passthrough i/o timeout",
         },
     }
     passthrough i/o timeout
 occurred
 In [It] at: C:/Users/Administrator.ANSIBLE-TEST-VS/4170/tests/helper/helper_interactive.go:111 @ 06/16/23 05:05:50.661
------------------------------
Summarizing 3 Failures:
 [FAIL] odo devfile deploy command tests deploying devfile with long-running exec when Automount volumes are present in the namespace [It] should mount the volumes
 C:/Users/Administrator.ANSIBLE-TEST-VS/4170/tests/helper/helper_cmd_wrapper.go:120
 [FAIL] odo add binding interactive command tests when running a deployment when binding to a service in a different namespace [It] should successfully add binding without devfile
 C:/Users/Administrator.ANSIBLE-TEST-VS/4170/tests/helper/helper_interactive.go:111
 [FAIL] odo describe/list binding command tests when creating a component with a binding as environment variables (service in namespace "") when Starting a Pg service [BeforeEach] when running dev session when changing the current namespace should list the binding with --namespace flag - command: [list binding]
 C:/Users/Administrator.ANSIBLE-TEST-VS/4170/tests/helper/helper_generic.go:58

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.

@valaparthvi
Copy link
Contributor Author

/override Pull Request Website Preview / deploy-prev

@openshift-ci
Copy link

openshift-ci bot commented Jun 16, 2023

@valaparthvi: /override requires failed status contexts, check run or a prowjob name to operate on.
The following unknown contexts/checkruns were given:

  • /
  • Preview
  • Pull
  • Request
  • Website
  • deploy-prev

Only the following failed contexts/checkruns were expected:

  • Kubernetes-Integration-Tests/Kubernetes-Integration-Tests
  • OpenShift-Integration-tests/OpenShift-Integration-tests
  • Unit-Tests/Unit-Tests
  • ci/prow/odo-ocp4.13-lp-interop-images
  • ci/prow/odo-ocp4.14-lp-interop-images
  • ci/prow/v4.10-images
  • ci/prow/v4.11-images
  • ci/prow/v4.12-images
  • ci/prow/v4.13-images
  • delete_resources_for_pr
  • deploy-preview
  • netlify/odo-docusaurus-preview/deploy-preview
  • pull-ci-redhat-developer-odo-main-odo-ocp4.13-lp-interop-images
  • pull-ci-redhat-developer-odo-main-odo-ocp4.14-lp-interop-images
  • pull-ci-redhat-developer-odo-main-v4.10-images
  • pull-ci-redhat-developer-odo-main-v4.11-images
  • pull-ci-redhat-developer-odo-main-v4.12-images
  • pull-ci-redhat-developer-odo-main-v4.13-images
  • tide
  • validator/Validate
  • windows-integration-test/Windows-test

If you are trying to override a checkrun that has a space in it, you must put a double quote on the context.

In response to this:

/override Pull Request Website Preview / deploy-prev

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.

@valaparthvi
Copy link
Contributor Author

/override deploy-preview

@openshift-ci
Copy link

openshift-ci bot commented Jun 16, 2023

@valaparthvi: Overrode contexts on behalf of valaparthvi: deploy-preview

In response to this:

/override deploy-preview

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 a9e6cdc into redhat-developer:main Jun 16, 2023
@openshift-merge-robot openshift-merge-robot temporarily deployed to internal June 16, 2023 14:01 — with GitHub Actions Inactive
@rm3l rm3l added the area/refactoring Issues or PRs related to code refactoring label Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/refactoring Issues or PRs related to code refactoring 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.

Doc automation tests broken due to new NodeJS Stacks versions in staging registry
4 participants