-
Notifications
You must be signed in to change notification settings - Fork 686
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
codecov should be relaxed for the tools directory #10245
Comments
Just to be sure I understand, what do you call "code coverage requirements"? AFAICT there are no requirements set up yet, and code coverage analysis is purely informational, is it not? |
You're correct in that it's non-blocking but if it fails it still shows up as a red, failed job on the PR. It's personal but it's really frustrating to me. I strongy believe we should not get devs used to the red colour or they will just start ignoring all failing jobs. |
Got it :) I totally agree with you, and it’s actually part of the reason for #10218: to make the red in code coverage failures to actually appear 😅 So now that I’m clear on the need, I’m curious: is the tools/ folder not expected to be used in production for devops by node operators? If I understand the codecov defaults properly, the current setting is (project-wide) "coverage does not decrease, and the patch coverage is at least the project-wide coverage". Assuming the tools/ folder is indeed supposed to be used by node operators, it sounds like a good default to me, though I do think that we should tighten the requirements for folders other than tools/: we’re never going to have to work to increase coverage, and we can land whatever we want if we need to by ignoring the red cross, but we should most of the time not decrease coverage in a patch. Maybe we should just disable the second part of the current setting, and just require that overall coverage does not decrease? Does that make sense? |
As far as I know the vast majority of /tools is not intended to be used in production by node operators. I'm pretty sure there are exceptions though and it would be good to check with the node team but I'm not sure how to tag them here. I don't have a strong opion and I'd rather rely on your expertise to come up with the best solution. Anything like selectively setting the threshold to zero for some directories, or allowing the developer to add an exception for some more nested subdirectory or just reporting without red failing jobs is fine for me. |
@nikurt I know you care a lot about developer experience (and thank you so much for that ❤️). Do you have any input on this? :) |
I agree that Therefore it should be fine to have no code coverage requirement for the code in I can make a case for requiring basic correctness tests for all the tools, though. That is unrelated to @wacban 's original question. |
While we're on the topic I also think we should relax the project diff coverage a tiny bit. The reason is that adding a line of documentation and potentially a line of comment just increases the total number of lines while the number of covered lines stays the same and the coverage effectively decreases. E.g. #10303 is read because coverage dropped by 0.02%. Let me know if this makes sense and I'll be happy to write a quick PR for this. |
The true solution would be to consider SLOCs only – I would be surprised if that isn’t the case currently... But I also agree that being super strict on coverage decreases is not particularly productive given our current workflows and development style. |
The code coverage requirements in the CI should be relaxed for the tools directory and potentially some other non-critical directories. I would suggest setting the target coverage level to 0% or disabling it for those directories.
The text was updated successfully, but these errors were encountered: