-
Notifications
You must be signed in to change notification settings - Fork 111
Closes #2989: Add deletion-request ping support for legacy_client_id #2992
Conversation
// Generate markdown docs for the collected metrics. | ||
ext.gleanGenerateMarkdownDocs = true | ||
ext.gleanDocsDirectory = "$rootDir/docs/glean" | ||
apply from: 'https://github.com/mozilla-mobile/android-components/raw/v' + rootProject.ext.moz_components_version + '/components/service/glean/scripts/sdk_generator.gradle' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer the supported way to use the Glean code generation plugin. See here:
https://mozilla.github.io/glean/book/user/adding-glean-to-your-project.html#adding-new-metrics
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdboom this is using older a-c/glean version (24.0.0), I get the following compilation error:
Plugin with id 'org.mozilla.telemetry.glean-gradle-plugin' not found.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Be aware that the sdk_generator.gradle
script has no way to ensure that it's running the correct version of the Glean generator, so this problem of generating the wrong code could re-occur in the future. If there's any way you could upgrade to a-c 27.0.0 or later, you would have access to the Glean Gradle plugin, which resolves that issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mcomella what do you think about this ^?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're only expecting to build one build from this in the next few weeks, I'd think this is probably fine to move forward with this.
@mdboom Do you agree?
@psymoon If mdboom agrees, can you file an issue about "upgrade to a-c 27 and use glean plugin" and talk to athomasmoz to ensure it's at the top of the backlog? It should be the first thing we do before adding more code (or at least validate that it won't break). Ideally, we'll upgrade to the latest version, but if not, we should do that issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense. Thanks for checking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed #2993.
df32e3a
to
9f14808
Compare
Request for data collection review form
This data will be used to delete legacy telemetry data associated with the id when they opt out of telemetry.
This allows us to comply with user privacy regulations.
Existing legacy telemetry does not currently have the ability to send a deletion request ping and this was the easiest way to get that information
N/A
For the lifetime of the application, owned by the amazon-dev team.
There is an option in settings to stop sending usage data that will be used as the opt-out mechanism.
This will be analyzed with the normal Glean methods such as GUD and GLAM.
Internally with Mozilla, through normal Glean reporting methods. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not going to be able to finish the review today but here are a few nits I've found.
app/src/main/java/org/mozilla/tv/firefox/pocket/PocketVideoFetchScheduler.kt
Show resolved
Hide resolved
app/src/main/java/org/mozilla/tv/firefox/pocket/PocketVideoFetchScheduler.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Data Review Form (to be filled by Data Stewards)
- Is there or will there be documentation that describes the schema for the ultimate data set in a public, complete, and accurate way?
Yes, this is documented in metrics.md, as well as in the Glean telemetry docs: https://mozilla.github.io/glean/book/user/pings/deletion_request.html
- Is there a control mechanism that allows the user to turn the data collection on and off?
This ping will be sent when the user turns off telemetry so that all their telemetry data can be deleted by the server. Any additional telemetry will not be collected after turning data collection off, so yes, data collection can be turned off by the in-app telemetry toggle.
- If the request is for permanent data collection, is there someone who will monitor the data over time?
This ping is sent only by the client to request deleting data, so we will not have data from this ping.
- Using the category system of data types on the Mozilla wiki, what collection type of data do the requested measurements fall under?
Type 2
- Is the data collection request for default-on or default-off?
Default on for telemetry
- Does the instrumentation include the addition of any new identifiers (whether anonymous or otherwise; e.g., username, random IDs, etc. See the appendix for more details)?
Sends client id, which is necessary to delete the telemetry data associated with this client
- Is the data collection covered by the existing Firefox privacy notice?
Yes
- Does there need to be a check-in in the future to determine whether to renew the data? (Yes/No) (If yes, set a todo reminder or file a bug if appropriate)**
No, data deletion request
- Does the data collection use a third-party collection tool? If yes, escalate to legal.
No
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. I verified the fix by launching the app in an emulator, disabling telemetry upload, and verifying the breakpoint I set that enqueues the deletion ping in the Glean library was set. This is the breakpoint I checked:
I didn't know how to verify the legacy client ID was set so I didn't verify that – I expect QA will have more expertise to do that by validating what hits the server. However, the code looks straightforward so I'm not too concerned.
Thanks psymoon!
@@ -4,6 +4,9 @@ | |||
|
|||
import org.mozilla.gradle.tasks.ValidateAndroidAppReleaseConfiguration | |||
|
|||
plugins { | |||
id "com.jetbrains.python.envs" version "0.0.26" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed? Is this used by the glean script?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. Related docs, FYI: https://mozilla.github.io/glean/book/user/adding-glean-to-your-project.html#adding-new-metrics
@@ -216,6 +224,10 @@ dependencies { | |||
androidTestImplementation 'com.squareup.okhttp3:mockwebserver:3.10.0' | |||
testImplementation 'com.squareup.okhttp3:mockwebserver:3.10.0' | |||
|
|||
// For the initial release of Glean 19, we require consumer applications to | |||
// depend on a separate library for unit tests. This will be removed in future releases. | |||
testImplementation "org.mozilla.telemetry:glean-forUnitTests:21.3.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be 24.0.0? Same as ext.moz_components_version
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this is correct. This is the version of Glean that ships with a-c 2.4.0.0. This is the gotcha I was talking about that the Glean Gradle plugin solves (handling this mapping automatically). Unfortunately, the Glean Gradle plugin isn't available prior to a-c 27.0.0.
This is the minimum version we would need to update to get the deletion request ping.
I reverified using the glean debug ping viewer and saw a legacy client ID was set. However, I didn't verify it was the same one as on the device – I'm going to assume that is correct. |
This is following the guideline from https://mozilla.github.io/glean/book/user/pings/deletion_request.html#the-deletion-request-ping.