Opened 16 years ago
Closed 15 years ago
#365 closed defect (fixed)
Coverage line annotations don't appear on source browser
Reported by: | François Granade <bitten@…> | Owned by: | osimons |
---|---|---|---|
Priority: | critical | Milestone: | 0.6 |
Component: | Trac plugin | Version: | dev |
Keywords: | Cc: | ||
Operating System: |
Description (last modified by osimons)
My build is a quite "standard" build using "<python:trace summary="...", etc" to generate coverage information. But I don't see the information about code coverage in the code browser: when, in the "Code Coverage" tab of the report, I click on one of the "Units" (i.e. a Python module/file), I get to the browser, but the "Cov" column is empty.
Looking in the code, it seems to be because the repository path was expecting to start with at "/": but the Admin does not let me do that (it actually removes any initial "/" I may put in the repository path).
I think it's critical because it's really sad that this great feature is not working - or maybe it's only for me :).
It can be fixed with a small patch - attached.
Attachments (5)
Change History (11)
Changed 16 years ago by François Granade <bitten@…>
Changed 16 years ago by François Granade <bitten@…>
Diff in unified format - This is the correct one ! - The previous one had too much stuff
Changed 15 years ago by hodgestar+bitten@…
Fix annotation revision and config path handling (made against r641)
comment:1 Changed 15 years ago by hodgestar+bitten@…
It looks like the patch in attachment:"bitten_ticket_365.2.2.diff" got applied to trunk but that this ticket was never updated. However, I think the fix was not quite right. It appears that sometimes config.path can start with a slash and sometimes not.
There is also another minor bug that can prevent annotations from being displayed. Currently trunk reads the revision number using resource.revision. As far as I can tell, this is always the latest revision for the given resource. When looking up the annotations the revision needed is the revision against which the build and coverage where run. This revision is passed in as an argument to the request.
The patch attachment:"annotation-revision-and-config-path.diff" fixes both issues for me.
comment:2 Changed 15 years ago by osimons
- Description modified (diff)
- Owner changed from cmlenz to osimons
None of these patches that manipulate paths will work on Windows.
In my test recipes I can't really reproduce the problem - could someone please help me out with a failing recipe (and any information for repos setup, os versions and similar if relevant)?
I'll hang on to this ticket awaiting a way of reproducing the error.
comment:3 Changed 15 years ago by anonymous
Have you actually tested on Windows? My assumption was that these paths are all really URL fragments and so '/' is the only allowed separator. If this is not the case the existing .lstrip('/') one line 191 presumably also needs replacing.
comment:4 Changed 15 years ago by osimons
Nope, haven't tested patches - nothing I got is failing, so testing won't make sense until I can reproduce.
comment:5 Changed 15 years ago by osimons
Ah. I had never actually seen it work properly, so I was obviously not fully understanding how this should work. Sorry for that, but rest assured I have now worked through everything from coverage report parsing to final annotation output :-)
Could you please try my patch - attachment:t365-annotate-r681.diff, covering much the same fixes I think. It also tones down the extremely bright colors used for annotation, and cuts down on logging substantially :-)
comment:6 Changed 15 years ago by osimons
- Resolution set to fixed
- Status changed from new to closed
It works well for me and it also fixes some other issues. I've gone ahead and committed it in [687], please reopen if any issues remain.
Fix for this ticket