-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enable coverage for PRs #17204
enable coverage for PRs #17204
Conversation
f63b1e3
to
61bd8d6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely want to do this!
Aren't we still running a different set of tests between PRs and merges? If so, this may end up destabilizing the coverage numbers (PRs will report a smaller coverage number than merges).
I think we need to make sure we're running the full set of tests on PRs. Maybe that means we run the full tests on the current language runtime version, and report coverage for that for both PRs and merges. And then have merges also run on minimum language runtime version as well, but don't report coverage for those tests? Something like that? Or open to other ideas.
b868d9b
to
d497bd7
Compare
I managed to set the base of the PR correctly here now, but the results are still somewhat sad. Codecov seems to get confused that we are building the merge commit, and attributes wrong coverage because of that. Looking at the codecov result, it looks like it's attributing missing coverage to comments, or even lines that can't even be uncovered, e.g. So I think our options here I think are:
There's also the issue Justin points out above regarding running different tests. We would have to run the macos tests during PRs as well, and either start running the Windows tests during merge (making the merge queue more annoying again), or ignore coverage numbers for windows (that's probably fine?). But there's also things like sdk/go/common/util/ciutil/github_actions.go, which runs different code based on whether we're running during a pull request or in the merge queue, so the coverage numbers for that will always be different. |
I have a hard time imagining the experience in my head. Is it safe to ship the check (the least bad option, without blocking PRs on it) and live with it for a couple of days? |
I was planning on discussing this in ideation tomorrow before merging it. |
75a744d
to
ff49275
Compare
I think I got the merge commit thing right now, with there only being small diffs in the code coverage from running a different set of tests in the merge queue and on PR still. However now the status checks don't show up anymore 🤦 I opened an upstream issue to ask about this: codecov/codecov-action#1581 |
https://app.codecov.io/gh/pulumi/pulumi/pull/17204/indirect-changes Your GitHub PR is based on ebf838e (older) but coverage is getting computed using d30f4b5 (newer) as its base. You might try computing a value for git merge-base origin/master origin/tg/enable-codecov-checks
ebf838e02e36c2549206275c3a40c37f95e1e6c4 |
530fe56
to
35bda57
Compare
Hrm I gave this a try now, and it's showing the base correctly as 6e9ec22 now, but the coverage data still seems to be broken :( I don't feel like I understand what codecov is doing here at all. |
Otherwise the coverage numbers don't make sense
0b8268c
to
09f34fa
Compare
.github/workflows/on-pr.yml
Outdated
# codegen tests take quite a while to run. | ||
# Run them only if ci/test is set, | ||
# or if one of the codegen files changed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this comment outdated now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, good catch! I've updated it now.
Codecov numbers should be stable enough now to enable them for PRs as well.