fix(nimbus): catch FmlError when FmlClient fails to parse a manifest#15019
Merged
Conversation
Because * The FmlClient constructor can raise FmlError.ValidationError when a feature manifest has validation errors (e.g. a variable with both gecko-pref and default, which are now mutually exclusive) * NimbusFmlLoader.fml_client() did not catch this, causing a 500 on any page that calls get_invalid_fields_errors() for affected experiments * This was discovered via failing Fenix integration tests on PR #15002 This commit * Wraps the FmlClient() constructor in a try/except FmlError so invalid manifests are logged and skipped rather than crashing the page * Adds unit tests for the graceful degradation in both fml_client() and get_fml_errors() Fixes #15018
relud
approved these changes
Mar 23, 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.
Because
FmlClientconstructor can raiseFmlError.ValidationErrorwhen a feature manifest has validation errors (e.g., a variable with bothgecko-prefanddefault, which are now mutually exclusive as of the latest application-services build)NimbusFmlLoader.fml_client()did not catch this exception, so it propagated up and caused a 500 error on any page that callsget_invalid_fields_errors()(including the audience page during experiment creation)FIREFOX_FENIXUI tests failed withTimeoutExceptionbecause the audience page returned a 500This commit
FmlClient()constructor in atry/except FmlErrorso invalid manifests are logged and skipped rather than crashing the pagefml_client()andget_fml_errors()Fixes #15018