-
Notifications
You must be signed in to change notification settings - Fork 53
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: Reconfigure CodeCov action to ensure stability #1414
ci: Reconfigure CodeCov action to ensure stability #1414
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1414 +/- ##
===========================================
- Coverage 72.17% 71.98% -0.20%
===========================================
Files 185 185
Lines 18295 18295
===========================================
- Hits 13204 13169 -35
- Misses 4050 4076 +26
- Partials 1041 1050 +9 |
This sounds like us fudging the numbers, prioritising marketing over engineering - what are your reasons for wanting to do this? |
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.
I have two questions, one major, one minor that need resolving before merge please :)
I disagree that this is fudging the numbers, I would argue that our test coverage right now as it stands is numbers fudged against us. I can share more thoughts in a discord thread as this seems like a good discussion point. It's probably also best to do this in a separate PR. Note: Code cov actions might need to be reworked slightly before this PR can merge even if this is the only blocker. Will ping once the changes have been made. |
55d0a9e
to
51c4286
Compare
Good call, can you please remove this from this PR? Even if we all agreed this is what we want I think it would be very good for it to have its own commit, and documentation on why we want to do this (if we do). A discord thread would also be good to figure out where the team stands on this. |
Yup totally aligned with that |
d84ecb0
to
bd02af6
Compare
Introducing a retry mechanic to get by for now, seems like codcov team is aware of this bug that happens without a token. Until they push it we can rely on this retry mechanic. In future should probably rework using a 2 step workflow where first work is not privileged and generates the report, then the report is passed to a privileged |
env: | ||
codecov_secret: ${{ secrets.CODECOV_TOKEN }} | ||
if: env.codecov_secret == '' | ||
uses: Wandalen/[email protected] |
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.
todo: Can we please at least use a more popular dependency if we are going to introduce one? The one currently on this line only has 35 stars, whereas this one has 245 and was built at/for a well known company whereas wandalen
s appears to be purely a personal project.
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.
Which one are you recommending? I just saw many people use this one to fix the code cov flakey stuff. Happy to look into another one that might be more reputable.
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.
lol, I forgot to link it. I had it open and ready for you sorry. This is the one I meant to suggest: https://github.com/marketplace/actions/retry-step
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.
It seems to be intended to replace the run step commands not action uses. LMK if you see an example for retries upon an action use.
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.
More info:
https://stackoverflow.com/a/71583518
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.
You should be able to run the code cov action as a command no?
I'm just very uncomfortable introducing such an unused personal project into our CI system, and I think if I had to choose between using that action, or having a flaky code cov action, I would probably go for the flaky code cov action.
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.
I would rather use the official codecov github action than the shell command as it takes into account some built-in github metadata when it uploads the data to codcov.
I disagree that it is an unused personal project
as it has thousands of uses already: https://github.com/search?q=Wandalen%2Fwretry.action+path%3A.github%2Fworkflows%2F+language%3AYAML&type=Code&s=indexed&o=desc
Some of the users are shopify, open-metadata, Isar Database, Airbyte, Immich
We shouldn't not solve the problem just because we have to use a 3rd party action. We already use a lot of 3rd party actions, even when we weren't open-sourced.
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.
Also keep in mind, this will mostly be a fallback case when a token isn't available (ASFAIK it will always be there). So majority of times this won't even be hit or used once the rework of this action is done.
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.
I think it's pretty safe to use the one Shahzad has at the moment. Specially that it's set on a version so future changes won't affect us unless we update without checking what the changes are.
32b6306
to
3d1632e
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.
LGTM!
3d1632e
to
3024d50
Compare
3024d50
to
e795702
Compare
## Relevant issue(s) Resolves sourcenetwork#1413 ## Description - Ensures Codecov doesn't run on every push (code coverage reports will only generate for every PR, or pushes on `master` and `develop`). This also means contributors don't need to have codecov to have a build run successfully on their fork pushes. - If for whatever reason the code cov token doesn't exist, still run the action (but might be flakey - so retry until passes up to 5 times). Future: Should probably rework this to do the `pull_request` -> trigger a `workflow_run` that will be passed the code coverage report that will then have the secrets in the second privileged action run. But until then hopefully this can get us by. ## How has this been tested? Fork pushes and this PR pushes.
Relevant issue(s)
Resolves #1413
Description
Note: The first 3 commits are house keeping stuff that I didn't want to open a separate issue for.
master
anddevelop
). This also means contributors don't need to have codecov to have a build run successfully on their fork pushes.Future: Should probably rework this to do the
pull_request
-> trigger aworkflow_run
that will be passed the code coverage report that will then have the secrets in the second privileged action run. But until then hopefully this can get us by.How has this been tested?
Fork pushes and this PR pushes.