Add releng build file containing Adjust SDK private app token

RESOLVED FIXED in Firefox 38.0.5

Status

()

Firefox for Android
Build Config & IDE Support
P2
normal
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: nalexander, Assigned: coop)

Tracking

Trunk
Firefox 40
All
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox38 unaffected, firefox38.0.5 fixed, firefox39 fixed, firefox40 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(4 attachments, 1 obsolete attachment)

(Reporter)

Description

3 years ago
In order to use the Adjust SDK to track Fennec installations, we need to identify ourselves to the Adjust endpoint with a private app token.  We should follow the precedent around [1] and add a configure flag for specifying a file containing the token.  (And then make sure we don't leak the variable to the console log during the build.)  The patches in Bug 1143888 do this work [2].

This ticket tracks:

* acquiring an Adjust SDK app token;
* conveying it to releng;
* making it available to the automation builders (in /build or wherever is good for Fennec builds).

This process is exactly the same as was done in [3], but I can't determine who actually did the releng work!

[1] https://dxr.mozilla.org/mozilla-central/source/configure.in#4071

[2] We could land the new build flags, etc, separately from the actual build and SDK integration, if we want to.

[3] https://bugzilla.mozilla.org/show_bug.cgi?id=1069816#c6
(Reporter)

Comment 1

3 years ago
mfinkle: you're on the hook to acquire the Adjust SDK app token.

coop: could you redirect to the releng point person for arranging for a new file to be available to mobile/android builds?
Flags: needinfo?(mark.finkle)
Flags: needinfo?(krudnitski)
Flags: needinfo?(coop)
(Assignee)

Comment 2

3 years ago
(In reply to Nick Alexander :nalexander from comment #1)
> coop: could you redirect to the releng point person for arranging for a new
> file to be available to mobile/android builds?

I've done this recently enough myself that I can be the one on the hook for this.
Flags: needinfo?(coop)
I created an apptoken for Firefox on the Adjust system. How should I convey the token to it's private location?
Flags: needinfo?(mark.finkle)
Flags: needinfo?(krudnitski)
(Assignee)

Comment 4

3 years ago
(In reply to Mark Finkle (:mfinkle) from comment #3)
> I created an apptoken for Firefox on the Adjust system. How should I convey
> the token to it's private location?

Mark: you can encrypt it and send it to me. I'll add it to the repo.

http://gpg.mozilla.org/pks/lookup?search=coop%40mozilla.com
(Assignee)

Updated

3 years ago
Assignee: nobody → coop
Status: NEW → ASSIGNED
Priority: -- → P2
QA Contact: coop
(Assignee)

Comment 5

3 years ago
I've added the token to the hiera cache. 

Next step is a series of patches to buildbot-configs, mozharness, and puppet to get the token installed on the mobile builders.
(Reporter)

Comment 6

3 years ago
(In reply to Chris Cooper [:coop] from comment #5)
> I've added the token to the hiera cache. 
> 
> Next step is a series of patches to buildbot-configs, mozharness, and puppet
> to get the token installed on the mobile builders.

Can we get an update here?  I'm not familiar with the mobile beta schedule but I do think we're very short for time.  This will also require a change to the beta and release mozconfig's (in tree?) to specify --with-adjust-sdk-keyfile [1].

[1] https://dxr.mozilla.org/mozilla-central/source/configure.in#4033
Flags: needinfo?(coop)
(Assignee)

Comment 7

3 years ago
Sorry, I didn't realize this was a fire drill. The blocked bug is resolved, and there's no other indicator of timing.

Planning on getting the patches written today.
Flags: needinfo?(coop)
(Reporter)

Comment 8

3 years ago
(In reply to Chris Cooper [:coop] from comment #7)
> Sorry, I didn't realize this was a fire drill. The blocked bug is resolved,
> and there's no other indicator of timing.

Hey coop, sorry, that's on me.

> Planning on getting the patches written today.

I'm happy to do the in-tree stuff.
(Assignee)

Comment 9

3 years ago
Created attachment 8598287 [details] [diff] [review]
[puppet] Add Adjust SDK token for CentOS

Pinned an ec2 slave to my puppet env and successfully ended up with the Adjust token under /builds.
Attachment #8598287 - Flags: review?(bugspam.Callek)
(Assignee)

Comment 10

3 years ago
Created attachment 8598291 [details] [diff] [review]
[buildbot-configs] Copy Adjust token into the mock env for Android builds
Attachment #8598291 - Flags: review?(bugspam.Callek)
(Assignee)

Comment 11

3 years ago
Created attachment 8598294 [details] [diff] [review]
[mozharness] Copy Adjust token into the mock env
Attachment #8598294 - Flags: review?(bugspam.Callek)
(Assignee)

Comment 12

3 years ago
(In reply to Nick Alexander :nalexander from comment #8)
> I'm happy to do the in-tree stuff.

The token will live alongside the others in /builds: /builds/adjust-sdk.token

Updated

3 years ago
Attachment #8598287 - Flags: review?(bugspam.Callek) → review+
Comment on attachment 8598291 [details] [diff] [review]
[buildbot-configs] Copy Adjust token into the mock env for Android builds

Review of attachment 8598291 [details] [diff] [review]:
-----------------------------------------------------------------

::: mozilla/config.py
@@ +1489,5 @@
>                  ('/home/cltbld/.boto', '/builds/.boto'),
>                  ('/builds/mozilla-api.key', '/builds/mozilla-api.key'),
>                  ('/builds/mozilla-fennec-geoloc-api.key', '/builds/mozilla-fennec-geoloc-api.key'),
>                  ('/builds/crash-stats-api.token', '/builds/crash-stats-api.token'),
> +                ('/builds/adjust-sdk.token', '/builds/adjust-sdk.token'),

we're getting pretty thick here, might be worth us considering a sub-folder for this stuff....
Attachment #8598291 - Flags: review?(bugspam.Callek) → review+

Updated

3 years ago
Attachment #8598294 - Flags: review?(bugspam.Callek) → review+
(Assignee)

Comment 14

3 years ago
Comment on attachment 8598287 [details] [diff] [review]
[puppet] Add Adjust SDK token for CentOS

Review of attachment 8598287 [details] [diff] [review]:
-----------------------------------------------------------------

https://hg.mozilla.org/build/puppet/rev/d1c288081126
Attachment #8598287 - Flags: checkin+
(Assignee)

Comment 15

3 years ago
Comment on attachment 8598291 [details] [diff] [review]
[buildbot-configs] Copy Adjust token into the mock env for Android builds

Review of attachment 8598291 [details] [diff] [review]:
-----------------------------------------------------------------

https://hg.mozilla.org/build/buildbot-configs/rev/2d9e77a87dfa
Attachment #8598291 - Flags: checkin+
(Assignee)

Comment 16

3 years ago
Comment on attachment 8598294 [details] [diff] [review]
[mozharness] Copy Adjust token into the mock env

Review of attachment 8598294 [details] [diff] [review]:
-----------------------------------------------------------------

https://hg.mozilla.org/build/mozharness/rev/c9c61c6fee9b
Attachment #8598294 - Flags: checkin+
(Assignee)

Comment 17

3 years ago
(In reply to Chris Cooper [:coop] from comment #16) 
> https://hg.mozilla.org/build/mozharness/rev/c9c61c6fee9b

To help avoid a possible back-out, I've kicked off golden AMI generation for the linux build and try platforms to make sure the new token is available on the base system.
(Assignee)

Comment 18

3 years ago
(In reply to Chris Cooper [:coop] from comment #17) 
> To help avoid a possible back-out, I've kicked off golden AMI generation for
> the linux build and try platforms to make sure the new token is available on
> the base system.

AMIs are ready, so instances should start picking them up.
Fyi, I believe this caused the failure from bug 1159414. From comment 17 it looks like this depends on some external piece, so maybe it just wasn't ready yet when Chris and I pushed, so good chance there's no problem. Just wanted to point it out in case.
(Reporter)

Comment 20

3 years ago
In automation [1], I see helpful lines like:

mock_mozilla -r mozilla-centos6-x86_64-android --cwd / --shell '/usr/bin/env  chown -R mock_mozilla /builds/adjust-sdk.token'

[1] http://ftp.mozilla.org/pub/mozilla.org/mobile/tinderbox-builds/fx-team-android-api-11-debug/1430316531/fx-team-android-api-11-debug-bm77-build1-build188.txt.gz

I'm going to prepare the in-tree patch to use the SDK token and push to try.
(Reporter)

Comment 22

3 years ago
Created attachment 8599404 [details]
MozReview Request: bz://1152871/nalexander

/r/7871 - Bug 1152871 - Include Adjust SDK private token in builds. r=mfinkle

Pull down this commit:

hg pull -r 79a205a053b664f980836e9c63576746266f79ef https://reviewboard-hg.mozilla.org/gecko/
Attachment #8599404 - Flags: review?(mark.finkle)
(Reporter)

Comment 23

3 years ago
mfinkle: review is tiny, but I realize now we should change the Adjust SDK log level depending on production/sandbox.  Will update.

To test this, I will manually verify (using the Java debugger) that the Adjust SDK actually gets instantiated and uploads a packet.  I'll verify the packet contents for the documentation, just like rnewman forwarded to me.
Attachment #8599404 - Flags: review?(mark.finkle) → review+
Comment on attachment 8599404 [details]
MozReview Request: bz://1152871/nalexander

https://reviewboard.mozilla.org/r/7869/#review6645

Ship It!
(Reporter)

Comment 26

3 years ago
Comment on attachment 8599404 [details]
MozReview Request: bz://1152871/nalexander

Approval Request Comment
[Feature/regressing bug #]: Adjust install tracking.
[User impact if declined]: marketing will be unhappy.
[Describe test coverage new/current, TreeHerder]: none.
[Risks and why]: very low.
[String/UUID change made/needed]: none.

This is required on 38.0.5  This patch flips the switch on the code landed in Bug 1143888.  That code is already uplifted to 38.0.5.
Attachment #8599404 - Flags: approval-mozilla-aurora?
(Reporter)

Comment 27

3 years ago
Comment on attachment 8599404 [details]
MozReview Request: bz://1152871/nalexander

(See earlier message.)
Attachment #8599404 - Flags: approval-mozilla-beta?
(Reporter)

Comment 28

3 years ago
I've pushed a Nightly-like try build with MOZ_INSTALL_TRACKING turned on to

https://treeherder.mozilla.org/#/jobs?repo=try&revision=6088d0c2c3b4

To test, you should be able to just install the APK and start Nightly.  You'll see very minimal logging with the log tag "Adjust" (minimal since there's tons of PII in the Adjust verbose logging).

With a locally built version, I see a single install when viewing the dashboard at adjust.com! \o/
(Reporter)

Comment 29

3 years ago
Even better, I can see an install into the sandbox environment, which corresponds to a custom local build that I did.  wbowden, over to you to install (and start) the try build and figure out if your installs get to adjust.com as well.
Flags: needinfo?(wbowden)
status-firefox38: --- → unaffected
status-firefox38.0.5: --- → affected
status-firefox39: --- → affected
https://hg.mozilla.org/mozilla-central/rev/4767a0a19a62
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox40: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 40
Attachment #8599404 - Flags: approval-mozilla-beta?
Attachment #8599404 - Flags: approval-mozilla-beta+
Attachment #8599404 - Flags: approval-mozilla-aurora?
Attachment #8599404 - Flags: approval-mozilla-aurora+

Updated

3 years ago
Flags: needinfo?(wbowden)
(Reporter)

Comment 33

3 years ago
Comment on attachment 8599404 [details]
MozReview Request: bz://1152871/nalexander
Attachment #8599404 - Attachment is obsolete: true
Attachment #8620012 - Flags: review+
(Reporter)

Comment 34

3 years ago
Created attachment 8620012 [details]
MozReview Request: Bug 1152871 - Include Adjust SDK private token in builds. r=mfinkle
(Reporter)

Updated

2 years ago
Blocks: 1245304
You need to log in before you can comment on or make changes to this bug.