Skip to content
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

CI: Track integration test coverage separately from unit tests #481

Merged
merged 3 commits into from
Aug 28, 2020

Conversation

oschaaf
Copy link
Member

@oschaaf oschaaf commented Aug 24, 2020

Following an offline discussion about coverage flakes in CI, and how to best
improve there we decided to exclude the integration tests altogether from strict coverage
treshold expectations. As such, we lower the unit testing coverage threshold to 92.1%
here. We still run the integration tests in a new CI task, with the intent to make that not
required to pass for merging, so informational only.

Fixes #362

Signed-off-by: Otto van der Schaaf oschaaf@we-amp.com

Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
@oschaaf oschaaf added the waiting-for-review A PR waiting for a review. label Aug 25, 2020
@mum4k mum4k self-assigned this Aug 25, 2020
@mum4k mum4k requested review from mum4k and htuch August 25, 2020 21:04
@mum4k
Copy link
Collaborator

mum4k commented Aug 25, 2020

As discussed offline, I believe this is the right decision considering a) integration tests don't really show the true coverage, they are better used to measure end-to-end behaviors; and b) the integration test coverage is flaky and the time needed to fix it may be better used by improving our unit test coverage.

I am fine with this PR, however adding @htuch in case he has any thoughts, since this setup predates me.

@htuch
Copy link
Member

htuch commented Aug 26, 2020

I'm OK with this, but it's worth noting that you're now diverging from Envoy coverage philosophy. Thinking a little on this, I think it would have sense to have two coverage metrics, one for unit tests and another for integration tests. While we should strive for complete unit test coverage, integration tests are essential and should be covering as many behavior as possible, since this is when the rubber meets the road.

@oschaaf
Copy link
Member Author

oschaaf commented Aug 26, 2020

to float an idea, I think it would be low effort to add a new CI task which separately runs the integration test for coverage and uploads the results. We could configure that CI task to not block merging upon failure and allow a bounded number of retries for failed tests (to eliminate one cause of the flakes we've seen). That way we would have a relatively easy means to separately set a treshold for this, as well as inspect coverage produced by the just the integration tests. If would still occasionally fail, but as it is not required to pass for merging, it would not be as annoying?

@mum4k
Copy link
Collaborator

mum4k commented Aug 26, 2020

Thank you @htuch for your input and the note about Envoy's strategy. @oschaaf your idea about two numbers, one being informative only sounds good. Is this something we would want to implement in this PR or a separate one?

…ration-tests

Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
@oschaaf oschaaf force-pushed the coverage-no-integration-tests branch from 3ee0e8b to 564ca62 Compare August 27, 2020 08:31
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
@oschaaf oschaaf force-pushed the coverage-no-integration-tests branch from 564ca62 to d559cca Compare August 27, 2020 08:34
@oschaaf
Copy link
Member Author

oschaaf commented Aug 27, 2020

@mum4k added d559cca to include the proposed new integration test coverage task here, with an independent threshold.

@oschaaf
Copy link
Member Author

oschaaf commented Aug 27, 2020

Mysteriously, the new CI task isn't showing up in the tasks that CircleCI runs in this PR. I'm not sure yet what that is about.

@mum4k
Copy link
Collaborator

mum4k commented Aug 27, 2020

If you want, we can split it out from this PR and address it separately? Or do we merge as is and address the issue afterwards?

@mum4k mum4k added waiting-for-changes A PR waiting for comments to be resolved and changes to be applied. and removed waiting-for-review A PR waiting for a review. labels Aug 27, 2020
@oschaaf
Copy link
Member Author

oschaaf commented Aug 27, 2020

I think it's worth trying to merge as-is. Hopefully the new task will pick up once merged to master, and if it isn't I'll look into it right away

@oschaaf oschaaf changed the title Stop executing integration tests in CI coverage task CI: Track integration test coverage separately from unit tests Aug 27, 2020
@oschaaf oschaaf added waiting-for-review A PR waiting for a review. and removed waiting-for-changes A PR waiting for comments to be resolved and changes to be applied. labels Aug 28, 2020
@mum4k mum4k merged commit 20dbe2c into envoyproxy:master Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-for-review A PR waiting for a review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Coverage flakes
3 participants