@mozilla/nimbus-schemas 2024.9.3 → 2024.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
|
3
|
+
"title": "NimbusExperiment",
|
|
4
|
+
"description": "The experiment definition accessible to: 1. The Nimbus SDK via Remote Settings 2. Jetstream via the Experimenter API",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"schemaVersion": {
|
|
8
|
+
"description": "Version of the NimbusExperiment schema this experiment refers to",
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"slug": {
|
|
12
|
+
"description": "Unique identifier for the experiment",
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
"id": {
|
|
16
|
+
"description": "Unique identifier for the experiiment. This is a duplicate of slug, but is required field for all Remote Settings records.",
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
19
|
+
"appName": {
|
|
20
|
+
"description": "A slug identifying the targeted product of this experiment. It should be a lowercased_with_underscores name that is short and unambiguous and it should match the app_name found in https://probeinfo.telemetry.mozilla.org/glean/repositories. Examples are \"fenix\" and \"firefox_desktop\".",
|
|
21
|
+
"type": "string"
|
|
22
|
+
},
|
|
23
|
+
"appId": {
|
|
24
|
+
"description": "The platform identifier for the targeted app. This should match app's identifier exactly as it appears in the relevant app store listing (for relevant platforms) or the app's Glean initialization (for other platforms). Examples are \"org.mozilla.firefox_beta\" and \"firefox-desktop\".",
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"channel": {
|
|
28
|
+
"description": "A specific channel of an application such as \"nightly\", \"beta\", or \"release\".",
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"userFacingName": {
|
|
32
|
+
"description": "Public name of the experiment that will be displayed on \"about:studies\".",
|
|
33
|
+
"type": "string"
|
|
34
|
+
},
|
|
35
|
+
"userFacingDescription": {
|
|
36
|
+
"description": "Short public description of the experiment that will be displayed on \"about:studies\".",
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
39
|
+
"isEnrollmentPaused": {
|
|
40
|
+
"description": "When this property is set to true, the SDK should not enroll new users into the experiment that have not already been enrolled.",
|
|
41
|
+
"type": "boolean"
|
|
42
|
+
},
|
|
43
|
+
"isRollout": {
|
|
44
|
+
"description": "When this property is set to true, treat this experiment as a rollout. Rollouts are currently handled as single-branch experiments separated from the bucketing namespace for normal experiments. See-also: https://mozilla-hub.atlassian.net/browse/SDK-405",
|
|
45
|
+
"type": "boolean"
|
|
46
|
+
},
|
|
47
|
+
"bucketConfig": {
|
|
48
|
+
"$ref": "#/$defs/ExperimentBucketConfig",
|
|
49
|
+
"description": "Bucketing configuration."
|
|
50
|
+
},
|
|
51
|
+
"outcomes": {
|
|
52
|
+
"description": "A list of outcomes relevant to the experiment analysis.",
|
|
53
|
+
"items": {
|
|
54
|
+
"$ref": "#/$defs/ExperimentOutcome"
|
|
55
|
+
},
|
|
56
|
+
"type": "array"
|
|
57
|
+
},
|
|
58
|
+
"featureIds": {
|
|
59
|
+
"description": "A list of featureIds the experiment contains configurations for.",
|
|
60
|
+
"items": {
|
|
61
|
+
"type": "string"
|
|
62
|
+
},
|
|
63
|
+
"type": "array"
|
|
64
|
+
},
|
|
65
|
+
"branches": {
|
|
66
|
+
"anyOf": [
|
|
67
|
+
{
|
|
68
|
+
"items": {
|
|
69
|
+
"$ref": "#/$defs/ExperimentSingleFeatureBranch"
|
|
70
|
+
},
|
|
71
|
+
"type": "array"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"items": {
|
|
75
|
+
"$ref": "#/$defs/ExperimentMultiFeatureDesktopBranch"
|
|
76
|
+
},
|
|
77
|
+
"type": "array"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"items": {
|
|
81
|
+
"$ref": "#/$defs/ExperimentMultiFeatureMobileBranch"
|
|
82
|
+
},
|
|
83
|
+
"type": "array"
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"description": "Branch configuration for the experiment."
|
|
87
|
+
},
|
|
88
|
+
"targeting": {
|
|
89
|
+
"anyOf": [
|
|
90
|
+
{
|
|
91
|
+
"type": "string"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"type": "null"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"description": "A JEXL targeting expression used to filter out experiments."
|
|
98
|
+
},
|
|
99
|
+
"startDate": {
|
|
100
|
+
"anyOf": [
|
|
101
|
+
{
|
|
102
|
+
"format": "date",
|
|
103
|
+
"type": "string"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"type": "null"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"description": "Actual publish date of the experiment. Note that this value is expected to be null in Remote Settings."
|
|
110
|
+
},
|
|
111
|
+
"enrollmentEndDate": {
|
|
112
|
+
"anyOf": [
|
|
113
|
+
{
|
|
114
|
+
"format": "date",
|
|
115
|
+
"type": "string"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"type": "null"
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"description": "Actual enrollment end date of the experiment. Note that this value is expected to be null in Remote Settings."
|
|
122
|
+
},
|
|
123
|
+
"endDate": {
|
|
124
|
+
"anyOf": [
|
|
125
|
+
{
|
|
126
|
+
"format": "date",
|
|
127
|
+
"type": "string"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"type": "null"
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
"description": "Actual end date of this experiment. Note that this field is expected to be null in Remote Settings."
|
|
134
|
+
},
|
|
135
|
+
"proposedDuration": {
|
|
136
|
+
"description": "Duration of the experiment from the start date in days. Note that this property is only used during the analysis phase (i.e., not by the SDK).",
|
|
137
|
+
"type": "integer"
|
|
138
|
+
},
|
|
139
|
+
"proposedEnrollment": {
|
|
140
|
+
"description": "This represents the number of days that we expect to enroll new users. Note that this property is only used during the analysis phase (i.e., not by the SDK).",
|
|
141
|
+
"type": "integer"
|
|
142
|
+
},
|
|
143
|
+
"referenceBranch": {
|
|
144
|
+
"anyOf": [
|
|
145
|
+
{
|
|
146
|
+
"type": "string"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"type": "null"
|
|
150
|
+
}
|
|
151
|
+
],
|
|
152
|
+
"description": "The slug of the reference branch (i.e., the branch we consider \"control\")."
|
|
153
|
+
},
|
|
154
|
+
"featureValidationOptOut": {
|
|
155
|
+
"description": "Opt out of feature schema validation. Only supported on desktop.",
|
|
156
|
+
"type": "boolean"
|
|
157
|
+
},
|
|
158
|
+
"localizations": {
|
|
159
|
+
"anyOf": [
|
|
160
|
+
{
|
|
161
|
+
"additionalProperties": {
|
|
162
|
+
"additionalProperties": {
|
|
163
|
+
"type": "string"
|
|
164
|
+
},
|
|
165
|
+
"type": "object"
|
|
166
|
+
},
|
|
167
|
+
"type": "object"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"type": "null"
|
|
171
|
+
}
|
|
172
|
+
],
|
|
173
|
+
"description": "Per-locale localization substitutions. The top level key is the locale (e.g., \"en-US\" or \"fr\"). Each entry is a mapping of string IDs to their localized equivalents. Only supported on desktop."
|
|
174
|
+
},
|
|
175
|
+
"locales": {
|
|
176
|
+
"anyOf": [
|
|
177
|
+
{
|
|
178
|
+
"items": {
|
|
179
|
+
"type": "string"
|
|
180
|
+
},
|
|
181
|
+
"type": "array"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"type": "null"
|
|
185
|
+
}
|
|
186
|
+
],
|
|
187
|
+
"description": "The list of locale codes (e.g., \"en-US\" or \"fr\") that this experiment is targeting. If null, all locales are targeted."
|
|
188
|
+
},
|
|
189
|
+
"publishedDate": {
|
|
190
|
+
"anyOf": [
|
|
191
|
+
{
|
|
192
|
+
"format": "date-time",
|
|
193
|
+
"type": "string"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"type": "null"
|
|
197
|
+
}
|
|
198
|
+
],
|
|
199
|
+
"description": "The date that this experiment was first published to Remote Settings. If null, it has not yet been published."
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"required": [
|
|
203
|
+
"schemaVersion",
|
|
204
|
+
"slug",
|
|
205
|
+
"id",
|
|
206
|
+
"appName",
|
|
207
|
+
"appId",
|
|
208
|
+
"channel",
|
|
209
|
+
"userFacingName",
|
|
210
|
+
"userFacingDescription",
|
|
211
|
+
"isEnrollmentPaused",
|
|
212
|
+
"bucketConfig",
|
|
213
|
+
"branches",
|
|
214
|
+
"startDate",
|
|
215
|
+
"endDate",
|
|
216
|
+
"proposedEnrollment",
|
|
217
|
+
"referenceBranch"
|
|
218
|
+
],
|
|
219
|
+
"$defs": {
|
|
220
|
+
"DesktopTombstoneFeatureConfig": {
|
|
221
|
+
"properties": {
|
|
222
|
+
"featureId": {
|
|
223
|
+
"const": "unused-feature-id-for-legacy-support",
|
|
224
|
+
"type": "string"
|
|
225
|
+
},
|
|
226
|
+
"value": {
|
|
227
|
+
"type": "object"
|
|
228
|
+
},
|
|
229
|
+
"enabled": {
|
|
230
|
+
"const": false,
|
|
231
|
+
"type": "boolean"
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"required": [
|
|
235
|
+
"featureId",
|
|
236
|
+
"value",
|
|
237
|
+
"enabled"
|
|
238
|
+
],
|
|
239
|
+
"type": "object"
|
|
240
|
+
},
|
|
241
|
+
"ExperimentBucketConfig": {
|
|
242
|
+
"properties": {
|
|
243
|
+
"randomizationUnit": {
|
|
244
|
+
"$ref": "#/$defs/RandomizationUnit"
|
|
245
|
+
},
|
|
246
|
+
"namespace": {
|
|
247
|
+
"description": "Additional inputs to the hashing function.",
|
|
248
|
+
"type": "string"
|
|
249
|
+
},
|
|
250
|
+
"start": {
|
|
251
|
+
"description": "Index of the starting bucket of the range.",
|
|
252
|
+
"type": "integer"
|
|
253
|
+
},
|
|
254
|
+
"count": {
|
|
255
|
+
"description": "Number of buckets in the range.",
|
|
256
|
+
"type": "integer"
|
|
257
|
+
},
|
|
258
|
+
"total": {
|
|
259
|
+
"description": "The total number of buckets. You can assume this will always be 10000",
|
|
260
|
+
"type": "integer"
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"required": [
|
|
264
|
+
"randomizationUnit",
|
|
265
|
+
"namespace",
|
|
266
|
+
"start",
|
|
267
|
+
"count",
|
|
268
|
+
"total"
|
|
269
|
+
],
|
|
270
|
+
"type": "object"
|
|
271
|
+
},
|
|
272
|
+
"ExperimentFeatureConfig": {
|
|
273
|
+
"properties": {
|
|
274
|
+
"featureId": {
|
|
275
|
+
"description": "The identifier for the feature flag.",
|
|
276
|
+
"type": "string"
|
|
277
|
+
},
|
|
278
|
+
"value": {
|
|
279
|
+
"description": "The values that define the feature configuration. This should be validated against a schema.",
|
|
280
|
+
"type": "object"
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
"required": [
|
|
284
|
+
"featureId",
|
|
285
|
+
"value"
|
|
286
|
+
],
|
|
287
|
+
"type": "object"
|
|
288
|
+
},
|
|
289
|
+
"ExperimentMultiFeatureDesktopBranch": {
|
|
290
|
+
"description": "The branch definition supported on Firefox Desktop 95+.",
|
|
291
|
+
"properties": {
|
|
292
|
+
"slug": {
|
|
293
|
+
"description": "Identifier for the branch.",
|
|
294
|
+
"type": "string"
|
|
295
|
+
},
|
|
296
|
+
"ratio": {
|
|
297
|
+
"description": "Relative ratio of population for the branch. e.g., if branch A=1 and branch B=3, then branch A would get 25% of the population.",
|
|
298
|
+
"type": "integer"
|
|
299
|
+
},
|
|
300
|
+
"features": {
|
|
301
|
+
"description": "An array of feature configurations.",
|
|
302
|
+
"items": {
|
|
303
|
+
"$ref": "#/$defs/ExperimentFeatureConfig"
|
|
304
|
+
},
|
|
305
|
+
"type": "array"
|
|
306
|
+
},
|
|
307
|
+
"feature": {
|
|
308
|
+
"$ref": "#/$defs/DesktopTombstoneFeatureConfig",
|
|
309
|
+
"description": "The feature key must be provided with values to prevent crashes if the is encountered by Desktop clients earlier than version 95."
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
"required": [
|
|
313
|
+
"slug",
|
|
314
|
+
"ratio",
|
|
315
|
+
"features",
|
|
316
|
+
"feature"
|
|
317
|
+
],
|
|
318
|
+
"type": "object"
|
|
319
|
+
},
|
|
320
|
+
"ExperimentMultiFeatureMobileBranch": {
|
|
321
|
+
"description": "The branch definition for mobile browsers. Supported on Firefox for Android 96+ and Firefox for iOS 39+.",
|
|
322
|
+
"properties": {
|
|
323
|
+
"slug": {
|
|
324
|
+
"description": "Identifier for the branch.",
|
|
325
|
+
"type": "string"
|
|
326
|
+
},
|
|
327
|
+
"ratio": {
|
|
328
|
+
"description": "Relative ratio of population for the branch. e.g., if branch A=1 and branch B=3, then branch A would get 25% of the population.",
|
|
329
|
+
"type": "integer"
|
|
330
|
+
},
|
|
331
|
+
"features": {
|
|
332
|
+
"description": "An array of feature configurations.",
|
|
333
|
+
"items": {
|
|
334
|
+
"$ref": "#/$defs/ExperimentFeatureConfig"
|
|
335
|
+
},
|
|
336
|
+
"type": "array"
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
"required": [
|
|
340
|
+
"slug",
|
|
341
|
+
"ratio",
|
|
342
|
+
"features"
|
|
343
|
+
],
|
|
344
|
+
"type": "object"
|
|
345
|
+
},
|
|
346
|
+
"ExperimentOutcome": {
|
|
347
|
+
"properties": {
|
|
348
|
+
"slug": {
|
|
349
|
+
"description": "Identifier for the outcome.",
|
|
350
|
+
"type": "string"
|
|
351
|
+
},
|
|
352
|
+
"priority": {
|
|
353
|
+
"description": "e.g., \"primary\" or \"secondary\".",
|
|
354
|
+
"type": "string"
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
"required": [
|
|
358
|
+
"slug",
|
|
359
|
+
"priority"
|
|
360
|
+
],
|
|
361
|
+
"type": "object"
|
|
362
|
+
},
|
|
363
|
+
"ExperimentSingleFeatureBranch": {
|
|
364
|
+
"description": "A single-feature branch definition. Supported by Firefox Desktop for versions before 95, Firefox for Android for versions before 96, and Firefox for iOS for versions before 39.",
|
|
365
|
+
"properties": {
|
|
366
|
+
"slug": {
|
|
367
|
+
"description": "Identifier for the branch.",
|
|
368
|
+
"type": "string"
|
|
369
|
+
},
|
|
370
|
+
"ratio": {
|
|
371
|
+
"description": "Relative ratio of population for the branch. e.g., if branch A=1 and branch B=3, then branch A would get 25% of the population.",
|
|
372
|
+
"type": "integer"
|
|
373
|
+
},
|
|
374
|
+
"feature": {
|
|
375
|
+
"$ref": "#/$defs/ExperimentFeatureConfig",
|
|
376
|
+
"description": "A single feature configuration."
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
"required": [
|
|
380
|
+
"slug",
|
|
381
|
+
"ratio",
|
|
382
|
+
"feature"
|
|
383
|
+
],
|
|
384
|
+
"type": "object"
|
|
385
|
+
},
|
|
386
|
+
"RandomizationUnit": {
|
|
387
|
+
"description": "A unique, stable indentifier for the user used as an input to bucket hashing.",
|
|
388
|
+
"enum": [
|
|
389
|
+
"normandy_id",
|
|
390
|
+
"nimbus_id",
|
|
391
|
+
"user_id",
|
|
392
|
+
"group_id"
|
|
393
|
+
],
|
|
394
|
+
"type": "string"
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
|
3
|
+
"title": "SdkFeatureManifest",
|
|
4
|
+
"description": "The SDK-specific feature manifest.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": {
|
|
7
|
+
"$ref": "#/$defs/SdkFeature"
|
|
8
|
+
},
|
|
9
|
+
"$defs": {
|
|
10
|
+
"FeatureVariableType": {
|
|
11
|
+
"enum": [
|
|
12
|
+
"int",
|
|
13
|
+
"string",
|
|
14
|
+
"boolean",
|
|
15
|
+
"json"
|
|
16
|
+
],
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
19
|
+
"SdkFeature": {
|
|
20
|
+
"description": "A feature.",
|
|
21
|
+
"if": {
|
|
22
|
+
"properties": {
|
|
23
|
+
"hasExposure": {
|
|
24
|
+
"const": true
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"properties": {
|
|
29
|
+
"description": {
|
|
30
|
+
"description": "The description of the feature.",
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
"hasExposure": {
|
|
34
|
+
"description": "Whether or not this feature records exposure telemetry.",
|
|
35
|
+
"type": "boolean"
|
|
36
|
+
},
|
|
37
|
+
"exposureDescription": {
|
|
38
|
+
"description": "A description of the exposure telemetry collected by this feature. Only required if hasExposure is true.",
|
|
39
|
+
"type": "string"
|
|
40
|
+
},
|
|
41
|
+
"variables": {
|
|
42
|
+
"additionalProperties": {
|
|
43
|
+
"$ref": "#/$defs/SdkFeatureVariable"
|
|
44
|
+
},
|
|
45
|
+
"description": "The variables that this feature can set.",
|
|
46
|
+
"type": "object"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"required": [
|
|
50
|
+
"description",
|
|
51
|
+
"hasExposure",
|
|
52
|
+
"variables"
|
|
53
|
+
],
|
|
54
|
+
"then": {
|
|
55
|
+
"required": [
|
|
56
|
+
"exposureDescription"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"type": "object"
|
|
60
|
+
},
|
|
61
|
+
"SdkFeatureVariable": {
|
|
62
|
+
"dependentSchemas": {
|
|
63
|
+
"enum": {
|
|
64
|
+
"properties": {
|
|
65
|
+
"type": {
|
|
66
|
+
"const": "string"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"description": "A feature variable.",
|
|
72
|
+
"properties": {
|
|
73
|
+
"description": {
|
|
74
|
+
"description": "A description of the feature.",
|
|
75
|
+
"type": "string"
|
|
76
|
+
},
|
|
77
|
+
"type": {
|
|
78
|
+
"$ref": "#/$defs/FeatureVariableType",
|
|
79
|
+
"description": "The field type."
|
|
80
|
+
},
|
|
81
|
+
"enum": {
|
|
82
|
+
"description": "An optional list of possible string values. Only allowed when type is string.",
|
|
83
|
+
"items": {
|
|
84
|
+
"type": "string"
|
|
85
|
+
},
|
|
86
|
+
"type": "array"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"required": [
|
|
90
|
+
"description",
|
|
91
|
+
"type"
|
|
92
|
+
],
|
|
93
|
+
"type": "object"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|