Bug 2054479 - Require targeting and bucketing for Firefox Labs#7481
Merged
Conversation
freshstrangemusic
force-pushed
the
freshstrangemusic/push-unlmymxkyywx
branch
from
July 16, 2026 21:21
c7f48e0 to
c4fde37
Compare
When queried for the list of all available Firefox Labs, the Nimbus Client was not filtering the recipes by whether they passed targeting and bucketing. This is now the case. There is now a new function `can_enroll` that returns an enum, `CanEnrollResult`, that distinguishes all the different cases that prevent enrollment. The majority of this function was refactored out of `evaluate_enrollment`, which is now a much simpler function. Additionally, the `targeting(expr, helper)` function has been removed. This function took an expression and a `NimbusTargetingHelper` and returned an `EnrollmentStatus` if and only if the targeting evaluation did not succeed or resulted in an error. This API was too awkward to work into `can_enroll`. The majority of this change is test fallout from removing this function, though the tests make more sense now that they are testing the results of JEXL evaluation and not comparing `EnrollmentStatus`es. In order to remove a bunch of unnecessary clones, the `NimbusTargetingHelper` methods now take a `&str` instead of a `String`. The UDL has been updated to use `[ByRef]` so that the FFI contract is unchanged.
freshstrangemusic
force-pushed
the
freshstrangemusic/push-unlmymxkyywx
branch
from
July 17, 2026 02:07
c4fde37 to
a531078
Compare
jeddai
approved these changes
Jul 17, 2026
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.
When queried for the list of all available Firefox Labs, the Nimbus Client was not filtering the recipes by whether they passed targeting and bucketing. This is now the case.
There is now a new function
can_enrollthat returns an enum,CanEnrollResult, that distinguishes all the different cases that prevent enrollment. The majority of this function was refactored out ofevaluate_enrollment, which is now a much simpler function.Additionally, the
targeting(expr, helper)function has been removed. This function took an expression and aNimbusTargetingHelperand returned anEnrollmentStatusif and only if the targeting evaluation did not succeed or resulted in an error. This API was too awkward to work intocan_enroll. The majority of this change is test fallout from removing this function, though the tests make more sense now that they are testing the results of JEXL evaluation and not comparingEnrollmentStatuses.In order to remove a bunch of unnecessary clones, the
NimbusTargetingHelpermethods now take a&strinstead of aString. The UDL has been updated to use[ByRef]so that the FFI contract is unchanged.Pull Request checklist
[ci full]to the PR title.