-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
misc(build): set correct exit code when build scripts fail #13459
Conversation
FWIW that's only true in Node 14. In Node 15+ unhandled rejections throw and exit with status code 1. |
@@ -32,7 +32,7 @@ | |||
* @property {Run[]} runs | |||
*/ | |||
|
|||
import {strict as assert} from 'assert'; | |||
import assert from 'assert/strict'; |
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.
'assert/strict'
also added in Node 15 :)
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.
Y'all could maybe beef up the PR descriptions because it took me a bit of debugging to figure out what was going wrong for me is apparently what is being fixed here :P
This is from yarn build-smokehouse-bundle
failing on polyfilling assert.strict
, but we only yarn build-all
in ci.yml
, which is Node 14 only, so the action wasn't failing?
Ideally we could get their polyfill updated if we're going to keep using it (even browserify's polyfill has strict
), but for now we could switch to just assert
but manually use assert.strictEqual
and assert.deepStrictEqual
instead of assert.equal
and assert.deepEqual
. Not a huge deal.
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.
This is from yarn build-smokehouse-bundle failing on polyfilling assert.strict
yup
but we only yarn build-all in ci.yml, which is Node 14 only, so the action wasn't failing?
The GH action wasn't (because of wrong exit codes), correct. The import into google3 (see import_tool) was spitting out errors while bundling smokehouse but still chugging along.
Hmm, this doesn't appear to fix the This matches what happens locally for me in Node 16 (where unhandled rejections throw so Is it the Line 17 in a6bcbf2
|
should we just add |
These scripts don't exit with 1 as expected when they fail. They should else they be footguns.