Bump Glean metrics over legacy for GLAM searches#2312
Merged
Conversation
68f70f9 to
1b540e4
Compare
…n metric_sample_info
1b540e4 to
eae66cc
Compare
edugfilho
commented
Aug 29, 2025
| metric_sample_info.get(channel)["sampled_text"] = sampled_text | ||
|
|
||
| # We prefer the release channel text, but if it's | ||
| # not available, we use the first available |
Contributor
Author
There was a problem hiding this comment.
This was failing because there was no "release". So I decided to pick the first one in case, to fix it.
chutten
approved these changes
Aug 29, 2025
| // the only criteria for legacy data is if it's "active" or not | ||
| score += item.active || item.active === undefined ? 1 : 0; | ||
| // for glam searches, glean metrics take precedence over legacy metrics | ||
| score += glamMode && item.glean ? 1 : 0; |
Contributor
There was a problem hiding this comment.
Comment: I had to check the table to be certain that && had a higher precedence than the ternary (it does: logical AND is precedence 4, ternary is precedence 2)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes DENG-9522
Pull Request checklist
fixes, if applicable)