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

coverage upload not working #3459

Closed
trichter opened this issue May 23, 2024 · 10 comments · Fixed by #3467
Closed

coverage upload not working #3459

trichter opened this issue May 23, 2024 · 10 comments · Fixed by #3467
Labels
CI issue generally related to continuous integration
Milestone

Comments

@trichter
Copy link
Member

Here is a representative message from the github actions runner:

warning - 2024-05-23 09:32:54,825 -- Some files were not found --- {"not_found_files": ["obspy/coverage.xml"]}
info - 2024-05-23 09:32:54,891 -- Found 12 coverage files to report
info - 2024-05-23 09:32:54,891 -- > /home/runner/work/obspy/obspy/obspy/io/focmec/tests/data/focmec_all.lst
info - 2024-05-23 09:32:54,891 -- > /home/runner/work/obspy/obspy/obspy/io/focmec/tests/data/focmec_8sta-noratios.lst
info - 2024-05-23 09:32:54,891 -- > /home/runner/work/obspy/obspy/obspy/io/focmec/tests/data/focmec_qedUWne.lst
info - 2024-05-23 09:32:54,891 -- > /home/runner/work/obspy/obspy/build/lib.linux-x86_64-cpython-312/obspy/taup/tests/data/sample_ttimes_ak135.lst
info - 2024-05-23 09:32:54,891 -- > /home/runner/work/obspy/obspy/obspy/taup/tests/data/sample_ttimes_ak135.lst
info - 2024-05-23 09:32:54,891 -- > /home/runner/work/obspy/obspy/obspy/io/focmec/tests/data/focmec_8sta.lst
info - 2024-05-23 09:32:54,891 -- > /home/runner/work/obspy/obspy/build/lib.linux-x86_64-cpython-312/obspy/io/focmec/tests/data/focmec_qedUWne.lst
info - 2024-05-23 09:32:54,891 -- > /home/runner/work/obspy/obspy/obspy/taup/tests/data/sample_ttimes_iasp91.lst
info - 2024-05-23 09:32:54,891 -- > /home/runner/work/obspy/obspy/build/lib.linux-x86_64-cpython-312/obspy/io/focmec/tests/data/focmec_8sta.lst
info - 2024-05-23 09:32:54,891 -- > /home/runner/work/obspy/obspy/build/lib.linux-x86_64-cpython-312/obspy/taup/tests/data/sample_ttimes_iasp91.lst
info - 2024-05-23 09:32:54,892 -- > /home/runner/work/obspy/obspy/build/lib.linux-x86_64-cpython-312/obspy/io/focmec/tests/data/focmec_8sta-noratios.lst
info - 2024-05-23 09:32:54,892 -- > /home/runner/work/obspy/obspy/build/lib.linux-x86_64-cpython-312/obspy/io/focmec/tests/data/focmec_all.lst
warning - 2024-05-23 09:32:54,902 -- There was an issue decoding: obspy/io/ah/tests/data/ah1.c, file fixes were not applied to this file.
warning - 2024-05-23 09:32:54,902 -- There was an issue decoding: obspy/io/ah/tests/data/ah2.c, file fixes were not applied to this file.
info - 2024-05-23 09:32:55,040 -- Process Upload complete
error - 2024-05-23 09:32:55,041 -- Upload failed: {"detail":"You do not have permission to perform this action."}
@trichter trichter added the CI issue generally related to continuous integration label May 23, 2024
@trichter trichter added this to the 1.5.0 milestone May 23, 2024
@megies
Copy link
Member

megies commented May 23, 2024

Maybe the token or whatever we use for auth expired

@megies
Copy link
Member

megies commented May 23, 2024

@trichter I copied the token it shows after login in to codecov into our github actions secrets again and pushed an empty commit on master to trigger CI, let's see

@d-chambers
Copy link
Member

By looking at the installed apps it looks like we don't have the codecov app installed for the ObsPy repo. I see we have a fresh CI token added only a few weeks ago, but if the app wasn't installed it might raise this kind of error when the bot tries to leave a comment about coverage on the PR page.

@d-chambers
Copy link
Member

Ok, I just installed it. Next CI trigger let's see if it solves the issue.

@megies
Copy link
Member

megies commented May 24, 2024

Still the same..

error - 2024-05-24 06:43:06,448 -- Upload failed: {"detail":"You do not have permission to perform this action."}

@d-chambers
Copy link
Member

This issue details an identical case. There are different scopes for codecov tokens. It is possible that whoever added the codecov token last week (I can't see who) accidentally added a personal token or token scoped to a different project. So we need to log into codecov and select the obspy organization before generating the token. But, for some reason when I log into codecov I can't select the ObsPy organization. Does anyone have that option?

image

@QuLogic
Copy link
Member

QuLogic commented May 30, 2024

I went to https://app.codecov.io/gh/obspy/obspy/settings, regenerated the token, updated the repository secrets, and restarted the last workflow, and I think it worked? https://github.com/obspy/obspy/actions/runs/9219754931/job/25583901396#step:10:74

@QuLogic
Copy link
Member

QuLogic commented May 30, 2024

However, these seem to have all errored? https://app.codecov.io/gh/obspy/obspy/commit/cd08b60d9d841ce20a37a1676fdac47e87d25493

Perhaps because it's set to the wrong file, and found the wrong files instead?

Some files were not found --- {"not_found_files": ["obspy/coverage.xml"]}
info - 2024-05-30 02:32:50,575 -- Found 12 coverage files to report
info - 2024-05-30 02:32:50,575 -- > /home/runner/work/obspy/obspy/obspy/io/focmec/tests/data/focmec_8sta-noratios.lst
info - 2024-05-30 02:32:50,575 -- > /home/runner/work/obspy/obspy/build/lib.linux-x86_64-cpython-38/obspy/taup/tests/data/sample_ttimes_ak135.lst
info - 2024-05-30 02:32:50,575 -- > /home/runner/work/obspy/obspy/obspy/taup/tests/data/sample_ttimes_ak135.lst
info - 2024-05-30 02:32:50,575 -- > /home/runner/work/obspy/obspy/build/lib.linux-x86_64-cpython-38/obspy/io/focmec/tests/data/focmec_8sta-noratios.lst
info - 2024-05-30 02:32:50,575 -- > /home/runner/work/obspy/obspy/build/lib.linux-x86_64-cpython-38/obspy/io/focmec/tests/data/focmec_qedUWne.lst
info - 2024-05-30 02:32:50,575 -- > /home/runner/work/obspy/obspy/obspy/io/focmec/tests/data/focmec_qedUWne.lst
info - 2024-05-30 02:32:50,575 -- > /home/runner/work/obspy/obspy/build/lib.linux-x86_64-cpython-38/obspy/taup/tests/data/sample_ttimes_iasp91.lst
info - 2024-05-30 02:32:50,576 -- > /home/runner/work/obspy/obspy/build/lib.linux-x86_64-cpython-38/obspy/io/focmec/tests/data/focmec_all.lst
info - 2024-05-30 02:32:50,576 -- > /home/runner/work/obspy/obspy/obspy/io/focmec/tests/data/focmec_8sta.lst
info - 2024-05-30 02:32:50,576 -- > /home/runner/work/obspy/obspy/obspy/taup/tests/data/sample_ttimes_iasp91.lst
info - 2024-05-30 02:32:50,576 -- > /home/runner/work/obspy/obspy/build/lib.linux-x86_64-cpython-38/obspy/io/focmec/tests/data/focmec_8sta.lst
info - 2024-05-30 02:32:50,576 -- > /home/runner/work/obspy/obspy/obspy/io/focmec/tests/data/focmec_all.lst
warning - 2024-05-30 02:32:50,587 -- There was an issue decoding: obspy/io/ah/tests/data/ah1.c, file fixes were not applied to this file.
warning - 2024-05-30 02:32:50,587 -- There was an issue decoding: obspy/io/ah/tests/data/ah2.c, file fixes were not applied to this file.

@trichter
Copy link
Member Author

Inside obspy-runtests we cd to obspy's root directory. The coverage.xml is probably laying around there and the coverage upload script cannot find it. We can specify the output location of the coverage.xml file with obspy-runtests ... --cov=xml:abs_output_loc

@trichter
Copy link
Member Author

I think the current setup only works with an editable install, which we used a while ago on github actions.

@trichter trichter mentioned this issue May 30, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI issue generally related to continuous integration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants