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

Multiple travis CI builds against the same PR are failed by coveralls.io on a public repo #213

Open
irfanurrehman opened this issue May 30, 2022 · 1 comment

Comments

@irfanurrehman
Copy link
Contributor

irfanurrehman commented May 30, 2022

We have been hitting a goveralls build failure where the coveralls.io api returns a failure for a different build on the same PR on a CI build in travis with a below error response:

bad response status from coveralls: 422
{"message":"service_job_id (571646577) must be unique for Travis Jobs not supplying a Coveralls Repo Token","error":true}

This check seems to have been introduced recently.
The first build passes but any subsequent one fails (for example adding a commit to the PR after review fixes).

AFAIK this is because goveralls uses the TRAVIS_JOB_ID which remains same for subsequent CI builds on the same PR.
The TRAVIS_BUILD_ID however is unique for each subsequent build on the same PR.

image

A full build log of the above is available here

I did try forcing my goveralls invocation in my CI script to use the TRAVIS_BUILD_ID instead of TRAVIS_JOB_ID, something like COVERALLS_SERVICE_JOB_ID=$TRAVIS_BUILD_ID, but it did not work, error pasted below:

bad response status from coveralls: 422
{"message":"Travis API Error: #\u003cCoveralls::Mash message=\"The job(251255975) couldn't be found\"\u003e. ","error":true}

A full build log of the above is available here

It seems coveralls.io keeps the build details based on the travis job id.

I also contemplated using the coveralls repo token, but coveralls.io does not give me a token for public github repos.

Any recommended solution or a workaround will be of huge help; our CI is sort of broken because of this

The list of available TRAVIS default env vars are available here.

@irfanurrehman irfanurrehman changed the title Multiple builds against the same PR are failed by coveralls.io on a public repo Multiple travis CI builds against the same PR are failed by coveralls.io on a public repo May 30, 2022
@irfanurrehman
Copy link
Contributor Author

@mattn @shogo82148

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

1 participant