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

process: add onClose event #6595

Merged
merged 1 commit into from
Nov 26, 2019
Merged

process: add onClose event #6595

merged 1 commit into from
Nov 26, 2019

Conversation

paul-marechal
Copy link
Member

@paul-marechal paul-marechal commented Nov 20, 2019

What it does

WIP

Add a onClose convenience event on processes, fired when all the
streams are supposed to be closed.

Fixes #6587

How to test

  • yarn run test should pass
  • Run tasks and make sure it stops correctly
  • Open terminals, reload frontend and check if you can keep using it.

Review checklist

Reminder for reviewers

@paul-marechal paul-marechal added the process issues related to the process extension label Nov 20, 2019
@paul-marechal paul-marechal marked this pull request as ready for review November 21, 2019 15:13
@@ -44,6 +44,14 @@ export class MultiRingBufferReadableStream extends stream.Readable implements Di
this.deq(size);
}

_destroy(err: Error | undefined, callback: (err?: Error) => void): void {
Copy link
Member

Choose a reason for hiding this comment

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

@marcdumais-work someone has to review and test it, i'm not familiar with it

@akosyakov
Copy link
Member

@marechal-p Please fill in How to test to specify how to test for regressions, i.e. it seems that reconnecting terminals are changed it should be verified and so on.

@paul-marechal paul-marechal force-pushed the mp/process-close branch 2 times, most recently from d00b169 to 5e093bf Compare November 21, 2019 15:43
@paul-marechal
Copy link
Member Author

I will need to wait until I get access to a Windows machine to check why part of the test suite is failing there...

@akosyakov
Copy link
Member

@marechal-p Could you ask colleagues to test terminal preservation between reloads that it works like on master?

@marcdumais-work
Copy link
Contributor

Could you ask colleagues to test terminal preservation between reloads that it works like on master?

I am testing the reload case

@paul-marechal paul-marechal self-assigned this Nov 25, 2019
Add a `onClose` convenience event on processes, fired when all the
streams are supposed to be closed.

Signed-off-by: Paul Maréchal <paul.marechal@ericsson.com>
@AndrienkoAleksandr
Copy link
Contributor

I a bit tested killing tasks with different kill signal, tested exit terminal, restore task output after page refresh, didn't found regression.

@marcdumais-work
Copy link
Contributor

I am testing the reload case

I also did not find regressions, quickly testing this PR.

@marcdumais-work
Copy link
Contributor

It would probably be good to test this on Windows, since process execution is different.

@paul-marechal
Copy link
Member Author

Tried on Windows; tests are green, couldn't find new issues at runtime.

Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

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

I have not tested, but @marcdumais-work and @AndrienkoAleksandr did and code looks reasonable.

@paul-marechal paul-marechal merged commit f8aa946 into master Nov 26, 2019
@paul-marechal paul-marechal deleted the mp/process-close branch November 26, 2019 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
process issues related to the process extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use close not exit process event
6 participants