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

Github action: uploading to coveralls fails since 2 December for version 1.9.1 with repo_token from env #211

Closed
jberends opened this issue Dec 3, 2019 · 2 comments

Comments

@jberends
Copy link

jberends commented Dec 3, 2019

My github action seem to start failing at or around the time of the update of coveralls from 1.8.2 to 1.9.1.

Per the docs (which are a bit wonky here and there, see #206 ) we expose a COVERALLS_REPO_TOKEN being stored as a secret in the repositorty secrets (settings > secrets). The github action workflow can be found here

This is the output of the last working example:

ref: https://github.com/KE-works/pykechain/runs/329621318

Mon, 02 Dec 2019 17:17:03 GMT - Successfully installed coveralls-1.8.2 docopt-0.6.2
Mon, 02 Dec 2019 17:17:03 GMT - Submitting coverage to coveralls.io...
Mon, 02 Dec 2019 17:17:03 GMT - Coverage submitted!
Mon, 02 Dec 2019 17:17:05 GMT - Job ##74.1
Mon, 02 Dec 2019 17:17:05 GMT - https://coveralls.io/jobs/56368806

After the 2nd of december I get the following error across all branches.

Successfully installed coveralls-1.9.1 docopt-0.6.2
Tue, 03 Dec 2019 20:55:33 GMT - Submitting coverage to coveralls.io...
Tue, 03 Dec 2019 20:55:33 GMT - Could not submit coverage: 422 Client Error: Unprocessable Entity for url: https://coveralls.io/api/v1/jobs
Tue, 03 Dec 2019 20:55:34 GMT - Traceback (most recent call last):
Tue, 03 Dec 2019 20:55:34 GMT -   File "/opt/hostedtoolcache/Python/3.6.9/x64/lib/python3.6/site-packages/coveralls/api.py", line 185, in wear
Tue, 03 Dec 2019 20:55:34 GMT -     response.raise_for_status()
Tue, 03 Dec 2019 20:55:34 GMT -   File "/opt/hostedtoolcache/Python/3.6.9/x64/lib/python3.6/site-packages/requests/models.py", line 940, in raise_for_status
Tue, 03 Dec 2019 20:55:34 GMT -     raise HTTPError(http_error_msg, response=self)
Tue, 03 Dec 2019 20:55:34 GMT - requests.exceptions.HTTPError: 422 Client Error: Unprocessable Entity for url: https://coveralls.io/api/v1/jobs
Tue, 03 Dec 2019 20:55:34 GMT - 
Tue, 03 Dec 2019 20:55:34 GMT - During handling of the above exception, another exception occurred:
Tue, 03 Dec 2019 20:55:34 GMT - 
Tue, 03 Dec 2019 20:55:34 GMT - Traceback (most recent call last):
Tue, 03 Dec 2019 20:55:34 GMT -   File "/opt/hostedtoolcache/Python/3.6.9/x64/lib/python3.6/site-packages/coveralls/cli.py", line 77, in main
Tue, 03 Dec 2019 20:55:34 GMT -     result = coverallz.wear()
Tue, 03 Dec 2019 20:55:34 GMT -   File "/opt/hostedtoolcache/Python/3.6.9/x64/lib/python3.6/site-packages/coveralls/api.py", line 188, in wear
Tue, 03 Dec 2019 20:55:34 GMT -     raise CoverallsException('Could not submit coverage: {}'.format(e))
Tue, 03 Dec 2019 20:55:34 GMT - coveralls.exception.CoverallsException: Could not submit coverage: 422 Client Error: Unprocessable Entity for url: https://coveralls.io/api/v1/jobs
Tue, 03 Dec 2019 20:55:34 GMT - ##[error]Process completed with exit code 1.

coveralls debug results in

Successfully installed coveralls-1.9.1 docopt-0.6.2
Missing .coveralls.yml file. Using only env variables.
Testing coveralls-python...
{"source_files": [ ... ]
... more stuff ...
"config_file": ".coveragerc", "repo_token": "[secure]", "service_name": "github"}

It seems that the token is picket up correctly from the environment, but for some reason not used in the transfer to coveralls?

I also tested if github did change something to their secrets API or that github failed to expose the environment variables in the the shell, but those test pass successfully.

One remedy is to pin coveralls on 1.8.2 and that fixes the problem. Was there something changed in the coveralls package regarding github. I believe so when I look at the CHANGELOG

@jberends jberends changed the title GITHUB action uploading to coveralls fails since 2 December for version 1.9.1 with repo_token from env h action uploading to coveralls fails since 2 December for version 1.9.1 with repo_token from env Dec 3, 2019
@jberends jberends changed the title h action uploading to coveralls fails since 2 December for version 1.9.1 with repo_token from env Github action: uploading to coveralls fails since 2 December for version 1.9.1 with repo_token from env Dec 3, 2019
@jberends
Copy link
Author

jberends commented Dec 3, 2019

#autoresolve

In the mean time; a new release of coveralls was released to PyPI, while I was editing the issue and testing.

Pinning python-coveralls on version 1.9.2 fixes the problem
see: https://github.com/KE-works/pykechain/runs/331896542

Tue, 03 Dec 2019 21:12:19 GMT - Installing collected packages: docopt, coveralls
Tue, 03 Dec 2019 21:12:19 GMT - Successfully installed coveralls-1.9.2 docopt-0.6.2
Tue, 03 Dec 2019 21:12:19 GMT - Submitting coverage to coveralls.io...
Tue, 03 Dec 2019 21:12:19 GMT - Coverage submitted!
Tue, 03 Dec 2019 21:12:21 GMT - Job ##76.1
Tue, 03 Dec 2019 21:12:21 GMT - https://coveralls.io/jobs/56429602

@TheKevJames
Copy link
Owner

Glad to hear its resolved -- thanks again to @ArturKlauser on #209 for the fix.

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

2 participants