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

Ensure that the viewer telemetry reporting, and fallback code, runs in development mode and GENERIC builds #11522

Merged
merged 1 commit into from
Jan 20, 2020

Conversation

Snuffleupagus
Copy link
Collaborator

While only the MOZCENTRAL builds will actually do anything meaningful with the telemetry data, none of the code in question actually runs at all in e.g. development mode.[1]
This seems bad since it essentially means that this code is completely untested, despite being quite important for the built-in Firefox PDF viewer, and this thus ought to be fixed.

In this case, the explanation for the current state of the code should be "for historical reasons". Before the viewer was split into the current components and before the pre-processor was improved, back when all code resided in the web/viewer.js file, the telemetry reporting was done with direct FirefoxCom calls. However, with the dummy DefaultExternalServices.reportTelemetry method there's nothing actually preventing attempting to report telemetry in any type of build.

NOTE: By running this code in GENERIC builds as well, in addition to just locally, the viewer part of telemetry reporting becomes tested e.g. in preview builds too which should help with reviewing.


[1] When fixing bug 1606566, I had to edit the relevant PDFJSDev checks to be able to actually test the changes locally.

…n development mode and GENERIC builds

While only the `MOZCENTRAL` builds will actually do anything meaningful with the telemetry data, none of the code in question actually runs *at all* in e.g. development mode.[1]
This seems bad since it essentially means that this code is completely untested, despite being quite important for the built-in Firefox PDF viewer, and this thus ought to be fixed.

In this case, the explanation for the current state of the code should be "for historical reasons". Before the viewer was split into the current components and before the pre-processor was improved, back when all code resided in the `web/viewer.js` file, the telemetry reporting was done with *direct* `FirefoxCom` calls. However, with the dummy `DefaultExternalServices.reportTelemetry` method there's nothing actually preventing attempting to report telemetry in any type of build.

NOTE: By running this code in GENERIC builds as well, in addition to just locally, the *viewer* part of telemetry reporting becomes tested e.g. in preview builds too which should help with reviewing.

---
[1] When fixing bug 1606566, I had to edit the relevant `PDFJSDev` checks to be able to actually test the changes locally.
@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.67.70.0:8877/79e07c4ef0f9206/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/79e07c4ef0f9206/output.txt

Total script time: 9.83 mins

Published

@timvandermeij
Copy link
Contributor

/botio-windows preview

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://54.215.176.217:8877/bcbe382ce43e369/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/bcbe382ce43e369/output.txt

Total script time: 3.76 mins

Published

@timvandermeij timvandermeij merged commit ead03b5 into mozilla:master Jan 20, 2020
@timvandermeij
Copy link
Contributor

Looks good to me. Thanks!

@Snuffleupagus Snuffleupagus deleted the viewer-reportTelemetry branch January 20, 2020 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants