Disable all intereactions on PRs

Description

We’re trying to disable all codecov interactions with a PR, though we still want to upload reports.
So far it seems like we’ve been successful in disabling comments, but we still randomly get a commit status from codecov.

How do we disable all codecov interactions with a PR?

Repository

The PR in question:

The report:

https://codecov.io/gh/saltstack/salt/compare/cdca5aafe01823fc01bad3c0f3cd41dd82f5192c...fdbd555857a5191492ddd4fd4397142388d13eb7

The config:

Versions

Latest bash uploader, any other version is likely unrelated, please suggest otherwise.

I guess what’s missing is:

coverage:
  status:
      project:
        default:
          enabled: no

?

Hey @s0undt3ch, did this work for you?

No.

The yaml that codecov reports on the project’s settings is:

{
    "codecov": {
        "branch": "master", 
        "ci": [
            "drone.saltstack.com", 
            "jenkinsci.saltstack.com"
        ], 
        "notify": {}, 
        "require_ci_to_pass": false
    }, 
    "comment": false, 
    "coverage": {
        "precision": 2, 
        "range": [
            70.0, 
            100.0
        ], 
        "round": "up", 
        "status": {
            "changes": {
                "default": {
                    "enabled": false, 
                    "if_ci_failed": "success", 
                    "if_no_uploads": "success", 
                    "if_not_found": "success"
                }
            }, 
            "patch": {
                "default": {
                    "enabled": false, 
                    "if_ci_failed": "success", 
                    "if_no_uploads": "error", 
                    "if_not_found": "success", 
                    "target": 80.0
                }
            }, 
            "project": {
                "default": {
                    "enabled": true, 
                    "if_ci_failed": "success", 
                    "if_no_uploads": "error", 
                    "if_not_found": "success"
                }
            }
        }
    }, 
    "ignore": [
        "^[^\\/]+.py$", 
        "^doc/.*", 
        "^tests/.*"
    ], 
    "parsers": {
        "gcov": {
            "branch_detection": {
                "conditional": true, 
                "loop": true, 
                "macro": false, 
                "method": false
            }
        }, 
        "javascript": {
            "enable_partials": false
        }
    }
}

However, the current config in our master branch differs:

Event though, no errors were reported:

cat .codecov.yml | curl --data-binary @- https://codecov.io/validate
Valid!

{
  "ignore": [
    "^[^\\/]+.py$",
    "^doc/.*",
    "^salt/ext/.*"
  ],
  "comment": false,
  "flags": {
    "tests": {
      "carryforward": true,
      "paths": [
        "^tests/.*"
      ]
    },
    "salt": {
      "carryforward": true,
      "paths": [
        "^salt/.*"
      ]
    }
  },
  "coverage": {
    "status": {
      "project": {
        "default": {
          "informational": true
        },
        "tests": {
          "if_ci_failed": "error",
          "paths": [
            "^!salt/.*"
          ],
          "base": "auto",
          "target": "auto",
          "if_not_found": "success",
          "if_no_uploads": "error"
        },
        "salt": {
          "if_ci_failed": "error",
          "paths": [
            "^!tests/.*"
          ],
          "base": "auto",
          "target": "auto",
          "if_not_found": "success",
          "if_no_uploads": "error"
        }
      },
      "changes": {
        "default": {
          "if_ci_failed": "error",
          "informational": true,
          "if_not_found": "success",
          "if_no_uploads": "error"
        }
      },
      "patch": {
        "default": {
          "if_ci_failed": "error",
          "informational": true,
          "target": 100.0,
          "if_not_found": "success",
          "if_no_uploads": "error"
        }
      }
    },
    "range": [
      70.0,
      100.0
    ],
    "round": "up",
    "precision": 2
  },
  "codecov": {
    "ci": [
      "drone.saltstack.com",
      "jenkinsci.saltstack.com"
    ]
  }
}

So I’m lost at what’s happening.

@jerrod sorry for the direct ping. Any light on this? We keep getting GH status intereactions on our PRs.

Can anyone shed some light on why this is happening?

Hey @s0undt3ch – sorry for lengthy delay, in your master YAML you have some customization under status config.

I’d recommend setting under status:

coverage: 
    status: false

Under your project YAML, the default YAML has also has some interaction with the PR: https://docs.codecov.io/docs/commit-status

Similarly, I’d recommend explicitly stating:

coverage: 
    status: false

Hope this helps!

Jerrod

Ok. I’ll try that.
And the config shown on codecov UI not matching the config on the repo?

Hi @s0undt3ch, not completely sure what you meant there, but I wanted to check in and see if that fixed your issue.