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

Test Coverage Reports for E2E tests #7526

Merged
merged 12 commits into from
Jun 5, 2023
Merged

Conversation

dereknola
Copy link
Member

@dereknola dereknola commented May 10, 2023

Proposed Changes

  • Move coverage logic from the server into the startup for both agent and server
  • Pin go version used for E2E go test to latest stable release
  • Add test coverage reporting to validate, secrets-encrypt and startup E2E tests

Types of Changes

E2E

Verification

Drone CI passes, see increase in coverage report https://app.codecov.io/gh/k3s-io/k3s/pull/7526

Testing

Its all testing

Linked Issues

N/A

User-Facing Change


Further Comments

dereknola added 3 commits May 10, 2023 12:23
Signed-off-by: Derek Nola <derek.nola@suse.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
@dereknola dereknola requested a review from a team as a code owner May 10, 2023 19:42
Signed-off-by: Derek Nola <derek.nola@suse.com>
@codecov
Copy link

codecov bot commented May 11, 2023

Codecov Report

Patch coverage: 66.66% and project coverage change: +32.11 🎉

Comparison is base (9ec1789) 19.86% compared to head (a9de75f) 51.97%.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #7526       +/-   ##
===========================================
+ Coverage   19.86%   51.97%   +32.11%     
===========================================
  Files          81      141       +60     
  Lines        7607    14327     +6720     
===========================================
+ Hits         1511     7447     +5936     
+ Misses       5870     5708      -162     
- Partials      226     1172      +946     
Flag Coverage Δ
e2etests 47.95% <100.00%> (?)
inttests 44.92% <60.00%> (?)
unittests 19.85% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/cli/cmds/cover_default.go 0.00% <0.00%> (ø)
pkg/server/server.go 58.53% <ø> (ø)
pkg/cli/agent/agent.go 30.61% <50.00%> (ø)
pkg/cli/cmds/cover_linux.go 53.84% <100.00%> (ø)
pkg/cli/server/server.go 62.81% <100.00%> (ø)

... and 114 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

dereknola added 6 commits May 11, 2023 16:08
Signed-off-by: Derek Nola <derek.nola@suse.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
@dereknola dereknola requested a review from brandond May 31, 2023 20:49
@dereknola dereknola changed the title [WIP] E2E Coverage Test Coverage Reports for E2E tests May 31, 2023
@@ -765,6 +768,25 @@ steps:
- name: cache
path: /tmp/artifacts

- name: upload to codecov
image: robertstettner/drone-codecov
Copy link
Member

@brandond brandond May 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love images that just are just from some dude.

Does this have a project somewhere, or should we consider mirroring or building it ourselves into an org we can trust?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I swear this is the De Facto plugin for CodeCov in Drone. If you go looking at drone plugins, its the only one https://plugins.drone.io/?search=codecov. The source files are here https://github.com/robertstettner/drone-codecov. Codecov documentation sends to a 404 non existent Drone plugin https://about.codecov.io/tool/drone/. Longhorn is currently using this plugin.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the repo hasn't been touched in 6 years, is the image also that old!?

Copy link
Member

@brandond brandond May 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like it's also just a simple wrapper around the deprecated bash uploader
https://github.com/robertstettner/drone-codecov/blob/master/Dockerfile#L4

I wonder if we should just toss together a proper plugin that uses the new one from https://docs.codecov.com/docs/codecov-uploader

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll open a future PR to move to directly uploading via their bash tool

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, bash is bad, we want to use the new non-bash one.

Signed-off-by: Derek Nola <derek.nola@suse.com>
@dereknola dereknola merged commit b0188f5 into k3s-io:master Jun 5, 2023
@dereknola dereknola deleted the E2E_cover branch June 6, 2023 18:09
vitorsavian pushed a commit to vitorsavian/k3s that referenced this pull request Jun 7, 2023
* Move coverage writer into agent and server
* Add coverage report to E2E PR tests
* Add codecov upload to drone

Signed-off-by: Derek Nola <derek.nola@suse.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants