Skip to content
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

Automatically open an issue when a tool breaks #56951

Merged
merged 8 commits into from
Feb 13, 2019

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Dec 18, 2018

@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 18, 2018
@nikomatsakis
Copy link
Contributor

r? @kennytm

@nikomatsakis
Copy link
Contributor

This is awesome— can we make it be automatically T-compiler and I-nominated? (I'm assuming T-compiler will always be the appropriate team)

@kennytm
Copy link
Member

kennytm commented Dec 18, 2018

I'm not sure if this is a good idea as RLS is known to sometimes fail spuriously (recent example: #56161 (comment) → "fixed" by #56461 (comment)).

@phansch
Copy link
Member

phansch commented Dec 19, 2018

This probably would mention the wrong person/PR when a rollup caused breakage, right?

@kennytm
Copy link
Member

kennytm commented Dec 19, 2018

For rollups it would mention the person who created the rollup (same as today), but since the rollupers are also Rust team members they could just edit the issue to point to the actual cause.

What I worried is blaming new contributors over something not related to their code.

@oli-obk
Copy link
Contributor Author

oli-obk commented Dec 19, 2018

What I worried is blaming new contributors over something not related to their code.

due to the spurious case? We could just do this for rustfmt and clippy for now until rls isn't spurious anymore.

@kennytm
Copy link
Member

kennytm commented Dec 19, 2018

@oli-obk Yes due to spurious cases. What if we submit the issue only if the state is degraded to build-fail, which won't be spurious?

@oli-obk
Copy link
Contributor Author

oli-obk commented Dec 19, 2018

I pushed some changes, not sure if they actually do what they're supposed to. Are we really using < and > to compare the strings build-fail, test-fail, test-pass and that just happens to work out because of the lexical ordering of fail and pass and the lexical ordering of build and test?

@kennytm
Copy link
Member

kennytm commented Dec 19, 2018

@oli-obk

Are we really using < and > to compare the strings build-fail, test-fail, test-pass and that just happens to work out because of the lexical ordering of fail and pass and the lexical ordering of build and test?

Yes 😛

@nikomatsakis
Copy link
Contributor

nikomatsakis commented Dec 19, 2018

I think that in terms of "blaming" contributors, we should just be careful with our wording, and make sure to cc enough folks from the team.

Is the plan to ignore test failures and just focus on build failures? That seems "ok" to start.

I would like to see the template be something a bit more friendly and perhaps include a bit more information. Maybe something like this?


issue title: {TOOL} no longer builds after PR #{PR}

Hello, this is your friendly neighborhood mergebot. After merging PR #{PR}, I observed that the tool {TOOL} no longer builds. A follow-up PR to the repository {TOOL_REPOSITORY} is needed to fix the fallout.

cc @{PR_AUTHOR}, do you think you would have time to do the follow-up work? If so, that would be great!

cc @{PR_REVIEWER}, the PR reviewer, and @rust-lang/compiler -- nominating for prioritization.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:2bc5a7ee:start=1545237978429117636,finish=1545238035323829083,duration=56894711447
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---

[00:03:02] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:03:02] tidy error: /checkout/src/tools/publish_toolstate.py:78: line longer than 100 chars
[00:03:02] tidy error: /checkout/src/tools/publish_toolstate.py:147: line longer than 100 chars
[00:03:02] tidy error: /checkout/src/tools/publish_toolstate.py:171: line longer than 100 chars
[00:03:03] some tidy checks failed
[00:03:03] 
[00:03:03] 
[00:03:03] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:03:03] 
[00:03:03] 
[00:03:03] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:03:03] Build completed unsuccessfully in 0:00:43
[00:03:03] Build completed unsuccessfully in 0:00:43
[00:03:03] Makefile:79: recipe for target 'tidy' failed
[00:03:03] make: *** [tidy] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:22644c00
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Wed Dec 19 16:50:27 UTC 2018
---
travis_time:end:189241f0:start=1545238228319777533,finish=1545238228324256399,duration=4478866
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0ba2a63f
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:00182946
travis_time:start:00182946
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:0277539b
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@kennytm kennytm added T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. labels Dec 22, 2018
Copy link
Member

@kennytm kennytm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest LGTM, but I'd like to first go through an FCP after the holiday (next week).

src/tools/publish_toolstate.py Outdated Show resolved Hide resolved
@Centril Centril added S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 24, 2018
@kennytm kennytm added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Dec 29, 2018
@oli-obk
Copy link
Contributor Author

oli-obk commented Feb 12, 2019

@bors r=kennytm

@bors
Copy link
Contributor

bors commented Feb 12, 2019

📌 Commit 6ed4401 has been approved by kennytm

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). labels Feb 12, 2019
@bors
Copy link
Contributor

bors commented Feb 12, 2019

⌛ Testing commit 6ed4401 with merge 39817c1...

bors added a commit that referenced this pull request Feb 12, 2019
Automatically open an issue when a tool breaks

cc @nikomatsakis

fixes rust-lang-nursery/rust-toolstate#6

documentation about issue opening via the github api: https://developer.github.com/v3/issues/#create-an-issue
@bors
Copy link
Contributor

bors commented Feb 12, 2019

💔 Test failed - status-appveyor

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 12, 2019
@mati865
Copy link
Contributor

mati865 commented Feb 12, 2019

Command exited with code 259

#58160

@kennytm
Copy link
Member

kennytm commented Feb 12, 2019

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 12, 2019
@bors
Copy link
Contributor

bors commented Feb 12, 2019

⌛ Testing commit 6ed4401 with merge a7902ab0ad5d6cd149d02b5651dd387f4b9507c5...

@bors
Copy link
Contributor

bors commented Feb 12, 2019

💔 Test failed - checks-travis

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 12, 2019
@rust-highfive
Copy link
Collaborator

The job dist-i686-apple of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
Building stage2 tool cargo (i686-apple-darwin)
[01:07:59]  Downloading crates ...
[01:07:59] warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates.io)
[01:07:59] warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates.io)
[01:07:59] error: failed to download from `https://crates.io/api/v1/crates/openssl-src/111.1.0+1.1.1a/download`
[01:07:59] Caused by:
[01:07:59]   [6] Couldn't resolve host name (Could not resolve host: crates.io)
[01:07:59] command did not execute successfully: "/Users/travis/build/rust-lang/rust/build/i686-apple-darwin/stage0/bin/cargo" "build" "--target" "i686-apple-darwin" "-j" "4" "--release" "--locked" "--color" "always" "--manifest-path" "/Users/travis/build/rust-lang/rust/src/tools/cargo/Cargo.toml" "--features" "rustc-workspace-hack/all-static" "--message-format" "json"
[01:07:59] expected success, got: exit code: 101
[01:07:59] expected success, got: exit code: 101
[01:07:59] failed to run: /Users/travis/build/rust-lang/rust/build/bootstrap/debug/bootstrap build
[01:07:59] Build completed unsuccessfully in 1:03:39
[01:07:59] make: *** [all] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:351e2e2e
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Tue Feb 12 23:28:18 GMT 2019
---
travis_fold:start:after_failure.2
travis_time:start:004f399c
$ ls -lat $HOME/Library/Logs/DiagnosticReports/
total 0
drwx------+ 15 travis  staff  510 Jan 25  2018 ..
drwx------   2 travis  staff   68 Dec  6  2017 .
travis_fold:end:after_failure.2
travis_fold:start:after_failure.3
travis_time:start:06e92be4
$ find $HOME/Library/Logs/DiagnosticReports -type f -name '*.crash' -not -name '*.stage2-*.crash' -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash' -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \; -exec head -750 {} \; -exec echo travis_fold":"end:crashlog \; || true
$ find $HOME/Library/Logs/DiagnosticReports -type f -name '*.crash' -not -name '*.stage2-*.crash' -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash' -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \; -exec head -750 {} \; -exec echo travis_fold":"end:crashlog \; || true
travis_time:end:06e92be4:start=1550014104119842000,finish=1550014104148783000,duration=28941000
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0ed34a82
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:205b9c25
travis_time:start:205b9c25
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:027aca82
$ dmesg | grep -i kill
$ dmesg | grep -i kill
Unable to obtain kernel buffer: Operation not permitted
usage: sudo dmesg
travis_fold:end:after_failure.6

Done. Your build exited with 1.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@kennytm
Copy link
Member

kennytm commented Feb 13, 2019

@bors retry 🤔

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 13, 2019
.format(tool, os, old, new)
message += '{} (cc {}, @rust-lang/infra).\n' \
.format(title, MAINTAINERS.get(tool))
# only create issues for build failures. Other failures can be spurious
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far, at least for Miri, every single case of "test-fail" was a real failure.

Copy link
Contributor

@Centril Centril Feb 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to special-case miri in a follow-up PR?

@bors
Copy link
Contributor

bors commented Feb 13, 2019

⌛ Testing commit 6ed4401 with merge e544947...

bors added a commit that referenced this pull request Feb 13, 2019
Automatically open an issue when a tool breaks

cc @nikomatsakis

fixes rust-lang-nursery/rust-toolstate#6

documentation about issue opening via the github api: https://developer.github.com/v3/issues/#create-an-issue
@bors
Copy link
Contributor

bors commented Feb 13, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: kennytm
Pushing e544947 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 13, 2019
@bors bors merged commit 6ed4401 into rust-lang:master Feb 13, 2019
@oli-obk oli-obk deleted the auto_toolstate_issue branch March 16, 2021 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File issues automatically