Skip to content

Commit 7d95d9a

Browse files
[docs] add language about flaky tests / issues for them (#6837)
Flaky tests happen and when they are encountered in CI, we should have tickets for them. This adds some language that to effect to the contrib and dev docs. Published updated sections * https://www.pantsbuild.org/staging/nhoward-test-site/howto_contribute.html#iterating * https://www.pantsbuild.org/staging/nhoward-test-site/howto_develop.html#dev_run_all_tests
1 parent be75d11 commit 7d95d9a

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

src/docs/howto_contribute.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,16 @@ If at any point you need to make changes that will fundamentally overhaul a revi
192192
consider temporarily removing the `reviewable` label in order to let reviewers know
193193
to hold off until the code is ready.
194194

195+
#### CI Failing?
196+
197+
If your pull request fails in travis, you can look at the shard logs to see the
198+
failure cause. From that log, you can figure out what tests you need to run to reproduce the failure
199+
locally. If you cannot reproduce the failure locally and it looks unrelated to your change, please
200+
open an issue for it with the label
201+
(`flaky-test`)[https://github.com/pantsbuild/pants/labels/flaky-test]. You can also ping slack to
202+
ask for someone to restart the failing shard.
203+
(<a pantsref="dev_run_all_tests">More on checking CI test runs here</a>)
204+
195205
### Committing a Change
196206

197207
At this point you've made a change, had it reviewed (and received one or more Ship Its!) and

src/docs/howto_develop.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ a pull request, and allow travis to run them. You can reproduce failures by runn
154154
$ ./build-support/bin/ci.sh
155155

156156
with whatever relevant flags reproduce the failure (`./build-support/bin/ci.sh -h` will list the
157-
available flags).
157+
available flags). The relevant flags are in the log for the shard on a line that looks something
158+
like `Executing ./build-support/bin/ci.sh "-c3 -i 0/6" ...`.
158159

159160
To run just Pants' *unit* tests (skipping the can-be-slow integration tests), filter out
160161
the python tests tagged with 'integration':
@@ -181,6 +182,13 @@ not your fork. If you are posting a review request, put the pull request number
181182
field. Then, when you close the request, you can navigate from the bug number to easily close
182183
the pull request.
183184

185+
If your CI-build failed in Travis-CI, and the failure looks like it's not due to
186+
your change, please open an issue with the part of the CI log containing the test failure and label
187+
the issue with `flaky-test`. If an issue already exists, add a comment to it noting that you
188+
encountered it too. After you've done that, you can ask in slack for someone to restart the shard.
189+
That will cause the shard to re-run its tests.
190+
191+
184192
Debugging
185193
---------
186194

0 commit comments

Comments
 (0)