-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
repl: fix/improve persistent repl history #2356
Conversation
Still failing for me.
|
Yep, that fixes it for me. We should probably run CI though to be safe. |
LGTM if the CI is happy |
Hmm, windows isn't liking the cleanup, maybe I'll just have to refresh the
|
Uh, ok.. Hrmmm. New windows (and ARM) failure from
|
I think it needed to wait for I/O to close. Fingers crossed... CI again: https://jenkins-iojs.nodesource.com/job/node-test-pull-request/88/ |
CI still not happy on Windows :[
|
I'm not sure what's up with that. Somehow this is failing: https://github.com/nodejs/node/blob/master/test/common.js#L15-L57 Specifically: https://github.com/nodejs/node/blob/master/test/common.js#L45-L48 I thought it might have been if the history file was written to after it starts clearing the files but I don't think that is possible... |
Might be a Windows quirk: isaacs/rimraf#72 I think it must be intermittent, but we should still attempt an workaround later. Maybe give the CI a few more runs? |
@Fishrock123 any update on this? |
@evanlucas on the back burner right now. I think It can be fixed by replacing the |
I think this can be worked around by running the |
Hopefully this last patch fixed those stupid windows issues. https://jenkins-iojs.nodesource.com/job/node-test-pull-request/182/ |
Hmm, the rebase failed on that. here's a manual run: https://jenkins-iojs.nodesource.com/job/node-test-commit/339/ |
Ugh. |
Might as well install a full rimraf and be done with it, I know that it can handle |
Ok this |
This test is already being investigated, but until a solution is found it should be marked flaky. Ref: nodejs#2319 Ref: nodejs#2356
This test is already being investigated, but until a solution is found it should be marked flaky. Ref: #2319 Ref: #2356 PR-URL: #2659 Reviewed-By: orangemocha - Alexis Campailla <[email protected]>
This test is already being investigated, but until a solution is found it should be marked flaky. Ref: #2319 Ref: #2356 PR-URL: #2659 Reviewed-By: orangemocha - Alexis Campailla <[email protected]>
This test is already being investigated, but until a solution is found it should be marked flaky. Ref: nodejs#2319 Ref: nodejs#2356 PR-URL: nodejs#2659 Reviewed-By: orangemocha - Alexis Campailla <[email protected]>
cc @nodejs/collaborators PTAL at the last commit |
17ad616
to
d4d9460
Compare
// Ensure everything that we expected was output | ||
assert.strictEqual(expected.length, 0); | ||
setImmediate(runTest); | ||
onClose(); | ||
}); |
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.
@silverwind @evanlucas can I get a last LGTM on this? this works without any even minor breaking changes now.
Ok, just pulled down and tested. I've run the tests hundreds of times now and haven't had them fail. LGTM |
d4d9460
to
d4dccd1
Compare
- Now cleans up the history file unless told otherwise. - Now also logs which test case failed. - Waits for flush after repl close if necessary. Fixes: nodejs#2319 PR-URL: nodejs#2356 Reviewed-By: Roman Reiss <[email protected]> Reviewed By: Evan Lucas <[email protected]>
Previously the wrong end of the history was limited on load. PR-URL: nodejs#2356 Reviewed-By: Roman Reiss <[email protected]> Reviewed By: Evan Lucas <[email protected]>
d4dccd1
to
73b7e05
Compare
Thanks, landed in d8db757...73b7e05 @nodejs/lts this is something we want in v4.x. |
- Now cleans up the history file unless told otherwise. - Now also logs which test case failed. - Waits for flush after repl close if necessary. Fixes: #2319 PR-URL: #2356 Reviewed-By: Roman Reiss <[email protected]> Reviewed By: Evan Lucas <[email protected]>
Previously the wrong end of the history was limited on load. PR-URL: #2356 Reviewed-By: Roman Reiss <[email protected]> Reviewed By: Evan Lucas <[email protected]>
Emitting 'close' before the history has flushed is somewhat incorrect and rather confusing. This also makes the 'close' event always asynchronous for consistency. Refs: nodejs#2356 PR-URL: nodejs#3435 Reviewed By: Evan Lucas <[email protected]> Reviewed-By: Trevor Norris <[email protected]>
Emitting 'close' before the history has flushed is somewhat incorrect and rather confusing. This also makes the 'close' event always asynchronous for consistency. Refs: #2356 PR-URL: #3435 Reviewed By: Evan Lucas <[email protected]> Reviewed-By: Trevor Norris <[email protected]>
- Now cleans up the history file unless told otherwise. - Now also logs which test case failed. - Waits for flush after repl close if necessary. Fixes: #2319 PR-URL: #2356 Reviewed-By: Roman Reiss <[email protected]> Reviewed By: Evan Lucas <[email protected]>
Previously the wrong end of the history was limited on load. PR-URL: #2356 Reviewed-By: Roman Reiss <[email protected]> Reviewed By: Evan Lucas <[email protected]>
- Now cleans up the history file unless told otherwise. - Now also logs which test case failed. - Waits for flush after repl close if necessary. Fixes: #2319 PR-URL: #2356 Reviewed-By: Roman Reiss <[email protected]> Reviewed By: Evan Lucas <[email protected]>
Previously the wrong end of the history was limited on load. PR-URL: #2356 Reviewed-By: Roman Reiss <[email protected]> Reviewed By: Evan Lucas <[email protected]>
Fix the history limiting to take the most recent. History additions are unshifted in readline.
Now tests the saved repl history size limiting.
Cleans up the test a bunch in the process, and also adds some debug so you can figure out which test case failed if it fails. Let me know if there is a better way to do that.