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

Fix uploading of code coverage data #5298

Merged
merged 5 commits into from
Apr 29, 2024

Conversation

eapolinario
Copy link
Contributor

@eapolinario eapolinario commented Apr 29, 2024

Why are the changes needed?

The ingestion of code coverage data was happening in two places:

  1. via the test_unit_codecov make target defined in boilerplate
  2. via the gh action defined in https://github.com/flyteorg/flyte/blob/master/.github/workflows/unit-tests.yml#L34-L41

As of a few days ago we started seeing the upload done in 1. timeout and block the execution of the remaining steps in the gh workflow, e.g. [1].

That said, 2. was never configured properly. For example, we were reusing the flags field, which essentially caused the code coverage data to be overwritten. Another problem was that we never used the correct name for the token.

What changes were proposed in this pull request?

Three changes:

  1. Remove the uploading of code coverage data through the codecov script. Instead relying on the gh action to do its job.
  2. Use the component name to define a flags field such that the code coverage data can be aggregated correctly
  3. Use the token field with a proper value to upload codecov data via the gh action.

How was this patch tested?

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

@eapolinario
Copy link
Contributor Author

#5294 is upgrading the version of the gh actions used to checkout the repo. While this is good we should address this failure at a lower level (which is being done in the present PR).

Copy link

codecov bot commented Apr 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.19%. Comparing base (f32132b) to head (306afdf).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5298      +/-   ##
==========================================
+ Coverage   59.02%   60.19%   +1.16%     
==========================================
  Files         383      646     +263     
  Lines       29801    45654   +15853     
==========================================
+ Hits        17590    27480    +9890     
- Misses      10485    15582    +5097     
- Partials     1726     2592     +866     
Flag Coverage Δ
unittests-datacatalog 69.31% <ø> (?)
unittests-flyteadmin 58.78% <ø> (?)
unittests-flytecopilot 17.79% <ø> (?)
unittests-flyteidl 79.30% <ø> (?)
unittests-flyteplugins 61.94% <ø> (?)
unittests-flytepropeller 57.32% <ø> (?)
unittests-flytestdlib 65.73% <ø> (?)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@eapolinario eapolinario changed the title Do not upload codecoverage data from boilerplate Fix uploading of code coverage data Apr 29, 2024
@eapolinario eapolinario enabled auto-merge (squash) April 29, 2024 21:33
@eapolinario eapolinario merged commit 6ebcb86 into master Apr 29, 2024
47 of 48 checks passed
@eapolinario eapolinario deleted the do-not-upload-codecov-from-boilerplate branch April 29, 2024 21:34
austin362667 pushed a commit to austin362667/flyte that referenced this pull request May 7, 2024
* Do not upload codecoverage data from boilerplate

Signed-off-by: Eduardo Apolinario <[email protected]>

* Use correct token to upload code coverage data

Signed-off-by: Eduardo Apolinario <[email protected]>

* Pipe in CODECOV_TOKEN as an input secret

Signed-off-by: Eduardo Apolinario <[email protected]>

* Actually pipe the secret in

Signed-off-by: Eduardo Apolinario <[email protected]>

* Pipe codecov token in flyteidl tests too

---------

Signed-off-by: Eduardo Apolinario <[email protected]>
Co-authored-by: Eduardo Apolinario <[email protected]>
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.

2 participants