# Codecov reporting unexpected status update for deleted project

**URL:** <https://community.codecov.com/t/codecov-reporting-unexpected-status-update-for-deleted-project/1069>\
**Category:** Bug Fixes\
**Tags:** github\
**Created:** [February 27, 2020, 10:45am UTC](https://community.codecov.com/t/codecov-reporting-unexpected-status-update-for-deleted-project/1069 "2020-02-27T10:45:01Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeanregisser](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/jeanregisser/32/576_2.png) [@jeanregisser](https://community.codecov.com/u/jeanregisser)\
**Post date:** [February 27, 2020, 10:45am UTC](https://community.codecov.com/t/codecov-reporting-unexpected-status-update-for-deleted-project/1069/1 "2020-02-27T10:45:01Z")

</div>

### Description

On Feb 26 we committed a change to our repo to delete the config for a specific project in Codecov (see [Remove codecov for protocol until coverage working again (#2947) · celo-org/celo-monorepo@1fbe7f8 · GitHub](https://github.com/celo-org/celo-monorepo/commit/1fbe7f82c80b0912838de3ec07fb613babf14cf3)).

We did this because Codecov was reporting a failing status check for the `protocol` project seemingly randomly.  
Specifically, the `protocol` test coverage is only uploaded daily. That’s why we initially added `if_not_found: success` to its config.  
However we saw that - randomly - the status check for the `protocol` project would report an error with `0.00% (target 90.00%)` instead of the expected success status with `No files found while filtering the report.`

Today, Feb 27, we see Codecov is still reporting the failing status check for the removed `protocol` project (also seemingly randomly).

 ![Screenshot 2020-02-27 at 10.51.41](https://canada1.discourse-cdn.com/flex029/uploads/codecov/original/1X/edd8c1b57048ecc1f444e36ac9fb2ab5e91cde89.png)

It looks like Codecov isn’t fully taking our updated config file into account.

### Repository

> **[GitHub - celo-org/celo-monorepo: Official repository for core projects comprising...](https://github.com/celo-org/celo-monorepo)**
>
> Official repository for core projects comprising the Celo platform

### Steps to Reproduce

1. Have multiple projects in your Codecov config
2. See statuses being reported to GitHub
3. Delete one project from the config
4. See Codecov reporting status for the deleted project even when no coverage was uploaded for it

**Expected behavior:**

Codecov should not report failing status for a deleted project.  
Codecov should consistently report a success status with `No files found while filtering the report.` when not uploading coverage and `if_not_found: success` is set for a project.

**Actual behavior:**

Codecov is reporting failing status for a deleted project even when not uploading any coverage for it.  
Codecov is reporting an error status with `0.00% (target 90.00%)` instead of success status with `No files found while filtering the report.` when not uploading coverage and `if_not_found: success` is set for a project.

**Flakiness?**

Seemingly randomly.

### Versions

Safari 13.0.5  
macOS Catalina 10.15.3

### Additional Information

Configuration:

> <https://github.com/celo-org/celo-monorepo/blob/2b1e5a9732468b4411c39a4098fa74173f33c19c/.codecov.yml>

---

<div class="post-metadata">

**Author:** ![drazisil](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/drazisil/32/496_2.png) [@drazisil](https://community.codecov.com/u/drazisil)\
**Post date:** [February 27, 2020, 5:08pm UTC](https://community.codecov.com/t/codecov-reporting-unexpected-status-update-for-deleted-project/1069/2 "2020-02-27T17:08:19Z")

</div>

Hi @jeanregisser

Commenting out a status will disable that status, it won’t tell Codecov to stop processing those files. I recommend adding that path to your ignore section if you want us to not handle it.

---

<div class="post-metadata">

**Author:** ![jeanregisser](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/jeanregisser/32/576_2.png) [@jeanregisser](https://community.codecov.com/u/jeanregisser)\
**Post date:** [February 28, 2020, 9:02am UTC](https://community.codecov.com/t/codecov-reporting-unexpected-status-update-for-deleted-project/1069/3 "2020-02-28T09:02:39Z")

</div>

Hi,

I’m confused about your answer.  
The screenshot above shows Codecov still reporting the status for the project that has been commented out in the config. And you’re saying it shouldn’t, right?  
Also, as far as I saw, we did not upload anything related to that path when that status in the screenshot was reported.

What’s happening?

---

<div class="post-metadata">

**Author:** ![drazisil](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/drazisil/32/496_2.png) [@drazisil](https://community.codecov.com/u/drazisil)\
**Post date:** [March 4, 2020, 2:29pm UTC](https://community.codecov.com/t/codecov-reporting-unexpected-status-update-for-deleted-project/1069/4 "2020-03-04T14:29:41Z")

</div>

Hi @jeanregisser

I’m sorry, I must have been tired when I responded.

Can you please rename the file from ` .codecov.yml` to ` codecov.yml` (no leading period) and share an updated SHA if that doesn’t fix it?

---

<div class="post-metadata">

**Author:** ![jeanregisser](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/jeanregisser/32/576_2.png) [@jeanregisser](https://community.codecov.com/u/jeanregisser)\
**Post date:** [March 10, 2020, 8:58pm UTC](https://community.codecov.com/t/codecov-reporting-unexpected-status-update-for-deleted-project/1069/5 "2020-03-10T20:58:37Z")

</div>

Hi @drazisil,

Thank you for your help.

I’ve renamed the Codecov config file in [Fix codecov config by jeanregisser · Pull Request #3049 · celo-org/celo-monorepo · GitHub](https://github.com/celo-org/celo-monorepo/pull/3049)  
I did receive different statuses, but it looks like the custom projects were ignored, and got a generic `codecov/project` instead of the expected `codecov/project/mobile` and `codecov/project/web`:

 ![Screenshot 2020-03-10 at 21.34.48](https://canada1.discourse-cdn.com/flex029/uploads/codecov/original/1X/848cabe1f3978a53ffa2f9b17ffcfafbf92533c9.png)

Also I now see an unexpected `codecov/patch` status which is disabled in the config.

Another thing I noticed is Codecov web UI seems to indicate it didn’t find any config now that it’s been renamed:

[Screenshot 2020-03-10 at 21.44.48|690x294](https://community.codecov.com/uploads/short-url/3hS8rSoy6AYhSpjxUgB3L2Ithqo.png)

See: [https://codecov.io/gh/celo-org/celo-monorepo/commit/78097c75c93094fff2a29c6c1d33dc8e60024e26/build](https://codecov.io/gh/celo-org/celo-monorepo/commit/78097c75c93094fff2a29c6c1d33dc8e60024e26/build)

Before the rename, the web UI was correctly showing the config there.

What do you think is wrong?

---

<div class="post-metadata">

**Author:** ![drazisil](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/drazisil/32/496_2.png) [@drazisil](https://community.codecov.com/u/drazisil)\
**Post date:** [March 13, 2020, 3:21pm UTC](https://community.codecov.com/t/codecov-reporting-unexpected-status-update-for-deleted-project/1069/6 "2020-03-13T15:21:42Z")

</div>

Based on the errors I’m seeing in the logs, I think you need to change the formatting of the `paths:` key to match the way it in the `flags:` section.

So,

```auto
    project:
      default: off
      mobile:
        paths: 
          - 'packages/mobile/'

```

For example.

---

<div class="post-metadata">

**Author:** ![jeanregisser](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/jeanregisser/32/576_2.png) [@jeanregisser](https://community.codecov.com/u/jeanregisser)\
**Post date:** [March 16, 2020, 10:47am UTC](https://community.codecov.com/t/codecov-reporting-unexpected-status-update-for-deleted-project/1069/7 "2020-03-16T10:47:23Z")

</div>

Thanks I tried in [Fix codecov config by jeanregisser · Pull Request #3049 · celo-org/celo-monorepo · GitHub](https://github.com/celo-org/celo-monorepo/pull/3049/commits/9fcc33b0315a9a0bf75a1e22c26405fff78d2de0) but the status reported were the same:

 ![Screenshot 2020-03-16 at 11.35.12](https://canada1.discourse-cdn.com/flex029/uploads/codecov/original/1X/adfa015fe5d6a30e180ffd08173ba5717461f094.png)

Related to this, both configs validated correctly and had the same output using your online validator [https://codecov.io/validate:](https://codecov.io/validate:)

```plaintext
❯ cat codecov.yml
coverage:
  status:
    project:
      default: off
      mobile:
        paths: 'packages/mobile/'
        flags: mobile
        threshold: 5%
        target: 70%
      web:
        paths: 'packages/web/'
        flags: web
        threshold: 2%
        target: 75%
      # Protocol codecov disabled until coverage tests are fixed.
      #protocol:
        #paths: 'packages/protocol/'
        #flags: protocol
        #threshold: 5%
        #target: 90%
        #if_no_uploads: error
        #if_not_found: success
        #if_ci_failed: error
    patch:
      default: off

flags:
  mobile:
    paths:
      - packages/mobile/
  #protocol:
    #paths:
      #- packages/protocol/

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

{
  "flags": {
    "mobile": {
      "paths": [
        "^packages/mobile/.*"
      ]
    }
  },
  "coverage": {
    "status": {
      "project": {
        "default": false,
        "mobile": {
          "threshold": 5.0,
          "paths": [
            "^packages/mobile/.*"
          ],
          "flags": [
            "mobile"
          ],
          "target": 70.0
        },
        "web": {
          "threshold": 2.0,
          "paths": [
            "^packages/web/.*"
          ],
          "flags": [
            "web"
          ],
          "target": 75.0
        }
      },
      "patch": {
        "default": false
      }
    }
  }
}

```

```plaintext
❯ cat codecov.yml
coverage:
  status:
    project:
      default: off
      mobile:
        paths:
          - packages/mobile/
        flags: mobile
        threshold: 5%
        target: 70%
      web:
        paths:
          - packages/web/
        flags: web
        threshold: 2%
        target: 75%
      # Protocol codecov disabled until coverage tests are fixed.
      #protocol:
        #paths: 'packages/protocol/'
        #flags: protocol
        #threshold: 5%
        #target: 90%
        #if_no_uploads: error
        #if_not_found: success
        #if_ci_failed: error
    patch:
      default: off

flags:
  mobile:
    paths:
      - packages/mobile/
  #protocol:
    #paths:
      #- packages/protocol/

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

{
  "flags": {
    "mobile": {
      "paths": [
        "^packages/mobile/.*"
      ]
    }
  },
  "coverage": {
    "status": {
      "project": {
        "default": false,
        "mobile": {
          "threshold": 5.0,
          "paths": [
            "^packages/mobile/.*"
          ],
          "flags": [
            "mobile"
          ],
          "target": 70.0
        },
        "web": {
          "threshold": 2.0,
          "paths": [
            "^packages/web/.*"
          ],
          "flags": [
            "web"
          ],
          "target": 75.0
        }
      },
      "patch": {
        "default": false
      }
    }
  }
}

```

What else can we try?

---

<div class="post-metadata">

**Author:** ![drazisil](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/drazisil/32/496_2.png) [@drazisil](https://community.codecov.com/u/drazisil)\
**Post date:** [March 16, 2020, 1:04pm UTC](https://community.codecov.com/t/codecov-reporting-unexpected-status-update-for-deleted-project/1069/8 "2020-03-16T13:04:22Z")

</div>

> [@jeanregisser](#):
>
> flags: mobile

I think the flags need to be made into lists as well

```auto
flags:
  - mobile

```

Etc. Can you try that, and pass me a new SHA if still seeing issues?

---

<div class="post-metadata">

**Author:** ![jeanregisser](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/jeanregisser/32/576_2.png) [@jeanregisser](https://community.codecov.com/u/jeanregisser)\
**Post date:** [March 16, 2020, 4:10pm UTC](https://community.codecov.com/t/codecov-reporting-unexpected-status-update-for-deleted-project/1069/9 "2020-03-16T16:10:38Z")

</div>

Thanks, getting some progress with [Fix codecov config by jeanregisser · Pull Request #3049 · celo-org/celo-monorepo · GitHub](https://github.com/celo-org/celo-monorepo/pull/3049/commits/d67708fe3a365dc3627468204ae8467c8c1e58e4), I now also see `codecov/project/mobile` and `codecov/project/web` statuses as expected:

 ![Screenshot 2020-03-16 at 16.59.24](https://canada1.discourse-cdn.com/flex029/uploads/codecov/original/1X/2c0816d1a41c578d9ed0c38a5c3ff88c7008f874.png)

Next step, disabling statuses for `codecov/patch` and `codecov/project`.

From what I see, Codecov online validator still reports the same valid output though (`curl --data-binary @codecov.yml https://codecov.io/validate`).  
Could you explain why those changes are necessary given the validator indicates they are the same?

---

<div class="post-metadata">

**Author:** ![drazisil](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/drazisil/32/496_2.png) [@drazisil](https://community.codecov.com/u/drazisil)\
**Post date:** [March 16, 2020, 4:55pm UTC](https://community.codecov.com/t/codecov-reporting-unexpected-status-update-for-deleted-project/1069/10 "2020-03-16T16:55:01Z")

</div>

> [@jeanregisser](#):
>
> Could you explain why those changes are necessary given the validator indicates they are the same?

Yes, the validate endpoint currently points to the old validator, not the stricter, schema-driven one the processor uses. This make it only 97% accurate currently, but this is on track to be fixed soon.

* * *

I think `patch: off` (drop the default part) should work. Still thinking on why the default project status is showing, let me check the logs.

---

<div class="post-metadata">

**Author:** ![jeanregisser](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/jeanregisser/32/576_2.png) [@jeanregisser](https://community.codecov.com/u/jeanregisser)\
**Post date:** [March 16, 2020, 4:59pm UTC](https://community.codecov.com/t/codecov-reporting-unexpected-status-update-for-deleted-project/1069/11 "2020-03-16T16:59:44Z")

</div>

Ok now I understand better 😉

I tried disabling the `codecov/patch` status in [Fix codecov config by jeanregisser · Pull Request #3049 · celo-org/celo-monorepo · GitHub](https://github.com/celo-org/celo-monorepo/pull/3049/commits/b41b9210efd4a4853db244624ebd01692485b71c) but it broke the custom projects statuses, so I assume it’s because of this stricter internal check.

Is there a way for me to check my config against this stricter version? I feel I’m flying quite blind here.

What’s the proper way of disabling `codecov/patch` and `codecov/project`?

I really appreciate your help here.

---

<div class="post-metadata">

**Author:** ![drazisil](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/drazisil/32/496_2.png) [@drazisil](https://community.codecov.com/u/drazisil)\
**Post date:** [March 16, 2020, 5:05pm UTC](https://community.codecov.com/t/codecov-reporting-unexpected-status-update-for-deleted-project/1069/12 "2020-03-16T17:05:13Z")

</div>

> [@jeanregisser](#):
>
> Is there a way for me to check my config against this stricter version? I feel I’m flying quite blind here.

There is not, and trust me, I know how you feel. The only/best way right now is for me to check the logs to see what the parser sees.

It’s odd that `b41b9210efd4a4853db244624ebd01692485b71c ` broke, because it looks valid.

What happens if you drop `default: false` from the project section?

---

<div class="post-metadata">

**Author:** ![jeanregisser](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/jeanregisser/32/576_2.png) [@jeanregisser](https://community.codecov.com/u/jeanregisser)\
**Post date:** [March 17, 2020, 8:41pm UTC](https://community.codecov.com/t/codecov-reporting-unexpected-status-update-for-deleted-project/1069/13 "2020-03-17T20:41:04Z")

</div>

Dropped `default: false` in [Fix codecov config by jeanregisser · Pull Request #3049 · celo-org/celo-monorepo · GitHub](https://github.com/celo-org/celo-monorepo/pull/3049/commits/a9fbe4a1b8ab80766f9da971746b25355c6a932a) and it’s still broken:

 ![Screenshot 2020-03-17 at 21.37.21](https://canada1.discourse-cdn.com/flex029/uploads/codecov/original/1X/225e1b708adbe83a05844ac309e0ce8584fc56a5.png)

What else can we try? Thanks.

---

<div class="post-metadata">

**Author:** ![drazisil](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/drazisil/32/496_2.png) [@drazisil](https://community.codecov.com/u/drazisil)\
**Post date:** [March 18, 2020, 12:35pm UTC](https://community.codecov.com/t/codecov-reporting-unexpected-status-update-for-deleted-project/1069/14 "2020-03-18T12:35:59Z")

</div>

I made a change on our side that I think will fix this. Can you put the default key back and try again?

Thanks for the patience.

---

<div class="post-metadata">

**Author:** ![jeanregisser](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/jeanregisser/32/576_2.png) [@jeanregisser](https://community.codecov.com/u/jeanregisser)\
**Post date:** [March 18, 2020, 1:48pm UTC](https://community.codecov.com/t/codecov-reporting-unexpected-status-update-for-deleted-project/1069/15 "2020-03-18T13:48:34Z")

</div>

Custom projects are back but the `codecov/patch` and `codecov/default` are still there in [https://github.com/celo-org/celo-monorepo/pull/3049/commits/c29644730a7136776f12d9239e2de9cd22b8378f:](https://github.com/celo-org/celo-monorepo/pull/3049/commits/c29644730a7136776f12d9239e2de9cd22b8378f:)

 ![Screenshot 2020-03-18 at 14.46.24](https://canada1.discourse-cdn.com/flex029/uploads/codecov/original/1X/c4296b53417e651721e7f90475296f389754612e.png)

Let me know what you want me to try next. Thanks!

---

<div class="post-metadata">

**Author:** ![drazisil](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/drazisil/32/496_2.png) [@drazisil](https://community.codecov.com/u/drazisil)\
**Post date:** [March 18, 2020, 2:05pm UTC](https://community.codecov.com/t/codecov-reporting-unexpected-status-update-for-deleted-project/1069/16 "2020-03-18T14:05:55Z")

</div>

That is super annoying. Checking with an engineer, I’ll be in touch.

---

<div class="post-metadata">

**Author:** ![jeanregisser](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/jeanregisser/32/576_2.png) [@jeanregisser](https://community.codecov.com/u/jeanregisser)\
**Post date:** [March 25, 2020, 8:53am UTC](https://community.codecov.com/t/codecov-reporting-unexpected-status-update-for-deleted-project/1069/18 "2020-03-25T08:53:32Z")

</div>

@drazisil anything new about this?

Thanks!

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [May 22, 2020, 2:41am UTC](https://community.codecov.com/t/codecov-reporting-unexpected-status-update-for-deleted-project/1069/19 "2020-05-22T02:41:06Z")

</div>

Hi @jeanregisser, I’m a bit out of the loop on this issue, and I just wanted to see if I could give you an update here, but I’m not sure what state your projects are currently in. Are you still experiencing an issue with this, and if so, how can I help?
