Closed geshwho closed 5 years ago
@mtamhankar1 at the moment only https://github.com/codacy/codacy-coverage-reporter supports partial coverage.
Regarding the guidance I think your idea is nice I would maybe use a parameter in the cli instead of an environment variable to identify that it was a partial.
The final request would need in some way to be "centralised", so you can add a command to this library or just another flag that can be invoked when all the partials are done.
Not sure if answered your questions. Let me know what you think.
Regarding the guidance I think your idea is nice I would maybe use a parameter in the cli instead of an environment variable to identify that it was a partial.
I am still perhaps a little bit confused on this piece, since the usage is not in the cli but rather is invoked in spec_helper.rb
as Codacy::Reporter.start
. So is the suggestion here to add a parameter such that a user could instead call something like Codacy::Reporter.start(partial: true)
?
The final request would need in some way to be "centralised", so you can add a command to this library or just another flag that can be invoked when all the partials are done.
I can certainly add a command for the final request, I think this makes the most sense.
You are right, I got a bit confused during the answer. That looks good.
I wanted to submit a Pull Request to add support for partial updates to the coverage. Without this, we are unable to run a test suite with any amount parallelism, since Codacy will simply take the last coverage report to be the full report.
Can you provide any guidance on how to go about this? Thus far, I am thinking of using a new ENV variable to enable the partial update, and add the partial query parameter to the url accordingly. This way, if there are 2 or more servers running the test suite and the environment variable is appropriately set, each server will provide its partial update.
I am not yet sure how (or where) to go about sending the
coverageFinal
request to indicate all parts have been sent.Thanks!