-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
add Node.js 8 to Travis CI #2086
Conversation
test/mocha/release.js
Outdated
@@ -8,7 +8,7 @@ function run(command, args, done) { | |||
process.stdout.write("\0"); | |||
}, 5 * 60 * 1000); | |||
spawn(command, args, { | |||
stdio: "ignore" | |||
stdio: [ "ignore", 1, 2 ] |
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.
Am I correct in assuming you want to ignore both stdout
and stderr
instead of just stdout
?
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.
Here I'm ignoring stdin
, and pipe both stdout
and stderr
out.
Used to be I just ignore them all to avoid getting flooded on the console, but now that I'm comfortable enough navigating around them, I think it makes sense to have Travis CI record these details down, so we can have extra data points for diagnosis and even say performance tracking via test/benchmark.js
timings.
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.
If this works out I will also be removing that process.stdout.write("\0");
at 5min intervals, as that was a workaround for Travis CI (& none of the individual scripts from test/benchmark.js
or test/jetstream.js
should take more than 10 minutes to be uglified).
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.
FYI, these extra lines are the result of the aforementioned change:
https://travis-ci.org/mishoo/UglifyJS2/jobs/242117329#L1299-L1402
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.
Good idea. I guess we'll know in a few minutes why it's failing.
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.
travis timeout on node 0.12:
https://travis-ci.org/mishoo/UglifyJS2/builds/242114674?utm_source=github_status&utm_medium=notification
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.
Just saw that - job restarted 👍
So it looks to me that with Node.js 8, |
Spawned processes are inherently unreliable. Wouldn't surprise me if a bug cropped up in node 8 as historically node has had problems with flushing streams upon If |
I can just force |
God knows what node is doing at that point. Probably deadlocked itself or waiting for something to close that will never happen. |
If there is indeed something left in the event dispatch loop that prevents $ git clean -xdf
$ npm install --no-optional --no-save
$ set UGLIFYJS_TEST_ALL=1
$ npm test and I have yet to observe any failures locally. |
test/jetstream.js
Outdated
@@ -64,6 +64,7 @@ if (typeof phantom == "undefined") { | |||
server.close(); | |||
if (code) throw new Error("JetStream failed!"); | |||
console.log("JetStream completed successfully."); | |||
process.exit(); |
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.
Use process.exit(0);
to convey it's a success.
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.
Done in df1c48e
With the addition of |
node 0.12 timed out: https://travis-ci.org/mishoo/UglifyJS2/jobs/242153107 Here's an idea - can you do a SHA1 or MD5 checksum on each JS file with the CLI options prepended to it and cache the uglify result in memory the first time it is run? Since the jetstream tests are run 3 times each it should cut the runtime by 66%. |
Heh - we are only running those tests once 😉 |
Curses! Foiled again! |
What it does show is the console I/O seems to play a significant part in job performance. Now this could be Travis having transient slowdown, so we'll need to run more of them in the near future to see if the pattern holds. |
- explicitly terminate `test/jetstream.js` upon completion - log verbose output from `test/benchmark.js` & `test/jetstream.js` - remove obsolete workaround for Travis CI
Pure speculation: when there's an I/O event the job gets demoted in priority. What else could explain how these tests take 5 minutes locally and 50 minutes on travis CI? How many active uglify sub-processes are active at any point in time? You know how most browsers have 6 connections to the same web server to parallelize downloads - can we limit that concurrency on the PhantomJS fake browser client to just 2 max? |
JetStream benchmark itself seems to only download the relevant script files, one after another, right before executing them. So regardless of the parallelism offered by As for the I/O, I think they are storing that in some form of database backend, which seems to frequently be the cause of slow-downs / outages judging from their status page. Edit: for instance, https://www.traviscistatus.com/incidents/93wfcv0ksqrz |
Can we store the Jetstream JS and html files in the uglify repo to not incur as much I/O? I think it's a job priority problem. |
Oh you mean the network I/O over the Internet? I was comparing Storing the full copy of JetStream locally seems a little excessive. Technically, we can make the CI job go fetch (via |
Yes.
Anything's possible. Just throwing out ideas.
That could work. |
closes #2081