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

Rework services terminal code #7674

Merged
merged 18 commits into from Dec 23, 2019
Merged

Conversation

jasongrout
Copy link
Contributor

@jasongrout jasongrout commented Dec 20, 2019

References

Following up on #7252, this refactors the terminal code to follow the same patterns as the kernel and session code now does.

Code changes

Reworks the services terminal interface.

User-facing changes

Backwards-incompatible changes

As in #7252, lots of APIs change for terminals.

  • Fix tests

@jasongrout jasongrout added this to the 2.0 milestone Dec 20, 2019
@jupyterlab-dev-mode
Copy link

@jupyterlab-dev-mode jupyterlab-dev-mode bot commented Dec 20, 2019

Thanks for making a pull request to JupyterLab!

To try out this branch on binder, follow this link: Binder

@jasongrout
Copy link
Contributor Author

@jasongrout jasongrout commented Dec 21, 2019

windows js failures, for the record. I restarted the windowsjs test.

@jupyterlab/test-services: FAIL tests/test-services/src/session/manager.spec.ts (155.015s)
@jupyterlab/test-services:   ● session/manager › SessionManager › #startNew() › should start a session
@jupyterlab/test-services:     Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.
@jupyterlab/test-services:       at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
@jupyterlab/test-services: FAIL tests/test-services/src/kernel/ikernel.spec.ts (455.147s)
@jupyterlab/test-services:   ● Kernel.IKernel › #status › should get a busy status
@jupyterlab/test-services:     Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.
@jupyterlab/test-services:       at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
@jupyterlab/test-services:           at runMicrotasks (<anonymous>)
@jupyterlab/test-services:   ● Kernel.IKernel › #status › should get a busy status
@jupyterlab/test-services:     Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.
@jupyterlab/test-services:       at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
@jupyterlab/test-services:   ● Kernel.IKernel › #requestExecute() › should send and handle incoming messages
@jupyterlab/test-services:     Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.
@jupyterlab/test-services:       at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
@jupyterlab/test-services:           at runMicrotasks (<anonymous>)

@jasongrout
Copy link
Contributor Author

@jasongrout jasongrout commented Dec 21, 2019

Again a failure:

@jupyterlab/test-outputarea:   ● outputarea/widget › OutputArea › #future › should clear existing outputs
@jupyterlab/test-outputarea:     Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.
@jupyterlab/test-outputarea:       at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)

@jasongrout
Copy link
Contributor Author

@jasongrout jasongrout commented Dec 21, 2019

This time:

@jupyterlab/test-services: FAIL tests/test-services/src/session/manager.spec.ts (155.963s)
@jupyterlab/test-services:   ● session/manager › SessionManager › #ready › should resolve when the manager is ready
@jupyterlab/test-services:     Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.
@jupyterlab/test-services:       at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
@jupyterlab/test-services: FAIL tests/test-services/src/kernel/ikernel.spec.ts (694.443s)
@jupyterlab/test-services:   ● Kernel.IKernel › #status › should get a dead status
@jupyterlab/test-services:     Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.
@jupyterlab/test-services:       at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
@jupyterlab/test-services:           at runMicrotasks (<anonymous>)
@jupyterlab/test-services:   ● Kernel.IKernel › #status › should get a dead status
@jupyterlab/test-services:     Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.
@jupyterlab/test-services:       at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
@jupyterlab/test-services:   ● Kernel.IKernel › #info › should get the kernel info
@jupyterlab/test-services:     Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.
@jupyterlab/test-services:       at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
@jupyterlab/test-services:   ● Kernel.IKernel › #info › should get the kernel info
@jupyterlab/test-services:     : Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.Error:
@jupyterlab/test-services:       370 | 
@jupyterlab/test-services:       371 |   describe('#info', () => {
@jupyterlab/test-services:     > 372 |     it('should get the kernel info', async () => {
@jupyterlab/test-services:           |     ^
@jupyterlab/test-services:       373 |       const name = (await defaultKernel.info).language_info.name;
@jupyterlab/test-services:       374 |       const defaultSpecs = specs.kernelspecs[specs.default];
@jupyterlab/test-services:       375 |       expect(name).to.equal(defaultSpecs.language);
@jupyterlab/test-services:       at new Spec (node_modules/jest-jasmine2/build/jasmine/Spec.js:116:22)
@jupyterlab/test-services:       at Suite.<anonymous> (tests/test-services/src/kernel/ikernel.spec.ts:372:5)
@jupyterlab/test-services:       at Suite.<anonymous> (tests/test-services/src/kernel/ikernel.spec.ts:371:3)
@jupyterlab/test-services:       at Object.<anonymous> (tests/test-services/src/kernel/ikernel.spec.ts:25:1)
@jupyterlab/test-services:   ● Kernel.IKernel › #sendShellMessage() › should handle out of order messages
@jupyterlab/test-services:     Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.
@jupyterlab/test-services:       at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
@jupyterlab/test-services:           at runMicrotasks (<anonymous>)
@jupyterlab/test-services: FAIL tests/test-services/src/kernel/comm.spec.ts (22.943s)
@jupyterlab/test-services:   ● jupyter.services - Comm › Kernel › #registerCommTarget() › should call the provided callback
@jupyterlab/test-services:     : Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.Timeout - Async callback was not invoked within the 20000ms timeout specified by jest.setTimeout.Error:
@jupyterlab/test-services:       106 | 
@jupyterlab/test-services:       107 |     describe('#registerCommTarget()', () => {
@jupyterlab/test-services:     > 108 |       it('should call the provided callback', async () => {
@jupyterlab/test-services:           |       ^
@jupyterlab/test-services:       109 |         const promise = new PromiseDelegate<
@jupyterlab/test-services:       110 |           [Kernel.IComm, KernelMessage.ICommOpenMsg]
@jupyterlab/test-services:       111 |         >();
@jupyterlab/test-services:       at new Spec (node_modules/jest-jasmine2/build/jasmine/Spec.js:116:22)
@jupyterlab/test-services:       at Suite.<anonymous> (tests/test-services/src/kernel/comm.spec.ts:108:7)
@jupyterlab/test-services:       at Suite.<anonymous> (tests/test-services/src/kernel/comm.spec.ts:107:5)
@jupyterlab/test-services:       at Suite.<anonymous> (tests/test-services/src/kernel/comm.spec.ts:69:3)
@jupyterlab/test-services:       at Object.<anonymous> (tests/test-services/src/kernel/comm.spec.ts:50:1)

@jasongrout
Copy link
Contributor Author

@jasongrout jasongrout commented Dec 21, 2019

Again, documenting the failures:

@jupyterlab/test-services: FAIL tests/test-services/src/kernel/ikernel.spec.ts (577.353s)
@jupyterlab/test-services:   ● Kernel.IKernel › #sendInputReply() › should send an input_reply message
@jupyterlab/test-services:     Timeout - Async callback was not invoked within the 240000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 240000ms timeout specified by jest.setTimeout.
@jupyterlab/test-services:       at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)
@jupyterlab/test-services:           at runMicrotasks (<anonymous>)
@jupyterlab/test-services:   ● Kernel.IKernel › #sendInputReply() › should fail if the kernel is dead
@jupyterlab/test-services:     Timeout - Async callback was not invoked within the 240000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 240000ms timeout specified by jest.setTimeout.
@jupyterlab/test-services:       at mapper (node_modules/jest-jasmine2/build/queueRunner.js:25:45)

@jasongrout
Copy link
Contributor Author

@jasongrout jasongrout commented Dec 21, 2019

Finally passed that windows js test!

@blink1073
Copy link
Member

@blink1073 blink1073 commented Dec 23, 2019

Sorry, this picked up a couple of merge conflicts.

@jasongrout
Copy link
Contributor Author

@jasongrout jasongrout commented Dec 23, 2019

Fixed the merge conflicts and one null check issue.

@blink1073
Copy link
Member

@blink1073 blink1073 commented Dec 23, 2019

LGTM, thanks!

@blink1073 blink1073 merged commit dfeaf98 into jupyterlab:master Dec 23, 2019
10 checks passed
@lock lock bot added the status:resolved-locked label Jan 24, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pkg:services status:resolved-locked
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants