Coverage not displayed on some differentials


#1

Hi,

I’m using Phabricator along with the Phabricator Jenkins plugin. One of the features I’ve found very useful is the plugin’s ability to post coverage data back to Phabricator, which then gets nicely displayed at the right side of the files in the Differential. Recently, I’ve encountered a puzzling problem, where the coverage data only shows up in the UI for some of the Differentials, but not all. (To clarify, it’s not that refreshing the same diff shows coverage some times but not other times, but that some diffs always show coverage, while other diffs always do not.)

I tried investigating a little further, and using the buildTargetPHID logged by the Jenkins plugin, I was able to verify that coverage data missing from the Differential UI does indeed exist in Phabricator’s database. An example is below:

mysql> SELECT * FROM harbormaster_buildunitmessage WHERE buildTargetPHID = 'PHID-HMBT-35dkkdavhuqvtipqsy3m';
+----------+--------------------------------+---------+----------------------------------------------+----------------------+--------+-------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+--------------+
| id     | buildTargetPHID                | engine  | namespace                                    | name                 | result | duration          | properties                                                                                                                                                                                                                                                                                                        | dateCreated | dateModified |
+----------+--------------------------------+---------+----------------------------------------------+----------------------+--------+-------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+--------------+
# Several result rows omitted for brevity
| 424500 | PHID-HMBT-35dkkdavhuqvtipqsy3m | Jenkins | tests.appone.test_views.TestList             | test_get             | pass   | 0.026623487472534 | []                                                                                                                                                                                                                                                                                                                |  1518478566 |   1518478566 |
| 424501 | PHID-HMBT-35dkkdavhuqvtipqsy3m | Jenkins | tests.apptwo.test_views.TestList             | test_get             | pass   |  0.50062656402588 | []                                                                                                                                                                                                                                                                                                                |  1518478566 |   1518478566 |
| 424502 | PHID-HMBT-35dkkdavhuqvtipqsy3m |         |                                              | Coverage Data        | pass   |                 0 | {"coverage":{"appone\/views.py":"CCNCNCCCCCNCNNCCNNNNCCNCCCCCCCCNNCCCCCCCCCCCNNNCNNCNNCCCNCNNNNCCCC","apptwo\/views.py":"CCNCCNNCCCCCNCCNNCCCCCCC","appthree\/views.py":"CCNCCCCCNNCCNNCNCCCNNCNCCCNNNCNNNNNNNNCNCCNCCNCCNNNCCNNNNCCNNNNCNNCCNNCNNNNNNNCCCCCNNCNNNNNNNNNNNNCCNNNNCCCCNNCNNCNNCNNNNNCCNNC"}}       |  1518478566 |   1518478566 |
+----------+--------------------------------+---------+----------------------------------------------+----------------------+--------+-------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+--------------+

I’ve poked around some other database tables as well (such as harbormaster_buildtarget and harbormaster_buildable), but haven’t seen anything that seems like it would prevent associating the diff with its coverage data. The only difference I’ve noticed between diffs with or without coverage is the Diffusion repository they are associated with - it seems like diffs for some repositories always have coverage while diffs from other (more recently-created) repositories always do not. I’ve combed through the various configuration options Diffusion exposes through the “Manage Repository” pages, but haven’t found any differences in the settings between repositories that have working coverage vs. ones that do not.

If anyone is aware of some setting that I’ve overlooked or has suggestions on how to further investigate this, that would be much appreciated! :slight_smile: