# Threshold confusion

**URL:** <https://community.codecov.com/t/threshold-confusion/88>\
**Category:** Support\
**Tags:** github\
**Created:** [April 3, 2019, 1:02pm UTC](https://community.codecov.com/t/threshold-confusion/88 "2019-04-03T13:02:06Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Onager](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/onager/32/74_2.png) [@Onager](https://community.codecov.com/u/Onager)\
**Post date:** [April 3, 2019, 1:02pm UTC](https://community.codecov.com/t/threshold-confusion/88/1 "2019-04-03T13:02:06Z")

</div>

### Description

I only want a failing GitHub status check when a PR drops project coverage by more than 1%.

I’ve set a threshold of “1” and also tried with “1%”, but neither seems to actually work, in this PR for example: [Changes to psort to show event counters as status by joachimmetz · Pull Request #2442 · log2timeline/plaso · GitHub](https://github.com/log2timeline/plaso/pull/2442) there’s a failing status even though coverage dropped by 0.02%.

Any suggestions for how to get this behavior?  
Secondarily, is “1” or “1%” the correct way to specify a threshold?

### Repository

> **[GitHub - log2timeline/plaso: Super timeline all the things](https://github.com/log2timeline/plaso)**
>
> Super timeline all the things

### Versions

Chrome

### Additional Information

Full team YAML:

```
comment:
  require_changes: true # Only post a comment if coverage changes.
coverage:
  status:
    project:
      default:
        threshold: 1 # Allow coverage to drop by up to 1% in a PR before marking it failed
    patch: off

```

---

<div class="post-metadata">

**Author:** ![jerrod](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/jerrod/32/41_2.png) [@jerrod](https://community.codecov.com/u/jerrod)\
**Post date:** [April 5, 2019, 5:42pm UTC](https://community.codecov.com/t/threshold-confusion/88/2 "2019-04-05T17:42:19Z")

</div>

Hey, thanks for the reach out.

A couple thoughts:

1.) For the %, please do “1%” instead of “1” (1 would = 100%) docs here: [Notifications](https://docs.codecov.io/docs/notifications#section-slack)

2.) We are running into an intermittent bug of cached YAML’s not updating, so if you update this and still not working please post again.

Jerrod

---

<div class="post-metadata">

**Author:** ![Onager](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/onager/32/74_2.png) [@Onager](https://community.codecov.com/u/Onager)\
**Post date:** [April 16, 2019, 8:03pm UTC](https://community.codecov.com/t/threshold-confusion/88/3 "2019-04-16T20:03:20Z")

</div>

Thanks Jerrod!

I’ve changed this, and I’m still getting failures - see [Added additional checks for first utmp record validity #2381 by Onager · Pull Request #2459 · log2timeline/plaso · GitHub](https://github.com/log2timeline/plaso/pull/2459) where a drop of 0.01% is causing the check to fail.

---

<div class="post-metadata">

**Author:** ![jerrod](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/jerrod/32/41_2.png) [@jerrod](https://community.codecov.com/u/jerrod)\
**Post date:** [April 26, 2019, 5:58pm UTC](https://community.codecov.com/t/threshold-confusion/88/4 "2019-04-26T17:58:43Z")

</div>

Hey Onager, yes I checked your YAML and you made the right change. Investigating why your are still failing. I think either:

1. Your YAML change was invalidated and reverted back to old YAML

2. There is a bug in failing coverage

---

<div class="post-metadata">

**Author:** ![jerrod](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/jerrod/32/41_2.png) [@jerrod](https://community.codecov.com/u/jerrod)\
**Post date:** [May 17, 2019, 6:10pm UTC](https://community.codecov.com/t/threshold-confusion/88/5 "2019-05-17T18:10:14Z")

</div>

Hey @Onager, just an update here that we are working on better error messaging around invalidated YAML changes --\> it’s like your YAML failed silently. In future, we’d like to have this YAML failure announce an error to you.

---

<div class="post-metadata">

**Author:** ![Onager](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/onager/32/74_2.png) [@Onager](https://community.codecov.com/u/Onager)\
**Post date:** [May 19, 2019, 4:07pm UTC](https://community.codecov.com/t/threshold-confusion/88/6 "2019-05-19T16:07:49Z")

</div>

Thanks @jerrod - let me know if there’s anything else I can do to help debug this.

---

<div class="post-metadata">

**Author:** ![till](https://avatars.discourse-cdn.com/v4/letter/t/22d042/32.png) [@till](https://community.codecov.com/u/till)\
**Post date:** [May 24, 2019, 2:29pm UTC](https://community.codecov.com/t/threshold-confusion/88/7 "2019-05-24T14:29:31Z")

</div>

We are seeing this as well. CodeCov often reports a failure with 0.1%. I think it’s related to transformations with babble and what not, but I could be wrong.

Regardless, since I am not familiar with your service, do we need a yam file to configure this, or is this a default you can “increase”? Or we increase somewhere else? I’d like to set it globally for our org if possible.

Thanks! 🙂

---

<div class="post-metadata">

**Author:** ![jerrod](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/jerrod/32/41_2.png) [@jerrod](https://community.codecov.com/u/jerrod)\
**Post date:** [May 24, 2019, 6:31pm UTC](https://community.codecov.com/t/threshold-confusion/88/8 "2019-05-24T18:31:35Z")

</div>

Hey @till, thanks for the question. Separate from the improvements we are making for error messaging of YAML invalidation → Yes, you need a .yml file to configure Codecov. You can check out the global YAML settings doc here: [About the Codecov YAML](https://docs.codecov.io/docs/codecov-yaml)

---

<div class="post-metadata">

**Author:** ![till](https://avatars.discourse-cdn.com/v4/letter/t/22d042/32.png) [@till](https://community.codecov.com/u/till)\
**Post date:** [May 25, 2019, 5:26pm UTC](https://community.codecov.com/t/threshold-confusion/88/9 "2019-05-25T17:26:18Z")

</div>

@jerrod Thanks. I guess one more question, can I just add a yaml with the threshold piece? Or should I copy the complete default yaml and customise it?

---

<div class="post-metadata">

**Author:** ![Farwaykorse](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/farwaykorse/32/79_2.png) [@Farwaykorse](https://community.codecov.com/u/Farwaykorse)\
**Post date:** [June 18, 2019, 9:20am UTC](https://community.codecov.com/t/threshold-confusion/88/10 "2019-06-18T09:20:24Z")

</div>

No need to copy the whole, just add the threshold setting. (You do need the tree structure to the setting though.)

```auto
coverage:
  status:
    project:
      default:
        threshold: 1%

```

For organisation wide (all repositories in your account) settings, you can use the " Team yaml" in your account settings.

---

<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:** [June 28, 2019, 6:56pm UTC](https://community.codecov.com/t/threshold-confusion/88/11 "2019-06-28T18:56:44Z")

</div>


