Skip to content

Conversation

samestep
Copy link
Contributor

@samestep samestep commented Oct 28, 2020

Fixes #46985.

Question: Can someone comment on whether the "Run flake8" step should fail if flake8 produces errors? This PR makes sure the errors are still shown, but the job linked from the issue also shows that the failure of that step seems to have caused the "Add annotations" step not to run.

Is this what we want, or should I instead revert back to the --exit-zero behavior (in this case by just removing the -o pipefail from this PR) that we had before #46740? And if the latter, then (how) should I modify this flake8-py3 job to make sure it fails when flake8 fails (assuming it didn't already do that?)

@samestep samestep requested a review from a team October 28, 2020 15:57
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@samestep has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@dr-ci
Copy link

dr-ci bot commented Oct 28, 2020

💊 CI failures summary and remediations

As of commit a299030 (more details on the Dr. CI page):


  • 1/1 failures introduced in this PR

🕵️ 1 new failure recognized by patterns

The following CI failures do not appear to be due to upstream breakages:

See CircleCI build pytorch_linux_xenial_py3_6_gcc5_4_build (1/1)

Step: "Build" (full log | diagnosis details | 🔁 rerun)

Oct 28 16:04:27 sccache: error: couldn't connect to server
Oct 28 16:04:27 +++ eval 'extract_trap_cmd ' 
Oct 28 16:04:27 ++++ extract_trap_cmd 
Oct 28 16:04:27 ++++ printf '%s\n' '' 
Oct 28 16:04:27 +++ printf '%s\n' cleanup 
Oct 28 16:04:27 ++ trap -- ' 
Oct 28 16:04:27 cleanup' EXIT 
Oct 28 16:04:27 ++ [[ pytorch-linux-xenial-py3.6-gcc5.4-build != *pytorch-win-* ]] 
Oct 28 16:04:27 ++ which sccache 
Oct 28 16:04:27 ++ sccache --stop-server 
Oct 28 16:04:27 Stopping sccache server... 
Oct 28 16:04:27 sccache: error: couldn't connect to server 
Oct 28 16:04:27 sccache: caused by: Connection refused (os error 111) 
Oct 28 16:04:27 ++ true 
Oct 28 16:04:27 ++ rm /var/lib/jenkins/sccache_error.log 
Oct 28 16:04:27 rm: cannot remove '/var/lib/jenkins/sccache_error.log': No such file or directory 
Oct 28 16:04:27 ++ true 
Oct 28 16:04:27 ++ [[ pytorch-linux-xenial-py3.6-gcc5.4-build == *rocm* ]] 
Oct 28 16:04:27 ++ SCCACHE_ERROR_LOG=/var/lib/jenkins/sccache_error.log 
Oct 28 16:04:27 ++ SCCACHE_IDLE_TIMEOUT=1200 
Oct 28 16:04:27 ++ RUST_LOG=sccache::server=error 
Oct 28 16:04:27 ++ sccache --start-server 

This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 1 time.

@walterddr
Copy link
Contributor

flake8 should fail the PR IMO. doesn't make sense to check in code that doesn't pass linter.

@samestep
Copy link
Contributor Author

flake8 should fail the PR IMO. doesn't make sense to check in code that doesn't pass linter.

Agreed; so, this PR would make flake8 fail the PR (as it should), but it seems like it would also prevent the following "Add annotations" step from running, if flake8 fails. Is that what we want?

@facebook-github-bot
Copy link
Contributor

@samestep merged this pull request in 1e275bc.

facebook-github-bot pushed a commit that referenced this pull request Nov 2, 2020
Summary:
In #46990 I asked whether the "Run flake8" step was supposed to always succeed (so that the "Add annotations" step would be sure to run). The reviewers and I weren't sure of the answer to that question, so we merged it anyway, but that turned out to be wrong: https://github.com/pytorch/pytorch/runs/1327599980 So this PR fixes that issue introduced by #46990.

Pull Request resolved: #47236

Reviewed By: janeyx99

Differential Revision: D24692359

Pulled By: samestep

fbshipit-source-id: c12382de6945245d6251ce792896e5e688f480af
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flake8 errors are not shown by github actions

3 participants