Project

General

Profile

action #163187

Updated by mkittler 4 months ago

It runs into a 401 error, currently most of the time: 

 ``` 
 ./"codecov" -v create-commit -t <redacted> 
 info - 2024-06-25 15:25:46,820 -- ci service found: circleci 
 debug - 2024-06-25 15:25:46,822 -- versioning system found: <class 'codecov_cli.helpers.versioning_systems.GitVersioningSystem'> 
 debug - 2024-06-25 15:25:46,824 -- versioning system found: <class 'codecov_cli.helpers.versioning_systems.GitVersioningSystem'> 
 debug - 2024-06-25 15:25:46,825 -- Loading config from /home/squamata/project/codecov.yml 
 debug - 2024-06-25 15:25:46,830 -- Starting create commit process --- {"commit_sha": "d100e336909c09e6cb8fe51e6c92488610634411", "parent_sha": null, "pr": "5723", "branch": "pull/5723", "slug": "os-autoinst/openQA", "token": "", "service": "github", "enterprise_url": null} 
 info - 2024-06-25 15:25:46,898 -- Process Commit creating complete 
 debug - 2024-06-25 15:25:46,899 -- Commit creating result --- {"result": "RequestResult(error=RequestError(code='HTTP Error 401', params={}, description='{\"detail\":\"Invalid token header. No credentials provided.\"}'), warnings=[], status_code=401, text='{\"detail\":\"Invalid token header. No credentials provided.\"}')"} 
 error - 2024-06-25 15:25:46,899 -- Commit creating failed: {"detail":"Invalid token header. No credentials provided."} 
 ./"codecov" -v create-report -t <redacted> 
 info - 2024-06-25 15:25:47,778 -- ci service found: circleci 
 debug - 2024-06-25 15:25:47,779 -- versioning system found: <class 'codecov_cli.helpers.versioning_systems.GitVersioningSystem'> 
 debug - 2024-06-25 15:25:47,781 -- versioning system found: <class 'codecov_cli.helpers.versioning_systems.GitVersioningSystem'> 
 debug - 2024-06-25 15:25:47,782 -- Loading config from /home/squamata/project/codecov.yml 
 debug - 2024-06-25 15:25:47,788 -- Starting create report process --- {"commit_sha": "d100e336909c09e6cb8fe51e6c92488610634411", "code": "default", "slug": "os-autoinst/openQA", "service": "github", "enterprise_url": null, "token": ""} 
 info - 2024-06-25 15:25:47,826 -- Process Report creating complete 
 debug - 2024-06-25 15:25:47,826 -- Report creating result --- {"result": "RequestResult(error=RequestError(code='HTTP Error 401', params={}, description='{\"detail\":\"Invalid token header. No credentials provided.\"}'), warnings=[], status_code=401, text='{\"detail\":\"Invalid token header. No credentials provided.\"}')"} 
 error - 2024-06-25 15:25:47,826 -- Report creating failed: {"detail":"Invalid token header. No credentials provided."} 
 ./codecov -v do-upload -t <redacted> -n "130467"     -f cover_db/codecov.json 
 info - 2024-06-25 15:25:48,692 -- ci service found: circleci 
 debug - 2024-06-25 15:25:48,693 -- versioning system found: <class 'codecov_cli.helpers.versioning_systems.GitVersioningSystem'> 
 debug - 2024-06-25 15:25:48,695 -- versioning system found: <class 'codecov_cli.helpers.versioning_systems.GitVersioningSystem'> 
 debug - 2024-06-25 15:25:48,696 -- Loading config from /home/squamata/project/codecov.yml 
 debug - 2024-06-25 15:25:48,702 -- Starting upload processing --- {"branch": "pull/5723", "build_code": "130467", "build_url": "https://circleci.com/gh/os-autoinst/openQA/130467", "commit_sha": "d100e336909c09e6cb8fe51e6c92488610634411", "disable_file_fixes": false, "disable_search": false, "enterprise_url": null, "env_vars": {}, "files_search_exclude_folders": [], "files_search_explicitly_listed_files": ["cover_db/codecov.json"], "files_search_root_folder": "/home/squamata/project", "flags": [], "git_service": "github", "handle_no_reports_found": false, "job_code": "0", "name": "130467", "network_filter": null, "network_prefix": null, "network_root_folder": "/home/squamata/project", "plugin_names": ["xcode", "gcov", "pycoverage"], "pull_request_number": "5723", "report_code": "default", "slug": "os-autoinst/openQA", "token": "", "upload_file_type": "coverage"} 
 debug - 2024-06-25 15:25:48,702 -- Selected preparation plugins --- {"selected_plugins": ["<class 'codecov_cli.plugins.xcode.XcodePlugin'>", "<class 'codecov_cli.plugins.gcov.GcovPlugin'>", "<class 'codecov_cli.plugins.pycoverage.Pycoverage'>"]} 
 debug - 2024-06-25 15:25:48,702 -- Running preparation plugin: <class 'codecov_cli.plugins.xcode.XcodePlugin'> 
 debug - 2024-06-25 15:25:48,702 -- Running xcode plugin... 
 warning - 2024-06-25 15:25:48,702 -- xcrun is not installed or can't be found. 
 debug - 2024-06-25 15:25:48,702 -- Running preparation plugin: <class 'codecov_cli.plugins.gcov.GcovPlugin'> 
 debug - 2024-06-25 15:25:48,702 -- Running gcov plugin... 
 warning - 2024-06-25 15:25:48,822 -- No gcov data found. 
 debug - 2024-06-25 15:25:48,822 -- Running preparation plugin: <class 'codecov_cli.plugins.pycoverage.Pycoverage'> 
 warning - 2024-06-25 15:25:48,822 -- coverage.py is not installed or can't be found. 
 debug - 2024-06-25 15:25:48,823 -- Collecting relevant files 
 info - 2024-06-25 15:25:49,135 -- Found 6 coverage files to report 
 info - 2024-06-25 15:25:49,135 -- > /home/squamata/project/t/data/openqa-trigger-from-obs/BatchedProj/Batch1/.run_191216_150610/Media1_ftp_ftp.lst 
 info - 2024-06-25 15:25:49,135 -- > /home/squamata/project/t/data/openqa-trigger-from-obs/Proj1/.run_190703_143010_469.1/files_iso.lst 
 info - 2024-06-25 15:25:49,135 -- > /home/squamata/project/t/data/openqa-trigger-from-obs/BatchedProj/Batch2/.run_191216_150610/files_iso.lst 
 info - 2024-06-25 15:25:49,135 -- > /home/squamata/project/cover_db/codecov.json 
 info - 2024-06-25 15:25:49,135 -- > /home/squamata/project/t/data/openqa-trigger-from-obs/BatchedProj/Batch1/.run_191216_150610/files_iso.lst 
 info - 2024-06-25 15:25:49,135 -- > /home/squamata/project/t/data/openqa-trigger-from-obs/Proj1/.run_190701_143010_468.2/files_iso.lst 
 debug - 2024-06-25 15:25:49,163 -- Selected uploader to use: <class 'codecov_cli.services.upload.upload_sender.UploadSender'> 
 debug - 2024-06-25 15:25:49,173 -- Sending upload request to Codecov 
 info - 2024-06-25 15:25:49,212 -- Process Upload complete 
 debug - 2024-06-25 15:25:49,212 -- Upload result --- {"result": "RequestResult(error=RequestError(code='HTTP Error 401', params={}, description='{\"detail\":\"Invalid token header. No credentials provided.\"}'), warnings=[], status_code=401, text='{\"detail\":\"Invalid token header. No credentials provided.\"}')"} 
 error - 2024-06-25 15:25:49,212 -- Upload failed: {"detail":"Invalid token header. No credentials provided."} 
 ``` 

 It is still considered successful but the coverage report/statuses are missing. 

 ### Acceptance criteria 
 * **AC1**: Coverage checks in the openQA-CI work 

 ### Suggestions 
 * ~~Check Check if the issue is sporadic~~ DONE: Not sporadic. Haven't seen a single successful upload recently. sporadic 
 * Check if we need to renew a token 
 * Consider limit the way to reproduce by just trying to upload the report. No need to reconduct all tests with coverage for that 
 * Check whether the problem happens as well on https://github.com/openSUSE/open-build-service/pulls 
     * After a brief look it works there so it would make sense to see whether the CircleCI/Codecov setup on OBS is different. OBS is using CodeClimate primarily but they also still use codecov and stuff seems to still work on their side (see e.g. https://app.circleci.com/pipelines/github/openSUSE/open-build-service/19809/workflows/abbe028e-011e-44ab-9a1e-dd4fe55a9054/jobs/191497). 
 * Check https://github.com/codecov/feedback/issues (former https://community.codecov.com) or https://discuss.circleci.com (or just Google) for the problem 
     * After a brief look it doesn't seem to be a common issue. Maybe we can ask on those forums for help. 
 * *Done* Check whether the problem exists on os-autoinst (where we use GitHub actions instead of CircleCI) -> os-autoinst is fine, see https://github.com/os-autoinst/os-autoinst/pull/2509#issuecomment-2210522863 

 ### Workaround 
 Look at the coverage report uploaded as CircleCI artifact and merge PRs manually if it looks good.

Back