-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Refactor FXIOS-11023 [Glean] Use glean wrapper for DefaultShareTelemetry #24231
base: main
Are you sure you want to change the base?
Refactor FXIOS-11023 [Glean] Use glean wrapper for DefaultShareTelemetry #24231
Conversation
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.
Great Work Enaya!
} | ||
|
||
func createSubject() -> ShareTelemetry { | ||
return DefaultShareTelemetry() | ||
return DefaultShareTelemetry(gleanWrapper: GleanWrapper) |
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.
return DefaultShareTelemetry(gleanWrapper: GleanWrapper) | |
return DefaultShareTelemetry(gleanWrapper: gleanWrapper) |
Just noticed after the fact, we should be passing in the gleanWrapper variable rather than the protocol itself :)
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.
+1 we will want to pass in the mock here
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.
looks good! except the one change pointed out by @DanielDervishi. Thank you for making the updates + helping us improve our tests!
// Due to changes allow certain custom pings to implement their own opt-out | ||
// independent of Glean, custom pings may need to be registered manually in | ||
// tests in order to puth them in a state in which they can collect data. | ||
Glean.shared.registerPings(GleanMetrics.Pings.shared) | ||
Glean.shared.resetGlean(clearStores: true) |
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.
🔥
} | ||
|
||
func createSubject() -> ShareTelemetry { | ||
return DefaultShareTelemetry() | ||
return DefaultShareTelemetry(gleanWrapper: GleanWrapper) |
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.
+1 we will want to pass in the mock here
📜 Tickets
Jira ticket
Github issue
💡 Description
Updated DefaultShareTelemetry + unit tests to use glean wrapper.
📝 Checklist
You have to check all boxes before merging
@Mergifyio backport release/v120
)