PRs are commented even with comment: off

At GitHub - python-pillow/Pillow: The friendly PIL fork (Python Imaging Library) 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. Convert various tests to pytest style by radarhere · Pull Request #4391 · python-pillow/Pillow · GitHub).

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: bpo-39802: Only implement set_escdelay and set_tabsize when curses extensions are activated by isidentical · Pull Request #18705 · python/cpython · GitHub

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: Convert to use pytest by hugovk · Pull Request #4462 · python-pillow/Pillow · GitHub

This is it on Codecov: Codecov

From PR Convert to use pytest by hugovk · Pull Request #4462 · python-pillow/Pillow · GitHub, you can see we deleted the comment from the codecov bot at Convert to use pytest by hugovk · Pull Request #4462 · python-pillow/Pillow · GitHub.

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.