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

Cannot Post Job Data #10

Open
JoelScarfone opened this issue May 2, 2018 · 4 comments
Open

Cannot Post Job Data #10

JoelScarfone opened this issue May 2, 2018 · 4 comments

Comments

@JoelScarfone
Copy link

JoelScarfone commented May 2, 2018

The Json i tried:

{
"repo_token": "NWUxS2tnbDVVTVlxcE1PV2pVWkFuMDdUdnBwclM0d0U0b0VSclFqeA==",
"source_files": [{
"name": "lib/example.rb",
"source_digest": "1eb14b3a053f951ca925f2fd4d633eeb",
"coverage": [null, 1, 1, 0]
}]
}

curl --form "[email protected]" http://localhost:4000/api/v1/jobs

And i'm getting "Server internal error"

@JoelScarfone
Copy link
Author

Getting response code 422.

@JoelScarfone
Copy link
Author

It seems the coveralls API uses "source_digest" as the key for the md5 of the file, while OpenCov requires it to be "source". Is this a bug?

@danhper
Copy link
Owner

danhper commented May 2, 2018

No, it is rather a change of API on the coveralls side.
The documentation still mentions the older approach.

The source code is stored as a string, and the line-by-line coverage data is stored as an array.

Most client libraries seem to still be using source though:

So it should still work for a while I think, but OpenCov should be updated to be compatible with both API. Unfortunately, I will not have time to work on this right now, as it will require a little bit of work to fetch the source files instead of using the files stored in the DB. If you are interested in helping, it would of course be greatly appreciated.

Thank you.

@Fs02
Copy link

Fs02 commented Sep 26, 2018

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

3 participants