PRs are commented even with comment: off

At https://github.com/python-pillow/Pillow our codecov.yml looks like this:

# Documentation: https://docs.codecov.io/docs/codecov-yaml

codecov:
  # Avoid "Missing base report" due to committing CHANGES.rst with "[CI skip]"
  # https://github.com/codecov/support/issues/363
  # https://docs.codecov.io/docs/comparing-commits
  allow_coverage_offsets: true

comment: false

# Matches 'omit:' in .coveragerc
ignore:
  - "Tests/32bit_segfault_check.py"
  - "Tests/bench_cffi_access.py"
  - "Tests/check_*.py"
  - "Tests/createfontdatachunk.py"

It’s used on Travis CI and AppVeyor. For GitHub Actions, we first copy an identical file to the root, except it includes a token:

# Documentation: https://docs.codecov.io/docs/codecov-yaml

codecov:
  # Avoid "Missing base report" due to committing CHANGES.rst with "[CI skip]"
  # https://github.com/codecov/support/issues/363
  # https://docs.codecov.io/docs/comparing-commits
  allow_coverage_offsets: true

  token: <snip>

comment: false

# Matches 'omit:' in .coveragerc
ignore:
  - "Tests/32bit_segfault_check.py"
  - "Tests/bench_cffi_access.py"
  - "Tests/check_*.py"
  - "Tests/createfontdatachunk.py"

However, we’ve recently started getting comments on PRs.

I noticed the docs have recently changed from comment: off (22 Sept 2019) to comment: false (17 Jan 2020 and today).

We did have comment: off so changed it to comment: false, but still we get comments (eg. https://github.com/python-pillow/Pillow/pull/4391).

The two files validate properly using curl --data-binary @codecov.yml https://codecov.io/validate.

Are we doing something wrong? How can we disable comments on PRs in this repo?

Thanks!

1 Like

This is still happening a month later.

Please can someone help? Thanks!

1 Like

We’re experiencing the same thing on the python project. This pull request for example had a comment posted on it by codecov: https://github.com/python/cpython/pull/18705#issuecomment-592984756

In spite of the fact that the Yaml shown to be used for it (https://codecov.io/gh/python/cpython/commit/0aa297417efaf33f2a777e115b9f14be99bc23ab/builds) shows:

comment: off

This seems to be a recent problem and was not happening before.

@hi @ammaraskar

Please move your codecov.yml file to the repo root and let me know if that does not correct things.

Can you provide a recent SHA so I can check the logs?

Here’s one from today: https://github.com/python-pillow/Pillow/pull/4462/commits/94d0c7c9ff9df75b08e1420fab5288d39cbc4f12

This is it on Codecov: https://codecov.io/gh/python-pillow/Pillow/commit/94d0c7c9ff9df75b08e1420fab5288d39cbc4f12

From PR https://github.com/python-pillow/Pillow/pull/4462, you can see we deleted the comment from the codecov bot at https://github.com/python-pillow/Pillow/pull/4462#event-3096153585.

Thanks for checking!

This is very strange. The YAML was found and parsed correctly with comment: false, and I can’t find where we created this in the logs. Let me dig deeper.

1 Like

I located the comment. I suspect what happened was Codecov detected that the PR already had a comment and thus ignored the the setting in the YAML. It tried to edit it, failed, and created a new one.

We have a new notify task that we are slowly rolling out that probably handles this better. I have whitelisted you for this, please give us 15-30 mins for the pods to roll and then let me know if you continue to see this behavior.

1 Like

Looks like we’re good now, possibly also related to:

Thanks!

Great! Glad to hear it is working. And yes tokenless GHA came out pretty recently.