Closed Bug 1160488 Opened 9 years ago Closed 9 years ago

[Metrics] Disable the flag for rejecting metrics for FTU for users with special build flag

Categories

(Firefox OS Graveyard :: Gaia::First Time Experience, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: thills, Assigned: thills)

References

Details

(Whiteboard: [spark])

Attachments

(1 file)

For Spark/Lightsaber dogfooding users, we want to disable the checkbox that lets the user turn off the metrics.

This is only for the dogfooding users with a special build flag.
Assignee: nobody → thills
Whiteboard: [spark]
My understanding from an offline conversation was that we're not sure if we actually need to disable this checkbox or not, since we haven't confirmed the relation with that checkbox and the metrics pings.
Status: NEW → UNCONFIRMED
Ever confirmed: false
Priority: -- → P1
Comment on attachment 8609838 [details]
[gaia] tamarahills:bugfix/1160488-disable-metrics-checkbox-dogfood > mozilla-b2g:master

This patch modifies the FTU for dogfooding users so that the checkbox to turnoff the metrics is disabled and the user cannot manually disable the checkbox.
Attachment #8609838 - Flags: review?(timdream)
Component: Gaia::System → Gaia::First Time Experience
Comment on attachment 8609838 [details]
[gaia] tamarahills:bugfix/1160488-disable-metrics-checkbox-dogfood > mozilla-b2g:master

I am not your FTU reviewer.
Attachment #8609838 - Flags: review?(timdream) → review?(fernando.campo)
Comment on attachment 8609838 [details]
[gaia] tamarahills:bugfix/1160488-disable-metrics-checkbox-dogfood > mozilla-b2g:master

Code looks ok, just couple of nits and a little improvement to the tests (github annotations).

I see from comment 1 that this is not 100% sure to land, I'd like to clarify that before merging. 

Also, when is exactly the settings flag ['debug.performance_data.dogfooding'] set and by who?
Attachment #8609838 - Flags: review?(fernando.campo)
Comment on attachment 8609838 [details]
[gaia] tamarahills:bugfix/1160488-disable-metrics-checkbox-dogfood > mozilla-b2g:master

Hi Fernando,

Thank you for the review.  I changed things around a little bit to not use a flag and just check the settings each time.  I made that modification in the test as well.  I had to modify the tests a bit to get it to work and wound up using a synch version of the MockSettings.

Bug 1160491 is what will be setting the setting.  This is part of the build system.. so, if we build with the flag DOGFOOD=1, that flag will be set.

Also, I did verify that we do need this because otherwise, user will be able to disable the metrics by checking this box.  

Thanks,

-tamara
Attachment #8609838 - Flags: review?(fernando.campo)
Is there somewhere in Settings that the user can disable the metrics pings as well?
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Hi Doug,

You are right, it can be disabled from settings as well.  I filed 1168814 to care for this.

-tamara
Comment on attachment 8609838 [details]
[gaia] tamarahills:bugfix/1160488-disable-metrics-checkbox-dogfood > mozilla-b2g:master

just couple more nits with spaces, and both tests use same description.

Also a question about the stored value (0/1 instead of false/true?) and coverage for enabling the checkbox.

Should I be able to test the code adding the setting to my user_prefs.js or do I need a specific build?
Attachment #8609838 - Flags: review?(fernando.campo)
Comment on attachment 8609838 [details]
[gaia] tamarahills:bugfix/1160488-disable-metrics-checkbox-dogfood > mozilla-b2g:master

Hi Fernando,

I changed it around little bit since I took your suggestion and changed the flag to true|false.  

To test it you can put the following lines in /build/settings.js at around line 284.  Then do a |DOGFOOD=1 make reset-gaia|

if (config.DOGFOOD === '1') {
    settings['debug.performance_data.dogfooding'] = true;
    settings['metrics.appusage.reportInterval'] = 24 * 60 * 60 * 1000;
  }

Let me know if you have questions.

Thanks,

-tamara
Attachment #8609838 - Flags: review?(fernando.campo)
Comment on attachment 8609838 [details]
[gaia] tamarahills:bugfix/1160488-disable-metrics-checkbox-dogfood > mozilla-b2g:master

Everything looks fine now, and manual tests worked nicely :)

thanks for the fixes!
Attachment #8609838 - Flags: review?(fernando.campo) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: