-
Notifications
You must be signed in to change notification settings - Fork 30k
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
doc: run tests before landing changes #12416
Conversation
COLLABORATOR_GUIDE.md
Outdated
@@ -444,6 +444,10 @@ commit logs, ensure that they are properly formatted, and add | |||
* The commit message text must conform to the | |||
[commit message guidelines](./CONTRIBUTING.md#step-3-commit). | |||
|
|||
Run tests (`make test` or `vcbuild test`). Even though there was a successful |
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.
We are losing the -j8
information now :(
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.
+1, I think we standardised on -j4
, so it should probably be make -j4 test
. I know it doesn't make the tests any faster, but if a rebuild is necessary it will help with that.
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.
Right now:
make test
shows up in:
- BUILDING.md
- CONTRIBUTING.md
- doc/guides/building-node-with-ninja.md:
make -j4 test
shows up in:
- .github/PULL_REQUEST_TEMPLATE.md
- CONTRIBUTING.md
- doc/onboarding-extras.md:
But this doc is the only place where make -j8 test
shows up.
I think we should standardize on something in a different PR. And in fact, I might go off and do that right...about....now!
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.
Thanks for the Windows inclusion. We are people too 😉 (maybe foolish but people).
Also #12281 vcbuild test
can easily take 30 minutes after even a minor change.
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.
Also #12425 when I solve it, need to update this.
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.
I think we should standardize on something in a different PR. And in fact, I might go off and do that right...about....now!
Looks like that became: #12437
Am I expected to run the test locally for changes? I don't run the tests locally for most changes I land - I only do so if there were changes since the CI run and if it's not a doc change or similar (or if I wrote the changed code). |
I usually run the linter locally to make sure nothing weird happened, but I agree that the default should be to rerun CI if the PR has been updated since it was last run, at which point there's no real need to do more than |
Also, I don't trust the tests on my computer (since it's just one platform) and tests are run by the release team anyway before releases - right? |
So … I don’t know about others, but I do run I don’t think that has ever really happened to me, though. 😄 |
@benjamingr IMHO the repo should be green. Always. Not just for releases, but out of respect for the other devs. You need a clear table to work on, so if you see a problem you can be sure it's caused by you, and not something you inherited. @Trott I'm in the opinion that landing should not be a cut & run thing (re last Friday night and #12279). Landing should be done when the responsible party is available to field issues |
☝️ This, exactly. I know some Collaborators don't run the tests locally when landing a PR. But I do recommend that you do that, but if not, then please at least run the linter as @gibfahn suggests. That will catch the most frequent cause of issues: Since the last CI run, a new lint rule has landed and the code in the PR doesn't conform to the new lint rule, causing CI to go red after the PR lands. My ideal solution to the "changes have happened since the last CI run" issue is to automate the landing process: Basically, tell Jenkins, "time to land PR 12345." Jenkins checks the commit message formatting etc., runs CI, and only after a clean CI, lands on master. If something else landed on master while the CI was running, Jenkins sees that and starts over again. Node.js experimented with a Jenkins job like this about (I think) 2 years ago or so. At the time, CI was considerably more brittle than it is now, and so it was kind of a disaster. I think the experience has permanently scared some people from wanting to try again. I hope we do get there, though. More automation of our processes that ought to be mechanical, please, kthxbai. |
At the very least, I will |
I'll preserve |
The Collaborator Guide suggests running tests after pushing changes to the main repository. Tests should be run before then so move the instructions earlier. Instructions are also simplified and re-written to not exclude Windows.
Also took the opportunity to clarify that the "other changes may have landed" is "on master" and not on the PR branch. So hopefully that will clear up some of the confusion that occurred above! |
The Collaborator Guide suggests running tests after pushing changes to the main repository. Tests should be run before then so move the instructions earlier. Instructions are also simplified and re-written to not exclude Windows. PR-URL: #12416 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Landed in 1e7f6b1 |
The Collaborator Guide suggests running tests after pushing changes to the main repository. Tests should be run before then so move the instructions earlier. Instructions are also simplified and re-written to not exclude Windows. PR-URL: #12416 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
The Collaborator Guide suggests running tests after pushing changes to the main repository. Tests should be run before then so move the instructions earlier. Instructions are also simplified and re-written to not exclude Windows. PR-URL: #12416 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
The Collaborator Guide suggests running tests after pushing changes to the main repository. Tests should be run before then so move the instructions earlier. Instructions are also simplified and re-written to not exclude Windows. PR-URL: #12416 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
The Collaborator Guide suggests running tests after pushing changes to the main repository. Tests should be run before then so move the instructions earlier. Instructions are also simplified and re-written to not exclude Windows. PR-URL: #12416 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
The Collaborator Guide suggests running tests after pushing changes to the main repository. Tests should be run before then so move the instructions earlier. Instructions are also simplified and re-written to not exclude Windows. PR-URL: #12416 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
The Collaborator Guide suggests running tests after pushing changes to the main repository. Tests should be run before then so move the instructions earlier. Instructions are also simplified and re-written to not exclude Windows. PR-URL: nodejs/node#12416 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
The Collaborator Guide suggests running tests after pushing changes to
the main repository. Tests should be run before then so move the
instructions earlier.
Instructions are also simplified and re-written to not exclude Windows.
Checklist
Affected core subsystem(s)
doc