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

Files are ignored and extra files are picked #1354

Closed
HarelM opened this issue Apr 4, 2024 · 6 comments
Closed

Files are ignored and extra files are picked #1354

HarelM opened this issue Apr 4, 2024 · 6 comments

Comments

@HarelM
Copy link

HarelM commented Apr 4, 2024

I have the following run:
https://github.com/IsraelHikingMap/Site/actions/runs/8556672091/job/23447062211
Which I configured to upload two files:

      - name: Codecov upload
        if: always()
        uses: codecov/codecov-action@v4
        with:
          files: ./Tests/IsraelHiking.API.Tests/coverage.info,./IsraelHiking.Web/coverage/lcov.info
        env:
          CODECOV_TOKEN:***

/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov do-upload -f ./Tests/IsraelHiking.API.Tests/coverage.info -f ./IsraelHiking.Web/coverage/lcov.info --git-service github
But the codecov action upload another file I didn't specify:

info - 2024-04-04 14:49:35,996 -- > /home/runner/work/Site/Site/IsraelHiking.Web/coverage/lcov.info
info - 2024-04-04 14:49:35,996 -- > /home/runner/work/Site/Site/Tests/IsraelHiking.API.Tests/coverage.info
info - 2024-04-04 14:[49](https://github.com/IsraelHikingMap/Site/actions/runs/8556672091/job/23447062211#step:7:50):35,996 -- > /home/runner/work/Site/Site/Tests/IsraelHiking.DataAccess.Tests/coverage.info

Here's a screenshot of the log:
image

This is using v4 of codecov action.

@drazisil-codecov
Copy link
Contributor

@HarelM ,

Can you see if passing disable_search to the action fixes this?

@HarelM
Copy link
Author

HarelM commented Apr 10, 2024

Thanks! Looks like disable_search solves this issue, but I would expect files and search to be mutually exclusive - i.e. if I set files search should be disabled and if I don't set files search should be enabled, or at least these should be the defaults unless overwritten.

@drazisil-codecov
Copy link
Contributor

Thanks! Looks like disable_search solves this issue, but I would expect files and search to be mutually exclusive - i.e. if I set files search should be disabled and if I don't set files search should be enabled, or at least these should be the defaults unless overwritten.

I don't disagree! I think the challenge was, by the time we realized that it didn't enough customers were using the action that just turning it off would have broken a lot of coverage for folks, since coverage files that had been found would suddenly stop being uploaded.

We don't always do the best job at it, but we try really hard not to fundamentally change your coverage on your without warning.

Glad that worked as I hoped.

(@rohan-at-sentry Please see customer feedback above <3

@HarelM
Copy link
Author

HarelM commented Apr 10, 2024

Well, in my case it did change the coverage from something I expected to something else, but yes, backwards compatibility isn't easy...

asalzburger pushed a commit to acts-project/acts that referenced this issue May 24, 2024
## Issue
For about a week, we did not get any coverage reports added to PRs.
Reason was a failing upload, due to the codecov rate limit.
`[2024-05-24T09:08:19.271Z] ['error'] There was an error running the
uploader: Error uploading to https://codecov.io: Error: There was an
error fetching the storage URL during POST: 429 - {'detail':
ErrorDetail(string='Rate limit reached. Please upload with the Codecov
repository upload token to resolve issue. Expected time to availability:
2453s.', code='throttled')}`

## Solution - Update from `codecov-action@v3` to `codecov-action@v4`.
To keep the same coverage, we need to add the flag `disable_search:
true`. Otherwise, around 1500 coverage files would be uploaded and
increase our coverage from 50% to 85%. This solution was suggested in:
- codecov/codecov-action#1354

Maybe we need to add the token as `token: ${{ secrets.CODECOV_TOKEN }}`,
when we run into the rate-limit again. But it might not necessary, since
they enabled token-free uploads for forks of open-source repositories.

## Coverage Change -1.63%
The change seems to be due to 2 reasons:
- The old HEAD lies 14 commits in the past
- Ending `}` are not counted as "covered" and just ignored. Therefore
the relative amount of uncovered parts is increased.
EleniXoch pushed a commit to EleniXoch/acts that referenced this issue May 31, 2024
## Issue
For about a week, we did not get any coverage reports added to PRs.
Reason was a failing upload, due to the codecov rate limit.
`[2024-05-24T09:08:19.271Z] ['error'] There was an error running the
uploader: Error uploading to https://codecov.io: Error: There was an
error fetching the storage URL during POST: 429 - {'detail':
ErrorDetail(string='Rate limit reached. Please upload with the Codecov
repository upload token to resolve issue. Expected time to availability:
2453s.', code='throttled')}`

## Solution - Update from `codecov-action@v3` to `codecov-action@v4`.
To keep the same coverage, we need to add the flag `disable_search:
true`. Otherwise, around 1500 coverage files would be uploaded and
increase our coverage from 50% to 85%. This solution was suggested in:
- codecov/codecov-action#1354

Maybe we need to add the token as `token: ${{ secrets.CODECOV_TOKEN }}`,
when we run into the rate-limit again. But it might not necessary, since
they enabled token-free uploads for forks of open-source repositories.

## Coverage Change -1.63%
The change seems to be due to 2 reasons:
- The old HEAD lies 14 commits in the past
- Ending `}` are not counted as "covered" and just ignored. Therefore
the relative amount of uncovered parts is increased.
Matthewharri pushed a commit to Matthewharri/acts that referenced this issue Jun 18, 2024
## Issue
For about a week, we did not get any coverage reports added to PRs.
Reason was a failing upload, due to the codecov rate limit.
`[2024-05-24T09:08:19.271Z] ['error'] There was an error running the
uploader: Error uploading to https://codecov.io: Error: There was an
error fetching the storage URL during POST: 429 - {'detail':
ErrorDetail(string='Rate limit reached. Please upload with the Codecov
repository upload token to resolve issue. Expected time to availability:
2453s.', code='throttled')}`

## Solution - Update from `codecov-action@v3` to `codecov-action@v4`.
To keep the same coverage, we need to add the flag `disable_search:
true`. Otherwise, around 1500 coverage files would be uploaded and
increase our coverage from 50% to 85%. This solution was suggested in:
- codecov/codecov-action#1354

Maybe we need to add the token as `token: ${{ secrets.CODECOV_TOKEN }}`,
when we run into the rate-limit again. But it might not necessary, since
they enabled token-free uploads for forks of open-source repositories.

## Coverage Change -1.63%
The change seems to be due to 2 reasons:
- The old HEAD lies 14 commits in the past
- Ending `}` are not counted as "covered" and just ignored. Therefore
the relative amount of uncovered parts is increased.
abrain added a commit to abrain/einsatzverwaltung that referenced this issue Aug 17, 2024
@glen-84
Copy link

glen-84 commented Sep 11, 2024

I agree that the search should be disabled when using the file or files option.

I also don't understand the reasoning for not making this change, since, as far as I know, when using file(s), it won't actually upload other files that are found by the search, it just outputs the search result (list of files found).

@drazisil-codecov
Copy link
Contributor

@aj-codecov We may want to take another look at this behavior. Here's another example of feedback:

codecov/feedback#248 (comment)

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

No branches or pull requests

3 participants