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

Ignore dynamically stored labels if Glean is not initialized #374

Merged
merged 7 commits into from
Oct 14, 2019

Conversation

badboy
Copy link
Member

@badboy badboy commented Oct 14, 2019

No description provided.

Copy link
Contributor

@Dexterp37 Dexterp37 left a comment

Choose a reason for hiding this comment

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

r+wc :) Thanks for fixing this!

Dexterp37 and others added 7 commits October 14, 2019 12:05
 We have 3 scenarios to consider:

 * Static labels. No database access needed. We just look at what is in memory.
 * Dynamic labels, initialized Glean. We look up in the database all previously stored
   labels in order to keep a maximum of allowed labels.
 * Dynamic labels, uninitialized Glean. We ignore potentially previously stored labels
   and just take what the user passed in.
   This potentially allows creating more than `MAX_LABELS` labels, but only before Glean
   is initialized.
@badboy badboy force-pushed the pre_init_crash_labeled_kotlin branch from 29897d7 to 2ab9c47 Compare October 14, 2019 10:11
@badboy badboy merged commit e168b76 into master Oct 14, 2019
@badboy badboy deleted the pre_init_crash_labeled_kotlin branch October 14, 2019 11:14
@@ -33,6 +34,8 @@ class AccumulationsBeforeGleanInitTest {
@Before
fun cleanup() {
Glean.testDestroyGleanHandle()
@Suppress("EXPERIMENTAL_API_USAGE")
Dispatchers.API.setTaskQueueing(true)
Copy link
Contributor

Choose a reason for hiding this comment

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

We may also want to clear the queue to be extra sure...

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, but blindly clearing breaks other tests. We should take that in a follow-up, see the filed bug for it.

Copy link
Contributor

Choose a reason for hiding this comment

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

"Fun"

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.

3 participants