-
Notifications
You must be signed in to change notification settings - Fork 243
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 to cancel execution of odo dev
at any phase (e.g. if build command is taking long)
#6736
Conversation
Skipping CI for Draft Pull Request. |
✅ Deploy Preview for odo-docusaurus-preview canceled.
|
cf385f1
to
b5ae793
Compare
odo
in any phase (e.g. even if build command is taking long)odo
in any phase (e.g. if build command is taking long)
odo
in any phase (e.g. if build command is taking long)odo dev
at any phase (e.g. if build command is taking long)
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.
Overall it lgtm, but I noticed that hitting ctrl+c during the build command, it also prints log and an error message, I am not sure if that is something we can/need to hide.
↪ Running on the cluster in Dev mode
• Waiting for Kubernetes resources ...
✓ Added storage m2 to component
⚠ Pod is Pending
⚠ 0/1 nodes are available: 1 pod has unbound immediate PersistentVolumeClaims. preemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling.
✓ Pod is Running
✓ Syncing files into the container [118ms]
✗ Building your application in container (command: build) [8s]
[INFO] Scanning for projects...
Downloading from central: https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.3.5.RELEASE/spring-boot-starter-parent-2.3.5.RELEASE.pom
Downloaded from central: https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.3.5.RELEASE/spring-boot-starter-parent-2.3.5.RELEASE.pom (8.6 kB at 4.4 kB/s)
Downloading from central: https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.3.5.RELEASE/spring-boot-dependencies-2.3.5.RELEASE.pom
Downloaded from central: https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.3.5.RELEASE/spring-boot-dependencies-2.3.5.RELEASE.pom (121 kB at 124 kB/s)
Downloading from central: https://repo1.maven.org/maven2/com/datastax/oss/java-driver-bom/4.6.1/java-driver-bom-4.6.1.pom
Downloaded from central: https://repo1.maven.org/maven2/com/datastax/oss/java-driver-bom/4.6.1/java-driver-bom-4.6.1.pom (3.8 kB at 5.5 kB/s)
Downloading from central: https://repo1.maven.org/maven2/io/dropwizard/metrics/metrics-bom/4.1.14/metrics-bom-4.1.14.pom
Downloaded from central: https://repo1.maven.org/maven2/io/dropwizard/metrics/metrics-bom/4.1.14/metrics-bom-4.1.14.pom (5.3 kB at 8.9 kB/s)
Downloading from central: https://repo1.maven.org/maven2/io/dropwizard/metrics/metrics-parent/4.1.14/metrics-parent-4.1.14.pom
Downloaded from central: https://repo1.maven.org/maven2/io/dropwizard/metrics/metrics-parent/4.1.14/metrics-parent-4.1.14.pom (16 kB at 28 kB/s)
Downloading from central: https://repo1.maven.org/maven2/org/codehaus/groovy/groovy-bom/2.5.13/groovy-bom-2.5.13.pom
Downloaded from central: https://repo1.maven.org/maven2/org/codehaus/groovy/groovy-bom/2.5.13/groovy-bom-2.5.13.pom (26 kB at 41 kB/s)
Downloading from central: https://repo1.maven.org/maven2/com/fasterxml/jackson/jackson-bom/2.11.3/jackson-bom-2.11.3.pom
Downloaded from central: https://repo1.maven.org/maven2/com/fasterxml/jackson/jackson-bom/2.11.3/jackson-bom-2.11.3.pom (14 kB at 24 kB/s)
Downloading from central: https://repo1.maven.org/maven2/com/fasterxml/jackson/jackson-parent/2.11/jackson-parent-2.11.pom
Downloaded from central: https://repo1.maven.org/maven2/com/fasterxml/jackson/jackson-parent/2.11/jackson-parent-2.11.pom (7.8 kB at 13 kB/s)
Downloading from central: https://repo1.maven.org/maven2/com/fasterxml/oss-parent/38/oss-parent-38.pom
Error occurred on Push - watch command was unable to push component: unable to exec command [/bin/sh -c cd ${PROJECT_SOURCE} && (mvn clean -Dmaven.repo.local=/home/user/.m2/repository package -Dmaven.test.skip=true) 1>>/proc/1/fd/1 2>>/proc/1/fd/2]: error while streaming command: context canceled
Cleaning resources, please wait
✗ Dev mode interrupted by user
It made sense to me to have the logs displayed, as the build command was interrupted. Previously, we were not displaying any logs because we were waiting for the build command to finish. |
b5ae793
to
14bea33
Compare
Rebased and force-pushed to fix a conflict. |
This will allow to handle cancellations and timeouts and deadlines as needed
14bea33
to
d03be77
Compare
Rebased and force-pushed to fix conflicts. |
/override Kubernetes-Integration-Tests/Kubernetes-Docs-Integration-Tests [FAILED] user-guides/quickstart/docs-mdx/java/java_odo_dev_output.mdx
Expected
<string>: (
"""
... // 10 identical lines
✓ Added storage m2 to component
âš Pod is Pending
- ✓ Pod is Running
✓ Syncing files into the container [1s]
✓ Building your application in container (command: build) [1s]
... // 10 identical lines
[Ctrl+c] - Exit and delete resources from the cluster
[p] - Manually apply local changes to the application on the cluster
+ ✓ Pod is Running
```
"""
)
to be empty
In [It] at: /go/odo_1/tests/documentation/user-guides/doc_user_guides_quickstart_test.go:256 @ 04/19/23 09:32:53.84 |
@valaparthvi: Overrode contexts on behalf of valaparthvi: Kubernetes-Integration-Tests/Kubernetes-Docs-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. |
OC Failure: ======================
Unexpected error:
<*xpty.errPassthroughTimeout | 0xc0001500b0>: {
error: <*errors.errorString | 0xc000150030>{
s: "passthrough i/o timeout",
},
}
passthrough i/o timeout
occurred
In [It] at: /go/odo_1/tests/helper/helper_interactive.go:111 @ 04/19/23 09:16:55.105
[FAIL] odo dev interactive command tests when a component is bootstrapped [It] should sync files when p is pressed
/go/odo_1/tests/helper/helper_interactive.go:111
[FAILED] Timed out after 360.001s.
Expected
<string>: __
/ \__ Developing using the "my-nodejs-app" Devfile
\__/ \ Namespace: cmd-describe-list-binding-test787hco
/ \__/ odo version: v3.9.0
\__/
↪ Running on the cluster in Dev mode
• Waiting for Kubernetes resources ...
• Creating resource ServiceBinding/my-nodejs-app-cluster-sample-k8s ...
✓ Creating resource ServiceBinding/my-nodejs-app-cluster-sample-k8s
• Creating resource ServiceBinding/my-nodejs-app-cluster-sample-ocp ...
✓ Creating resource ServiceBinding/my-nodejs-app-cluster-sample-ocp
âš Pod is Pending
âš Pod is Terminating
âš No pod exists
âš Pod is Pending
to contain substring
<string>: [Ctrl+c] - Exit
In [BeforeEach] at: /go/odo_1/tests/helper/helper_run.go:54 @ 04/19/23 09:15:31.091
[FAIL] odo describe/list binding command tests when creating a component with a spec binding (service in namespace "") when Starting a Pg service when running dev session [BeforeEach] when changing the current namespace should list the binding with --namespace flag |
Windows failure: Checking http://127.0.0.1:51593, for Hello from Node.js Starter Application!
try 0 of 12
[odo] E0419 04:02:40.057708 11628 portforward.go:407] an error occurred forwarding 51593 -> 3000: error forwarding port 3000 to pod ca7efe30f45d2f03dca12968fd6b01f422b6f89155af2d4e01f79aea6408cbaf, uid : port forward into network namespace "/var/run/netns/5dc26b92-1509-46df-a78c-729c09b38638": failed to connect to localhost:3000 inside namespace ca7efe30f45d2f03dca12968fd6b01f422b6f89155af2d4e01f79aea6408cbaf: dial tcp [::1]:3000: connect: connection refused
[odo] E0419 04:02:40.058475 11628 portforward.go:233] lost connection to pod
error while requesting: Get "http://127.0.0.1:51593": EOF
[odo] - Forwarding from 127.0.0.1:51626 -> 3000
[odo]
[odo] - Forwarding from 127.0.0.1:51627 -> 5858
[odo]
[odo] I0419 04:02:40.308234 11628 watch.go:382] filesystem watch event: CREATE "C:\\Users\\Administrator.ANSIBLE-TEST-VS\\AppData\\Local\\Temp\\1633019422\\.odo\\odo-file-index.json"
[odo] I0419 04:02:40.308490 11628 watch.go:382] filesystem watch event: WRITE "C:\\Users\\Administrator.ANSIBLE-TEST-VS\\AppData\\Local\\Temp\\1633019422\\.odo\\odo-file-index.json"
[odo] I0419 04:02:40.308776 11628 watch.go:382] filesystem watch event: WRITE "C:\\Users\\Administrator.ANSIBLE-TEST-VS\\AppData\\Local\\Temp\\1633019422\\.odo"
[odo] I0419 04:02:40.309186 11628 file_watcher.go:97] ignoring watch on path C:\Users\Administrator.ANSIBLE-TEST-VS\AppData\Local\Temp\1633019422\.odo
[odo] I0419 04:02:40.309186 11628 watch.go:382] filesystem watch event: WRITE "C:\\Users\\Administrator.ANSIBLE-TEST-VS\\AppData\\Local\\Temp\\1633019422\\.odo\\devstate.json"
[odo] I0419 04:02:40.309438 11628 watch.go:382] filesystem watch event: WRITE "C:\\Users\\Administrator.ANSIBLE-TEST-VS\\AppData\\Local\\Temp\\1633019422\\.odo\\devstate.json"
[odo] I0419 04:02:40.309665 11628 watch.go:382] filesystem watch event: WRITE "C:\\Users\\Administrator.ANSIBLE-TEST-VS\\AppData\\Local\\Temp\\1633019422\\.odo\\devstate.11628.json"
[odo] I0419 04:02:40.309883 11628 watch.go:382] filesystem watch event: WRITE "C:\\Users\\Administrator.ANSIBLE-TEST-VS\\AppData\\Local\\Temp\\1633019422\\.odo\\devstate.11628.json"
[odo] I0419 04:02:40.310102 11628 watch.go:382] filesystem watch event: WRITE "C:\\Users\\Administrator.ANSIBLE-TEST-VS\\AppData\\Local\\Temp\\1633019422\\.odo\\devstate.json"
[odo] I0419 04:02:40.310361 11628 watch.go:382] filesystem watch event: WRITE "C:\\Users\\Administrator.ANSIBLE-TEST-VS\\AppData\\Local\\Temp\\1633019422\\.odo\\devstate.json"
[odo] I0419 04:02:40.310595 11628 watch.go:382] filesystem watch event: WRITE "C:\\Users\\Administrator.ANSIBLE-TEST-VS\\AppData\\Local\\Temp\\1633019422\\.odo\\devstate.11628.json"
[odo] I0419 04:02:40.310832 11628 watch.go:382] filesystem watch event: WRITE "C:\\Users\\Administrator.ANSIBLE-TEST-VS\\AppData\\Local\\Temp\\1633019422\\.odo\\devstate.11628.json"
try 1 of 12
error while requesting: Get "http://127.0.0.1:51593": dial tcp 127.0.0.1:51593: connectex: ...
...
...
error while requesting: Get "http://127.0.0.1:51593": dial tcp 127.0.0.1:51593: connectex: No connection could be made because the target machine actively refused it.
Last output from http://127.0.0.1:51593:
[FAILED] in [It] - C:/Users/Administrator.ANSIBLE-TEST-VS/3736/tests/helper/helper_http.go:50 @ 04/19/23 04:03:51.334
[odo] Cleaning resources, please wait
Summarizing 1 Failure:
[FAIL] odo dev debug command tests when a component is bootstrapped when running odo dev with debug flag [It] should connect to relevant ports forwarded
C:/Users/Administrator.ANSIBLE-TEST-VS/3736/tests/helper/helper_http.go:50
|
The new run is now passing. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Previous runs of those tests passed. /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. |
Previous runs of those tests passed. /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 bug
What does this PR do / why we need it:
This works by passing a context around to relevant functions and methods, to allow handling cancellations properly.
Which issue(s) this PR fixes:
Fixes #6196
PR acceptance criteria:
Unit test
Integration test
Documentation
How to test changes / Special notes to the reviewer:
See #6196