Commit 5a5f128
authored
fix(nimbus): catch FmlError when FmlClient fails to parse a manifest (#15019)
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 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 calls
`get_invalid_fields_errors()` (including the audience page during
experiment creation)
* This was discovered via failing Fenix integration tests on PR #15002
(application-services version bump) — all `FIREFOX_FENIX` UI tests
failed with `TimeoutException` because the audience page returned a 500
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 #150181 parent e9f8ccd commit 5a5f128
File tree
2 files changed
+45
-6
lines changed- experimenter/experimenter/features
- manifests
- tests
2 files changed
+45
-6
lines changedLines changed: 11 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
62 | 68 | | |
63 | 69 | | |
64 | 70 | | |
| |||
Lines changed: 34 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
0 commit comments