Newsboat: submit-to-coveralls.sh fails to submit results to coveralls in PRs

Created on 17 Jan 2020  路  4Comments  路  Source: newsboat/newsboat

Newsboat version: git: a3a0681 (https://github.com/newsboat/newsboat/pull/720)

Steps to reproduce the issue:

  1. Create a pull request
  2. Wait for Travis CI builds to finish
  3. Check results of Test Coverage job

It looks like the final curl call fails with HTTP code 422 (Unprocessable Entity)

Other info you think is relevant:

Expand the log at the line showing ./submit-to-coveralls.sh:
https://travis-ci.org/newsboat/newsboat/jobs/638128445#L1711

curl output:

HTTP/2 422 
date: Thu, 16 Jan 2020 21:48:50 GMT
content-type: application/json; charset=utf-8
content-length: 72
set-cookie: __cfduid=d132de58a9c26bf8e4ade6bc7ef3c144c1579211329; expires=Sat, 15-Feb-20 21:48:49 GMT; path=/; domain=.coveralls.io; HttpOnly; SameSite=Lax
cache-control: no-cache
status: 422 Unprocessable Entity
strict-transport-security: max-age=15552000
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-powered-by: Phusion Passenger Enterprise 5.3.7
x-request-id: 14b428fc-0590-45a8-ab70-7cc9d8b24eed
x-runtime: 0.180323
x-xss-protection: 1; mode=block
cf-cache-status: DYNAMIC
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
server: cloudflare
cf-ray: 55634bbc2bf83808-ATL
bug meta

Most helpful comment

I believe https://github.com/newsboat/newsboat/commit/948e3e37065babb2eeb8216328292f5a4819c1a9 fixed this for good. I'll have to switch back to installing grcov from crates.io, once all my changes are upstreamed, but that's of no concern for this issue.

Now just waiting for someone to submit a PR so I can test this :)

All 4 comments

Thank you for the report! I'm pretty sure this is because of Travis hiding secret variables from PRs鈥攐ur Coveralls token is stored in such a variable, and we can't submit coverage without it. We recently switched from cpp-coveralls to grcov to submit our coverage, and I only tested it on my own PRs, which I pushed directly to this repo鈥攖hat's why I didn't notice the problem.

I'll look at cpp-coveralls to figure out how it works around the problem.

Looks like cpp-coveralls is using service_job_id and service_name, leveraging the fact that Coveralls has special support for Travis. I think this is going to be fixed by https://github.com/mozilla/grcov/pull/376

I believe https://github.com/newsboat/newsboat/commit/948e3e37065babb2eeb8216328292f5a4819c1a9 fixed this for good. I'll have to switch back to installing grcov from crates.io, once all my changes are upstreamed, but that's of no concern for this issue.

Now just waiting for someone to submit a PR so I can test this :)

Shown to be working both for PRs from this repo and for PRs from forks.

Was this page helpful?
0 / 5 - 0 ratings