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

Add FXIOS-10902 Firefox iOS send data deletion request when dau ping is toggled off #24263

Conversation

razvanlitianu
Copy link
Collaborator

@razvanlitianu razvanlitianu commented Jan 21, 2025

📜 Tickets

Jira ticket

💡 Description

Add data deletion request following Android and Desktop implementation.

📝 Checklist

You have to check all boxes before merging

  • Filled in the above information (tickets numbers and description of your work)
  • Updated the PR name to follow our PR naming guidelines
  • Wrote unit tests and/or ensured the tests suite is passing
  • When working on UI, I checked and implemented accessibility (minimum Dynamic Text and VoiceOver)
  • If needed, I updated documentation / comments for complex code and public methods
  • If needed, added a backport comment (example @Mergifyio backport release/v120)

@razvanlitianu razvanlitianu marked this pull request as ready for review January 21, 2025 13:42
@razvanlitianu razvanlitianu requested a review from a team as a code owner January 21, 2025 13:42
@mobiletest-ci-bot
Copy link

mobiletest-ci-bot commented Jan 21, 2025

Messages
📖 Project coverage: 34.12%
📖 Edited 4 files
📖 Created 0 files

Client.app: Coverage: 32.34

File Coverage
AppSettingsTableViewController.swift 32.09% ⚠️
TelemetryWrapper.swift 66.96%

Generated by 🚫 Danger Swift against a1ca3fa

Copy link
Member

@travis79 travis79 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One suggestion to clarify the reason for the ping, no need to block on re-review from me.

Comment on lines +138 to +140
The ping was submitted between Glean init and Glean shutdown.
After init but before shutdown the upload of usage reporting data changed
from enabled to disabled.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The ping was submitted between Glean init and Glean shutdown.
After init but before shutdown the upload of usage reporting data changed
from enabled to disabled.
The ping was submitted due to the usage-reporting data preference changing from
enabled to disabled.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I said that before on, I think, the desktop implementation: due to this being a include_info_sections=false ping we won't see any reasons anyway. They are stripped from the final payload.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that desktop did land with the reason defined. So for documentation reasons we can probably keep it here too (it's not set in the above submit call anyway)

Copy link
Contributor

mergify bot commented Jan 23, 2025

This pull request has conflicts when rebasing. Could you fix it @razvanlitianu? 🙏

Comment on lines +138 to +140
The ping was submitted between Glean init and Glean shutdown.
After init but before shutdown the upload of usage reporting data changed
from enabled to disabled.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I said that before on, I think, the desktop implementation: due to this being a include_info_sections=false ping we won't see any reasons anyway. They are stripped from the final payload.

@@ -236,6 +237,7 @@ class AppSettingsTableViewController: SettingsTableViewController,
if value {
self?.gleanLifecycleObserver.startObserving()
} else {
GleanMetrics.Pings.shared.usageDeletionRequest.submit()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a follows_collection_enabled=false ping, thus it needs to be specifically enabled, otherwise it won't ever be submitted.
Because it also should carry the usage_profile_id it needs to be enabled before that metric is set so that we actually store that ID for it.

@@ -104,6 +104,9 @@ class TelemetryWrapper: TelemetryWrapperProtocol, FeatureFlaggable {
let uuid = UUID(uuidString: uuidString) {
GleanMetrics.LegacyIds.clientId.set(uuid)
}

GleanMetrics.Pings.shared.usageDeletionRequest.setEnabled(enabled: true)
GleanMetrics.Pings.shared.onboardingOptOut.setEnabled(enabled: true)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@badboy Do you think this is good spot, before init profile id? I assume we have to do the same for onboarding opt out since it has the same property.

I also wonder, do we ever need to disable them?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No disabling needed. It's only explicitly submitted anyway and we can't hit that codepath unless it's the actual disabling by a user through the UI.

@razvanlitianu razvanlitianu merged commit 28c5ad7 into main Jan 27, 2025
10 checks passed
@razvanlitianu razvanlitianu deleted the rlitianu/FXIOS-10902-Firefox-iOS-Send-data-deletion-request-when-DAU-ping-is-toggled-off branch January 27, 2025 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants