This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Don't run Python and C coverage jobs of Travis CI on pull requests
Type: Stage: resolved
Components: Build Versions: Python 3.10, Python 3.9, Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: miss-islington, shihai1991, vstinner
Priority: normal Keywords: patch

Created on 2020-06-16 14:58 by vstinner, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 20916 merged vstinner, 2020-06-16 15:02
PR 20917 merged miss-islington, 2020-06-16 15:27
PR 20918 merged miss-islington, 2020-06-16 15:27
Messages (11)
msg371661 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-06-16 14:58
Currently, Travis CI runs C coverage and Python coverage jobs on all pull requests. This is a waste of resources: we should only run these jobs on branches like master.

Attached PR skips these jobs on pull requests.

Not only it's a waste of resources, but it seems like it's not longer possible to merge a PR as soon as Travis CI required jobs pass: a PR can only be merged when *all* Travis CI jobs complete. Problem: while a full test suite run takes around 20 min, coverage jobs take longer than 40 minutes.

By the way, the C coverage job fails with timeout, but that's a different issue.
msg371662 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-06-16 15:02
Concrete issue: on my PR 20915, Travis CI mandatory jobs completed successfully but I wasn't able to merge the PR since GitHub says "travis-ci/pr Pending — The Travis CI build is in progress".

I cancelled the last running coverage job... but I was still unable to merge the PR, since Travis CI didn't report the status to GitHub.

I had to reschedule all Travis CI jobs...
msg371663 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-06-16 15:03
See also "Travis CI doesn't report its status or doesn't run on Python pull requests":
https://github.com/python/core-workflow/issues/371
msg371664 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-06-16 15:06
See also bpo-40237: "Test code coverage (C) job of Travis CI fails on test_distutils which creates _configtest.gcno file".
msg371667 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-06-16 15:09
Documentation about skipping jobs on pull requests:
https://docs.travis-ci.com/user/pull-requests/#how-pull-requests-are-built

I don't think that the following method works for the issue:

"To only build on push events not on pull requests, disable Build on Pull Requests in your repository settings."

That would disable all jobs, not only coverage jobs.
msg371669 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-06-16 15:27
New changeset fc710ee266e9461fdba9933ec6004318db588820 by Victor Stinner in branch 'master':
bpo-40993: Don't run Travis CI coverage on PRs (GH-20916)
https://github.com/python/cpython/commit/fc710ee266e9461fdba9933ec6004318db588820
msg371673 - (view) Author: miss-islington (miss-islington) Date: 2020-06-16 15:47
New changeset 3cf809475a93228a3cb310b4d10d38f3b9d44c1f by Miss Islington (bot) in branch '3.9':
bpo-40993: Don't run Travis CI coverage on PRs (GH-20916)
https://github.com/python/cpython/commit/3cf809475a93228a3cb310b4d10d38f3b9d44c1f
msg371674 - (view) Author: miss-islington (miss-islington) Date: 2020-06-16 15:47
New changeset 071bed842eeff9673bc5c4f64e3916a151132d2a by Miss Islington (bot) in branch '3.8':
bpo-40993: Don't run Travis CI coverage on PRs (GH-20916)
https://github.com/python/cpython/commit/071bed842eeff9673bc5c4f64e3916a151132d2a
msg371677 - (view) Author: Hai Shi (shihai1991) * (Python triager) Date: 2020-06-16 15:52
> Attached PR skips these jobs on pull requests.
I am not familiar with travis ci. coverage jobs can tell us how many features need add unit tests. Can we use other CI services to do this job? MAYBE in checks gate or something other services like buildbot.python.org?
msg371680 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-06-16 16:12
> coverage jobs can tell us how many features need add unit tests.

Coverage jobs are still run with my changes. https://codecov.io/gh/python/cpython is still updated.

My change only stops running coverage jobs on pull requests.
msg371682 - (view) Author: Hai Shi (shihai1991) * (Python triager) Date: 2020-06-16 16:25
> Coverage jobs are still run with my changes.
> https://codecov.io/gh/python/cpython is still updated.

Copy that, thanks.
History
Date User Action Args
2022-04-11 14:59:32adminsetgithub: 85165
2020-06-16 19:20:27vstinnersetstatus: open -> closed
stage: patch review -> resolved
resolution: fixed
versions: + Python 3.8, Python 3.9
2020-06-16 16:25:17shihai1991setmessages: + msg371682
2020-06-16 16:12:35vstinnersetmessages: + msg371680
2020-06-16 15:52:07shihai1991setmessages: + msg371677
2020-06-16 15:47:23miss-islingtonsetmessages: + msg371674
2020-06-16 15:47:23miss-islingtonsetmessages: + msg371673
2020-06-16 15:32:23shihai1991setnosy: + shihai1991
2020-06-16 15:27:57miss-islingtonsetpull_requests: + pull_request20097
2020-06-16 15:27:49vstinnersetmessages: + msg371669
2020-06-16 15:27:49miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request20096
2020-06-16 15:09:47vstinnersetmessages: + msg371667
2020-06-16 15:06:04vstinnersetmessages: + msg371664
2020-06-16 15:03:15vstinnersetmessages: + msg371663
2020-06-16 15:02:40vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request20095
2020-06-16 15:02:28vstinnersetmessages: + msg371662
2020-06-16 14:58:58vstinnercreate