Closed Bug 1612986 Opened 5 years ago Closed 3 years ago

Hook New Tab/ASRouter/about:welcome etc Karma unit test coverage into codecov.moz.tools & phabricator

Categories

(Firefox :: Messaging System, task, P2)

task

Tracking

()

RESOLVED FIXED
101 Branch
Iteration:
101.2 - April 18 - April 29
Tracking Status
firefox74 --- wontfix
firefox75 --- wontfix
firefox76 --- wontfix
firefox77 --- wontfix
firefox98 --- wontfix
firefox99 --- wontfix
firefox100 --- wontfix
firefox101 --- fixed

People

(Reporter: Mardak, Assigned: dmosedale)

References

(Blocks 3 open bugs, )

Details

Attachments

(2 files)

+++ This bug was initially created as a clone of Bug #1567927 +++

After we get the activity-stream repo unit-tests working in taskcluster/treeherder, it would be nice to get them hooked into the tree-wide code-coverage infrastructure.

Flags: needinfo?(dmose)

https://github.com/mozilla/code-review/blob/master/docs/publication.md has the documentation related to how to do this. It's probably good to check in with bastien before moving forward to see the exact status of the migration to the new format and to make sure that outputting it will do the trick.

Flags: needinfo?(dmose)
Priority: -- → P2
Target Milestone: --- → Firefox 75

(In reply to Dan Mosedale (:dmose, :dmosedale) from comment #1)

https://github.com/mozilla/code-review/blob/master/docs/publication.md has the documentation related to how to do this. It's probably good to check in with bastien before moving forward to see the exact status of the migration to the new format and to make sure that outputting it will do the trick.

Note that this is the documentation to publish linting/static analysis issues on Phabricator. Hooking up code coverage data is a different thing.
You would need to simply make your tasks generate a "code-coverage-grcov.zip" artifact (a zip file containing a text file in LCOV format) such as the ones you can find now on test tasks (e.g. https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/cgtVg7oGQByhRbtpVo_A6A/runs/0/artifacts/public/test_info//code-coverage-grcov.zip).

We talked about this at the previous retrospective and agreed that we might want this sooner. Setting for reprioritization.

Priority: P2 → --
Iteration: --- → 76.2 - Mar 23 - Apr 5
Priority: -- → P2
Iteration: 76.2 - Mar 23 - Apr 5 → 77.1 - Apr 6 - Apr 19
Iteration: 77.1 - Apr 6 - Apr 19 → 77.2 - Apr 20 - May 3
Iteration: 77.2 - Apr 20 - May 3 → 78.1 - May 4 - May 17
Iteration: 78.1 - May 4 - May 17 → 78.2 - May 18 - May 31
Iteration: 78.2 - May 18 - May 31 → 79.1 - June 1 - June 14
Iteration: 79.1 - June 1 - June 14 → 79.2 - June 15 - June 28
Iteration: 79.2 - June 15 - June 28 → ---
Iteration: --- → 84.2 - Nov 2 - Nov 15
Iteration: 84.2 - Nov 2 - Nov 15 → 85.1 - Nov 16 - Nov 29
Iteration: 85.1 - Nov 16 - Nov 29 → ---
Priority: P2 → --
Assignee: nobody → dmosedale
Iteration: --- → 96.3 - Nov 29 - Dec 6
Priority: -- → P1
Iteration: 96.3 - Nov 29 - Dec 6 → 97.3 - Jan 3 - Jan 10
Iteration: 97.3 - Jan 3 - Jan 9 → 98.1 - Jan 10 - Jan 23

Attempting to make the above patch integrate correctly is failing in a way that doesn't tell us what the problem is. I've submitted a patch to the coverage bot over in https://github.com/mozilla/code-coverage/issues/1260 to improve the logging, and once that lands, we'll be able to submit another try job, which, if we're lucky, will give us some sense of the next steps are...

Iteration: 98.1 - Jan 10 - Jan 23 → 98.2 - Jan 24 - Feb 6
Attachment #9258356 - Attachment description: WIP: Bug 1612986 - add newtab mocha code coverage info → Bug 1612986 - add newtab mocha code coverage info, r?andreio,marco

The problem is exemplified, by https://coverage.moz.tools/#revision=latest&path=browser%2Fcomponents%2Fnewtab&view=directory , where the content-src subdirectory (which contains lots of code) doesn't appear because it doesn't currently get any code coverage data generated. If we're lucky, after this lands to mozilla-central, that will change, and if not, we will have a situation where we can start digging into any necessary next steps.

Pushed by dmosedale@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9f38653d6de8 add newtab mocha code coverage info, r=andreio,marco
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED

We don't seem to be there quite yet. This patch merged to mozilla-central about 5 hours ago, but https://coverage.moz.tools/#revision=latest&path=browser%2Fcomponents%2Fnewtab&view=directory still doesn't have a content-src subdirectory.

Reviewing lcov.info from inside the code-coverage-grcov.zip artifact from the newtab-ccov job on the treeherder merge commit shows entries with the content-src path, eg:

SF:content-src/aboutwelcome/components/HelpText.jsx

:marco, what would you suggest as far next debugging steps?

Status: RESOLVED → REOPENED
Flags: needinfo?(mcastelluccio)
Resolution: FIXED → ---

Interestingly, I don't see a source-test entry in the test-suite dropdown on https://coverage.moz.tools/.

The source-test entry is now available, but there is nothing covered if you select it.

I think the reason for the error is that the SF entries should be full paths to files in the repo, and so SF:content-src/aboutwelcome/components/HelpText.jsx should actually be SF:browser/components/newtab/content-src/aboutwelcome/components/HelpText.jsx.

Flags: needinfo?(mcastelluccio)
Iteration: 98.2 - Jan 24 - Feb 6 → 99.1 - Feb 7 - Feb 20
Iteration: 99.1 - Feb 7 - Feb 20 → 99.2 - Feb 21 - Mar 6
Priority: P1 → P2
Iteration: 99.2 - Feb 21 - Mar 6 → 100.1 - March 1 - March 18
Iteration: 100.1 - March 1 - March 18 → 100.2 - March 21 - April 1
Iteration: 100.2 - March 21 - April 1 → 101.1 - April 4 - April 15
Iteration: 101.1 - April 4 - April 15 → 101.2 - April 18 - April 29
Severity: normal → --
Component: Messaging System → New Tab Page

This bug was mistitled; it does focus on code in the new tab directory, but that directory is shared by a number of things. I've put it back in the Messaging System component, because it's being driven as part of the messaging-system related stuff that is being driven by the OMC team.

And, yeah, this could use a clean up. But that's out of scope for this bug.

Status: REOPENED → ASSIGNED
Component: New Tab Page → Messaging System
Summary: Hook newtab code coverage into phabricator like rest of mozilla-central → Hook New Tab/ASRouter/about:welcome etc code coverage into codecov.moz.tools & phabricator
Target Milestone: Firefox 75 → ---
Severity: -- → N/A
Summary: Hook New Tab/ASRouter/about:welcome etc code coverage into codecov.moz.tools & phabricator → Hook New Tab/ASRouter/about:welcome etc Karma unit test coverage into codecov.moz.tools & phabricator
Attachment #9272938 - Attachment description: Bug 1612986 - fix newtab unit-test code-cov info, r?emcminn → Bug 1612986 - fix about:welcome/newtab/asrouter unit-test code-cov info, r?emcminn
Pushed by dmosedale@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/abc3815492f8 fix about:welcome/newtab/asrouter unit-test code-cov info, r=emcminn
Status: ASSIGNED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: