Closed Bug 1160491 Opened 9 years ago Closed 9 years ago

[Metrics] Create a special build flag for Spark dogfooders

Categories

(Firefox OS Graveyard :: Gaia::Build, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: thills, Assigned: thills)

References

Details

(Whiteboard: [spark])

Attachments

(1 file)

We need a special build flag for Spark dogfooding users to allow us to process the Metrics a bit differently so that product owners can effectively track the program.  This flag will be used to:

1) Send metrics more frequently for dogfooders: Bug 1160484
2) Disable the capability for dogfooders to turn off metrics during FTU: Bug 1160488
3) Replace the deviceID field which is normally set to UUIDs for both FTU and AppUsage to the IMEI of the device for these dogfooders
Whiteboard: [spark]
Perhaps we could use the |CUSTOMIZATION=spark| flag. See bug 1159411 for relevant discussion.
Priority: -- → P1
Dale, do you think we could re-use the |CUSTOMIZATION=spark| build flag here? Note that doing this will cause us to track the user significantly more than we do right now, including their IMEI and disallowing them from disabling metrics pings.

If we can't, then we might want to use a setting instead. We could trigger this setting similar to how |DEVICE_DEBUG=1| triggers a series of settings changes. Perhaps |DOGFOOD=1|, or some such.
Flags: needinfo?(dale)
Yeh this should be done by some pref, then we can just have that set in the customisation
Flags: needinfo?(dale)
After thinking about this some more, I don't think that we can tie this to the |GAIA_DISTRIBUTION_DIR=***/spark| env var. The reason is that this env var can be set by anyone, and they may not have wanted to or agreed to give us their IMEI, or any other data. I think it would be a privacy violation to hand this data over just because they opted into a market customization.

Thus, I propose that we separate the dogfooding and market customizations env vars. For a dogfooding build of Spark, we would build with something like this:

```bash
GAIA_DISTRIBUTION_DIR=`pwd`/distros/spark DOGFOOD=1 make
```

Setting |DOGFOOD=1| would make all of the changes within Metrics that we need, as documented in comment 0. This would probably be done by toggling a setting, which the Metrics app would query for.

Dale, does this sound reasonable to you?
Flags: needinfo?(dale)
Doug/Dale,

What/who would setup this pref and who would define it?  Does the build system have the capability to set it and metrics just needs to know what it is and read it?

Thanks,

-tamara
Flags: needinfo?(drs)
Metrics currently listens to the setting: 'debug.performance_data.shared'.  Could we add a flag along the lines of 'debug.performance_data.spark_dogfooding' or something similar to this?
I can get the pref set, all this is being blocked by https://bugzilla.mozilla.org/show_bug.cgi?id=1159411 at the moment but should all go through quickly once that lands.

Not entirely sure it makes sense to have a seperate build flag for enabling / disabling the metric collection as currently the build customisation is the way we set different flags, but will take a look once I get unblocked
Flags: needinfo?(dale)
Hi Dale,

Was the pref something that you set in bug 1159411?  I'm just trying to follow along there, but not clear if it's a separate effort for you to set the pref.  Also, did you decide on a name?  

Thanks,

-tamara
Flags: needinfo?(drs) → needinfo?(dale)
Hi Ricky/Tim,

For Spark, we want to set a buildflag DOGFOOD=1 and based on that buildflag, we want a Gaia setting to be set.  Do you know the best way to get this done?  We had a look through the code, but could not find anything immediately apparent and wanted to get your take on it.

Thanks,
-tamara
Flags: needinfo?(timdream)
Flags: needinfo?(ricky060709)
Flags: needinfo?(gduan)
add a setting in settings.json of profile when DOGFOOD=1?

You could just add below line in 'execute' function of build/settings.js
if (config.DOGFOOD === '1') {
  settings[KEY] = VALUE;
}
Flags: needinfo?(timdream)
Flags: needinfo?(ricky060709)
Flags: needinfo?(gduan)
Attachment #8608726 - Flags: review?(gduan)
Hi George,

How does one kick off the tests in the gaia/build/test/unit/settings_test.js?  I wasn't able to find this in the typical way I run unit tests ./bin/gaia-test -d.

Thanks,

-tamara
please run 'make build-test-unit' .
Attachment #8608726 - Flags: review?(gduan)
Hi George,

I pushed another revision with Doug's suggestion on the name.

Thanks,
-tamara
Assignee: nobody → thills
Status: NEW → ASSIGNED
Apologies for the delay, I would have expected to had done this inside settings.json in the customisation, but I can understand the reason to not, looks like you have this. Cheers
Flags: needinfo?(dale)
Attachment #8608726 - Flags: review?(gduan)
Comment on attachment 8608726 [details]
[gaia] tamarahills:bugfix/1160491-Spark-Dogfood-Flag > mozilla-b2g:master

LGTM, thanks for the test!
Attachment #8608726 - Flags: review?(gduan) → review+
Doug,

I realized there is already a DOGFOOD=1 flag.  I think we should change this to something else unless you want to pick up all those other things that DOGFOOD=1 does.

I noticed this when testing because it seems to have a slightly different UX FTU experience.  There is probably more under the covers

Do you have another name you'd like to use?

Thanks,

-tamara
Flags: needinfo?(drs)
Doug, I may have spoke too soon... let me investigate a bit more.
Flags: needinfo?(drs)
Doug/Dale,

I realized that the makefile has this line

ifeq ($(DOGFOOD), 1)
PRODUCTION=1
endif

So, when you use DOGFOOD=1 you also get PRODUCTION=1. This makes sense, because I'm seeing things like the mirrored english option doesn't show up in the FTU.

Is this ok?  or do we need to have another flag?

Thanks,

-tamara
Flags: needinfo?(drs)
Flags: needinfo?(dale)
> I realized there is already a DOGFOOD=1 flag.  I think we should change this 
> to something else unless you want to pick up all those other things that DOGFOOD=1 does.

We used to conflate a lot of options under similiar things, DEBUG / PRODUCTION etc, I dont think that it a good idea in this case or in future at all in fact as it made it impossible to pick which things to enable, I think we should make a new IMEI_TRACKING=1 flag for this and any other flags that dont go via the customisation.
Flags: needinfo?(dale)
Comment on attachment 8608726 [details]
[gaia] tamarahills:bugfix/1160491-Spark-Dogfood-Flag > mozilla-b2g:master

Hi Dale,

Thanks for your response above. Do you mind reviewing this?  George had already given the r+, but I did two things in this change:

1.  change the settings value from '1' to |true| per a review request on another bug
2.  change the flag from DOGFOOD to IMEI_TRACKING.  I made a change in the makefile for this.

Thanks,

-tamara
Attachment #8608726 - Flags: review+ → review?(dale)
Attachment #8608726 - Flags: review?(dale)
After some discussion, we decided to leave this as DOGFOOD=1.  I've changed this back to my original patch with the exception that we are now setting the setting to true vs. '1'.
Flags: needinfo?(drs)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: