Backed out changeset e5583dbc5865 (bug 1929116) for causing multiple bc/xpc failures. CLOSED TREE

This commit is contained in:
Sandor Molnar 2024-11-06 02:41:58 +02:00
Родитель 933749dc71
Коммит 156b0aaa08
7 изменённых файлов: 494 добавлений и 953 удалений

Просмотреть файл

@ -1519,8 +1519,6 @@ python/mozperftest/mozperftest/tests/data/
security/manager/tools/KnownRootHashes.json security/manager/tools/KnownRootHashes.json
security/manager/tools/PreloadedHPKPins.json security/manager/tools/PreloadedHPKPins.json
services/settings/dumps/ services/settings/dumps/
toolkit/components/nimbus/schemas/ExperimentFeature.schema.json
toolkit/components/nimbus/schemas/ExperimentFeatureManifest.schema.json
toolkit/components/nimbus/schemas/NimbusExperiment.schema.json toolkit/components/nimbus/schemas/NimbusExperiment.schema.json
toolkit/components/pdfjs/PdfJsDefaultPrefs.js toolkit/components/pdfjs/PdfJsDefaultPrefs.js
toolkit/components/pdfjs/PdfJsOverridePrefs.js toolkit/components/pdfjs/PdfJsOverridePrefs.js

Просмотреть файл

@ -1,55 +1,117 @@
{ {
"$schema": "https://json-schema.org/draft/2019-09/schema", "$schema": "https://json-schema.org/draft/2019-09/schema",
"title": "DesktopFeature", "additionalProperties": false,
"description": "A feature.",
"type": "object", "type": "object",
"properties": { "properties": {
"description": { "description": {
"description": "The description of the feature.",
"type": "string"
},
"hasExposure": {
"description": "Whether or not this feature records exposure telemetry.",
"type": "boolean"
},
"exposureDescription": {
"description": "A description of the exposure telemetry collected by this feature. Only required if hasExposure is true.",
"type": "string" "type": "string"
}, },
"owner": { "owner": {
"description": "The owner of the feature.", "type": "string",
"type": "string" "description": "The owner of the feature."
},
"isEarlyStartup": {
"description": "If true, the feature values will be cached in prefs so that they can be read before Nimbus is initialized during Firefox startup.",
"type": "boolean"
}, },
"applications": { "applications": {
"description": "The applications that can enroll in experiments for this feature. Defaults to \"firefox-desktop\".", "description": "The applications that can enroll in experiments for this feature. Defaults to firefox-desktop if not present.",
"type": "array",
"items": { "items": {
"$ref": "#/$defs/DesktopApplication" "type": "string",
"enum": ["firefox-desktop", "firefox-desktop-background-task"]
}, },
"minLength": 1, "minItems": 1
"type": "array"
}, },
"variables": { "hasExposure": {
"additionalProperties": { "type": "boolean",
"$ref": "#/$defs/DesktopFeatureVariable" "description": "If the feature sends an exposure event."
}, },
"description": "The variables that this feature can set.", "exposureDescription": {
"type": "object" "type": "string",
"description": "A description of the implementation details of the exposure event, if one is sent."
},
"isEarlyStartup": {
"type": "boolean",
"description": "If the feature values should be cached in prefs for fast early startup."
}, },
"schema": { "schema": {
"$ref": "#/$defs/NimbusFeatureSchema", "type": "object",
"description": "An optional JSON schema that describes the feature variables." "description": "For features with large number of variables we instead point to a JSONSchema file instead of specifying them in the variables field",
"properties": {
"uri": {
"type": "string",
"description": "A resource:// URI that can be loaded at runtime from within Firefox.",
"format": "uri"
},
"path": {
"type": "string",
"description": "The path to the schema file relative to the repository root"
}
},
"required": ["uri", "path"]
},
"variables": {
"additionalProperties": false,
"type": "object",
"patternProperties": {
"[a-zA-Z0-9_]+": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["json", "boolean", "int", "string"]
},
"fallbackPref": {
"type": "string",
"description": "A pref that provides the default value for a feature when none is present"
},
"setPref": {
"description": "A pref that should be set to the value of this variable when enrolling in experiments.",
"type": "object",
"properties": {
"branch": {
"type": "string",
"enum": ["default", "user"],
"description": "The branch the pref will be set on."
},
"pref": {
"type": "string",
"description": "The name of the pref."
}
},
"required": ["branch", "pref"],
"additionalProperties": false
},
"enum": {
"description": "Validate feature value using a list of possible options (for string only values)."
},
"description": {
"type": "string",
"description": "Explain how this value is being used"
}
},
"required": ["type", "description"],
"additionalProperties": false,
"dependentSchemas": {
"fallbackPref": {
"description": "setPref is mutually exclusive with fallbackPref",
"properties": {
"setPref": {
"const": null
}
}
},
"setPref": {
"description": "fallbackPref is mutually exclusive with setPref",
"properties": {
"fallbackPref": {
"const": null
}
}
}
}
}
}
} }
}, },
"required": [ "required": ["description", "hasExposure", "owner", "variables"],
"description",
"hasExposure",
"owner",
"variables"
],
"if": { "if": {
"properties": { "properties": {
"hasExposure": { "hasExposure": {
@ -58,208 +120,6 @@
} }
}, },
"then": { "then": {
"required": [ "required": ["exposureDescription"]
"exposureDescription"
]
},
"$defs": {
"DesktopApplication": {
"enum": [
"firefox-desktop",
"firefox-desktop-background-task"
],
"type": "string"
},
"DesktopFeatureVariable": {
"dependentSchemas": {
"enum": {
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "string"
}
}
},
"then": {
"properties": {
"enum": {
"items": {
"type": "string"
}
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "int"
}
}
},
"then": {
"properties": {
"enum": {
"items": {
"type": "integer"
}
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "boolean"
}
}
},
"then": {
"properties": {
"enum": {
"const": null
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "json"
}
}
},
"then": {
"properties": {
"enum": {
"const": null
}
}
}
}
]
},
"fallbackPref": {
"description": "setPref is mutually exclusive with fallbackPref",
"properties": {
"setPref": {
"const": null
}
}
},
"setPref": {
"description": "fallbackPref is mutually exclusive with setPref",
"properties": {
"fallbackPref": {
"const": null
}
}
}
},
"description": "A feature variable.",
"properties": {
"description": {
"description": "A description of the feature.",
"type": "string"
},
"type": {
"$ref": "#/$defs/FeatureVariableType",
"description": "The field type."
},
"enum": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"items": {
"type": "integer"
},
"type": "array"
}
],
"description": "An optional list of possible string or integer values. Only allowed when type is string or int. The types in the enum must match the type of the field."
},
"fallbackPref": {
"description": "A pref that provides the default value for a feature when none is present.",
"type": "string"
},
"setPref": {
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/$defs/SetPref"
}
],
"description": "A pref that should be set to the value of this variable when enrolling in experiments. Using a string is deprecated and unsupported in Firefox 124+."
}
},
"required": [
"description",
"type"
],
"type": "object"
},
"FeatureVariableType": {
"enum": [
"int",
"string",
"boolean",
"json"
],
"type": "string"
},
"NimbusFeatureSchema": {
"description": "Information about a JSON schema.",
"properties": {
"uri": {
"description": "The resource:// or chrome:// URI that can be loaded at runtime within Firefox. Required by Firefox so that Nimbus can import the schema for validation.",
"type": "string"
},
"path": {
"description": "The path to the schema file in the source checkout. Required by Experimenter so that it can find schema files in source checkouts.",
"type": "string"
}
},
"required": [
"uri",
"path"
],
"type": "object"
},
"PrefBranch": {
"enum": [
"default",
"user"
],
"type": "string"
},
"SetPref": {
"properties": {
"branch": {
"$ref": "#/$defs/PrefBranch",
"description": "The branch the pref will be set on. Prefs set on the user branch persists through restarts."
},
"pref": {
"description": "The name of the pref to set.",
"type": "string"
}
},
"required": [
"branch",
"pref"
],
"type": "object"
}
} }
} }

Просмотреть файл

@ -1,272 +1,8 @@
{ {
"$schema": "https://json-schema.org/draft/2019-09/schema", "$schema": "https://json-schema.org/draft/2019-09/schema",
"title": "DesktopFeatureManifest",
"description": "The Firefox Desktop-specific feature manifest. Firefox Desktop requires different fields for its features compared to the general Nimbus feature manifest.",
"type": "object", "type": "object",
"additionalProperties": { "additionalProperties": false,
"$ref": "#/$defs/DesktopFeature" "patternProperties": {
}, "^[A-Za-z0-9_-]*$": { "$ref": "ExperimentFeature.schema.json" }
"$defs": {
"DesktopApplication": {
"enum": [
"firefox-desktop",
"firefox-desktop-background-task"
],
"type": "string"
},
"DesktopFeature": {
"description": "A feature.",
"if": {
"properties": {
"hasExposure": {
"const": true
}
}
},
"properties": {
"description": {
"description": "The description of the feature.",
"type": "string"
},
"hasExposure": {
"description": "Whether or not this feature records exposure telemetry.",
"type": "boolean"
},
"exposureDescription": {
"description": "A description of the exposure telemetry collected by this feature. Only required if hasExposure is true.",
"type": "string"
},
"owner": {
"description": "The owner of the feature.",
"type": "string"
},
"isEarlyStartup": {
"description": "If true, the feature values will be cached in prefs so that they can be read before Nimbus is initialized during Firefox startup.",
"type": "boolean"
},
"applications": {
"description": "The applications that can enroll in experiments for this feature. Defaults to \"firefox-desktop\".",
"items": {
"$ref": "#/$defs/DesktopApplication"
},
"minLength": 1,
"type": "array"
},
"variables": {
"additionalProperties": {
"$ref": "#/$defs/DesktopFeatureVariable"
},
"description": "The variables that this feature can set.",
"type": "object"
},
"schema": {
"$ref": "#/$defs/NimbusFeatureSchema",
"description": "An optional JSON schema that describes the feature variables."
}
},
"required": [
"description",
"hasExposure",
"owner",
"variables"
],
"then": {
"required": [
"exposureDescription"
]
},
"type": "object"
},
"DesktopFeatureVariable": {
"dependentSchemas": {
"enum": {
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "string"
}
}
},
"then": {
"properties": {
"enum": {
"items": {
"type": "string"
}
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "int"
}
}
},
"then": {
"properties": {
"enum": {
"items": {
"type": "integer"
}
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "boolean"
}
}
},
"then": {
"properties": {
"enum": {
"const": null
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "json"
}
}
},
"then": {
"properties": {
"enum": {
"const": null
}
}
}
}
]
},
"fallbackPref": {
"description": "setPref is mutually exclusive with fallbackPref",
"properties": {
"setPref": {
"const": null
}
}
},
"setPref": {
"description": "fallbackPref is mutually exclusive with setPref",
"properties": {
"fallbackPref": {
"const": null
}
}
}
},
"description": "A feature variable.",
"properties": {
"description": {
"description": "A description of the feature.",
"type": "string"
},
"type": {
"$ref": "#/$defs/FeatureVariableType",
"description": "The field type."
},
"enum": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"items": {
"type": "integer"
},
"type": "array"
}
],
"description": "An optional list of possible string or integer values. Only allowed when type is string or int. The types in the enum must match the type of the field."
},
"fallbackPref": {
"description": "A pref that provides the default value for a feature when none is present.",
"type": "string"
},
"setPref": {
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/$defs/SetPref"
}
],
"description": "A pref that should be set to the value of this variable when enrolling in experiments. Using a string is deprecated and unsupported in Firefox 124+."
}
},
"required": [
"description",
"type"
],
"type": "object"
},
"FeatureVariableType": {
"enum": [
"int",
"string",
"boolean",
"json"
],
"type": "string"
},
"NimbusFeatureSchema": {
"description": "Information about a JSON schema.",
"properties": {
"uri": {
"description": "The resource:// or chrome:// URI that can be loaded at runtime within Firefox. Required by Firefox so that Nimbus can import the schema for validation.",
"type": "string"
},
"path": {
"description": "The path to the schema file in the source checkout. Required by Experimenter so that it can find schema files in source checkouts.",
"type": "string"
}
},
"required": [
"uri",
"path"
],
"type": "object"
},
"PrefBranch": {
"enum": [
"default",
"user"
],
"type": "string"
},
"SetPref": {
"properties": {
"branch": {
"$ref": "#/$defs/PrefBranch",
"description": "The branch the pref will be set on. Prefs set on the user branch persists through restarts."
},
"pref": {
"description": "The name of the pref to set.",
"type": "string"
}
},
"required": [
"branch",
"pref"
],
"type": "object"
}
} }
} }

Просмотреть файл

@ -1,463 +1,378 @@
{ {
"$schema": "https://json-schema.org/draft/2019-09/schema", "$schema": "http://json-schema.org/draft-07/schema#",
"title": "NimbusExperiment", "$ref": "#/definitions/NimbusExperiment",
"description": "The experiment definition accessible to: 1. The Nimbus SDK via Remote Settings 2. Jetstream via the Experimenter API", "definitions": {
"type": "object", "NimbusExperiment": {
"properties": { "type": "object",
"schemaVersion": { "properties": {
"description": "Version of the NimbusExperiment schema this experiment refers to", "schemaVersion": {
"type": "string" "type": "string",
}, "description": "Version of the NimbusExperiment schema this experiment refers to"
"slug": {
"description": "Unique identifier for the experiment",
"type": "string"
},
"id": {
"description": "Unique identifier for the experiiment. This is a duplicate of slug, but is required field for all Remote Settings records.",
"type": "string"
},
"appName": {
"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\".",
"type": "string"
},
"appId": {
"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\".",
"type": "string"
},
"channel": {
"description": "A specific channel of an application such as \"nightly\", \"beta\", or \"release\".",
"type": "string"
},
"userFacingName": {
"description": "Public name of the experiment that will be displayed on \"about:studies\".",
"type": "string"
},
"userFacingDescription": {
"description": "Short public description of the experiment that will be displayed on \"about:studies\".",
"type": "string"
},
"isEnrollmentPaused": {
"description": "When this property is set to true, the SDK should not enroll new users into the experiment that have not already been enrolled.",
"type": "boolean"
},
"isRollout": {
"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",
"type": "boolean"
},
"isFirefoxLabsOptIn": {
"description": "When this property is set to true, treat this experiment as aFirefox Labs experiment",
"type": "boolean"
},
"firefoxLabsTitle": {
"description": "An optional string containing the Fluent ID for the title of the opt-in",
"type": "string"
},
"firefoxLabsDescription": {
"description": "An optional string containing the Fluent ID for the description of the opt-in",
"type": "string"
},
"bucketConfig": {
"$ref": "#/$defs/ExperimentBucketConfig",
"description": "Bucketing configuration."
},
"outcomes": {
"description": "A list of outcomes relevant to the experiment analysis.",
"items": {
"$ref": "#/$defs/ExperimentOutcome"
},
"type": "array"
},
"featureIds": {
"description": "A list of featureIds the experiment contains configurations for.",
"items": {
"type": "string"
},
"type": "array"
},
"branches": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ExperimentSingleFeatureBranch"
},
"type": "array"
}, },
{ "slug": {
"items": { "type": "string",
"$ref": "#/$defs/ExperimentMultiFeatureDesktopBranch" "description": "Unique identifier for the experiment"
},
"type": "array"
}, },
{ "id": {
"items": { "type": "string",
"$ref": "#/$defs/ExperimentMultiFeatureMobileBranch" "description": "Unique identifier for the experiment. This is a duplicate of slug, but is a required field for all Remote Settings records."
},
"type": "array"
}
],
"description": "Branch configuration for the experiment."
},
"targeting": {
"anyOf": [
{
"type": "string"
}, },
{ "appName": {
"type": "null" "type": "string",
} "description": "A slug identifying the targeted product for this experiment. It should be a lowercase_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\" or \"firefox_desktop\"."
],
"description": "A JEXL targeting expression used to filter out experiments."
},
"startDate": {
"anyOf": [
{
"format": "date",
"type": "string"
}, },
{ "appId": {
"type": "null" "type": "string",
} "description": "The platform identifier for the targeted app. The app's identifier exactly as it appears in the relevant app store listing (for relevant platforms) or in the app's Glean initialization call (for other platforms). Examples are \"org.mozilla.firefox_beta\" or \"firefox-desktop\"."
],
"description": "Actual publish date of the experiment. Note that this value is expected to be null in Remote Settings."
},
"enrollmentEndDate": {
"anyOf": [
{
"format": "date",
"type": "string"
}, },
{ "channel": {
"type": "null" "type": "string",
} "description": "A specific channel of an application such as \"nightly\", \"beta\", or \"release\""
],
"description": "Actual enrollment end date of the experiment. Note that this value is expected to be null in Remote Settings."
},
"endDate": {
"anyOf": [
{
"format": "date",
"type": "string"
}, },
{ "userFacingName": {
"type": "null" "type": "string",
} "description": "Public name of the experiment displayed on \"about:studies\""
],
"description": "Actual end date of this experiment. Note that this field is expected to be null in Remote Settings."
},
"proposedDuration": {
"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).",
"type": "integer"
},
"proposedEnrollment": {
"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).",
"type": "integer"
},
"referenceBranch": {
"anyOf": [
{
"type": "string"
}, },
{ "userFacingDescription": {
"type": "null" "type": "string",
} "description": "Short public description of the experiment displayed on on \"about:studies\""
],
"description": "The slug of the reference branch (i.e., the branch we consider \"control\")."
},
"featureValidationOptOut": {
"description": "Opt out of feature schema validation. Only supported on desktop.",
"type": "boolean"
},
"localizations": {
"anyOf": [
{
"$ref": "#/$defs/ExperimentLocalizations"
}, },
{ "isEnrollmentPaused": {
"type": "null" "type": "boolean",
} "description": "When this property is set to true, the the SDK should not enroll new users into the experiment that have not already been enrolled."
]
},
"locales": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
}, },
{ "isRollout": {
"type": "null" "type": "boolean",
} "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"
],
"description": "The list of locale codes (e.g., \"en-US\" or \"fr\") that this experiment is targeting. If null, all locales are targeted."
},
"publishedDate": {
"anyOf": [
{
"format": "date-time",
"type": "string"
}, },
{ "bucketConfig": {
"type": "null" "type": "object",
}
],
"description": "The date that this experiment was first published to Remote Settings. If null, it has not yet been published."
}
},
"required": [
"schemaVersion",
"slug",
"id",
"appName",
"appId",
"channel",
"userFacingName",
"userFacingDescription",
"isEnrollmentPaused",
"bucketConfig",
"branches",
"startDate",
"endDate",
"proposedEnrollment",
"referenceBranch"
],
"dependentSchemas": {
"isFirefoxLabsOptIn": {
"if": {
"properties": {
"isFirefoxLabsOptIn": {
"const": true
}
}
},
"then": {
"if": {
"properties": { "properties": {
"isRollout": { "randomizationUnit": {
"const": false "type": "string",
"description": "A unique, stable identifier for the user used as an input to bucket hashing"
},
"namespace": {
"type": "string",
"description": "Additional inputs to the hashing function"
},
"start": {
"type": "integer",
"description": "Index of start of the range of buckets"
},
"count": {
"type": "integer",
"description": "Number of buckets to check"
},
"total": {
"type": "integer",
"description": "Total number of buckets. You can assume this will always be 10000.",
"default": 10000
} }
}, },
"required": [ "required": [
"isRollout" "randomizationUnit",
] "namespace",
"start",
"count",
"total"
],
"description": "Bucketing configuration"
}, },
"properties": { "outcomes": {
"firefoxLabsTitle": { "type": "array",
"items": {
"type": "object",
"properties": {
"slug": {
"type": "string",
"description": "Identifier for the outcome"
},
"priority": {
"type": "string",
"description": "e.g. \"primary\" or \"secondary\""
}
},
"required": [
"slug",
"priority"
]
},
"description": "A list of outcomes relevant to the experiment analysis."
},
"featureIds": {
"type": "array",
"items": {
"type": "string" "type": "string"
}, },
"firefoxLabsDescription": { "description": "A list of featureIds the experiment contains configurations for."
"type": "string"
}
}, },
"required": [ "branches": {
"firefoxLabsTitle", "anyOf": [
"firefoxLabsDescription" {
], "type": "array",
"then": {
"properties": {
"branches": {
"items": { "items": {
"type": "object",
"properties": {
"slug": {
"type": "string",
"description": "Identifier for the branch"
},
"ratio": {
"type": "integer",
"description": "Relative ratio of population for the branch (e.g. if branch A=1 and branch B=3, branch A would get 25% of the population)",
"default": 1
},
"feature": {
"type": "object",
"properties": {
"featureId": {
"type": "string",
"description": "The identifier for the feature flag"
},
"value": {
"type": "object",
"additionalProperties": {},
"description": "Optional extra params for the feature (this should be validated against a schema)"
}
},
"required": [
"featureId",
"value"
],
"description": "A single feature configuration"
}
},
"required": [ "required": [
"firefoxLabsTitle" "slug",
"ratio",
"feature"
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {
"slug": {
"type": "string",
"description": "Identifier for the branch"
},
"ratio": {
"type": "integer",
"description": "Relative ratio of population for the branch (e.g. if branch A=1 and branch B=3, branch A would get 25% of the population)",
"default": 1
},
"feature": {
"type": "object",
"properties": {
"featureId": {
"type": "string",
"const": "unused-feature-id-for-legacy-support"
},
"enabled": {
"type": "boolean",
"const": false
},
"value": {
"type": "object",
"additionalProperties": {}
}
},
"required": [
"featureId",
"enabled",
"value"
],
"description": "The feature key must be provided with valid values to prevent crashes if the DTO is encountered by Desktop clients earlier than version 95."
},
"features": {
"type": "array",
"items": {
"type": "object",
"properties": {
"featureId": {
"type": "string",
"description": "The identifier for the feature flag"
},
"value": {
"type": "object",
"additionalProperties": {},
"description": "Optional extra params for the feature (this should be validated against a schema)"
}
},
"required": [
"featureId",
"value"
]
},
"description": "An array of feature configurations"
}
},
"required": [
"slug",
"ratio",
"feature",
"features"
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {
"slug": {
"type": "string",
"description": "Identifier for the branch"
},
"ratio": {
"type": "integer",
"description": "Relative ratio of population for the branch (e.g. if branch A=1 and branch B=3, branch A would get 25% of the population)",
"default": 1
},
"features": {
"type": "array",
"items": {
"type": "object",
"properties": {
"featureId": {
"type": "string",
"description": "The identifier for the feature flag"
},
"value": {
"type": "object",
"additionalProperties": {},
"description": "Optional extra params for the feature (this should be validated against a schema)"
}
},
"required": [
"featureId",
"value"
]
},
"description": "An array of feature configurations"
}
},
"required": [
"slug",
"ratio",
"features"
] ]
} }
} }
} ],
} "description": "Branch configuration for the experiment"
}
}
},
"$defs": {
"DesktopTombstoneFeatureConfig": {
"properties": {
"featureId": {
"const": "unused-feature-id-for-legacy-support",
"type": "string"
}, },
"value": { "targeting": {
"type": "object" "type": [
"string",
"null"
],
"description": "JEXL expression used to filter experiments based on locale, geo, etc."
}, },
"enabled": { "startDate": {
"const": false, "type": [
"type": "boolean" "string",
} "null"
}, ],
"required": [ "description": "Actual publish date of the experiment Note that this value is expected to be null in Remote Settings.",
"featureId", "format": "date"
"value", },
"enabled" "enrollmentEndDate": {
], "type": [
"type": "object" "string",
}, "null"
"ExperimentBucketConfig": { ],
"properties": { "description": "Actual enrollment end date of the experiment. Note that this value is expected to be null in Remote Settings.",
"randomizationUnit": { "format": "date"
"$ref": "#/$defs/RandomizationUnit" },
}, "endDate": {
"namespace": { "type": [
"description": "Additional inputs to the hashing function.", "string",
"type": "string" "null"
}, ],
"start": { "description": "Actual end date of the experiment. Note that this value is expected to be null in Remote Settings.",
"description": "Index of the starting bucket of the range.", "format": "date"
"type": "integer" },
}, "proposedDuration": {
"count": { "type": "integer",
"description": "Number of buckets in the range.", "description": "Duration of the experiment from the start date in days. Note that this property is only used during the analysis phase (not by the SDK)"
"type": "integer" },
}, "proposedEnrollment": {
"total": { "type": "integer",
"description": "The total number of buckets. You can assume this will always be 10000", "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 (not by the SDK)"
"type": "integer" },
} "referenceBranch": {
}, "type": [
"required": [ "string",
"randomizationUnit", "null"
"namespace", ],
"start", "description": "The slug of the reference branch (that is, which branch we consider \"control\")"
"count", },
"total" "featureValidationOptOut": {
], "type": "boolean",
"type": "object" "description": "Opt out of feature schema validation. Only supported on desktop."
}, },
"ExperimentFeatureConfig": { "localizations": {
"properties": { "anyOf": [
"featureId": { {
"description": "The identifier for the feature flag.", "type": "object",
"type": "string" "additionalProperties": {
}, "type": "object",
"value": { "additionalProperties": {
"description": "The values that define the feature configuration. This should be validated against a schema.", "type": "string"
"type": "object" }
} }
}, },
"required": [ {
"featureId", "type": "null"
"value" }
], ],
"type": "object" "description": "Per-locale localization substitutions.\n\nThe top level key is the locale (e.g., \"en-US\" or \"fr\"). Each entry is a mapping of string IDs to their localized equivalents.\n\nOnly supported on desktop."
}, },
"ExperimentLocalizations": { "locales": {
"additionalProperties": { "anyOf": [
"additionalProperties": { {
"type": "string" "type": "array",
}, "items": {
"type": "object" "type": "string"
}, }
"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.", },
"type": "object" {
}, "type": "null"
"ExperimentMultiFeatureDesktopBranch": { }
"description": "The branch definition supported on Firefox Desktop 95+.", ],
"properties": { "description": "The list of locale codes (e.g., \"en-US\" or \"fr\") that this experiment is targeting.\n\nIf null, all locales are targeted."
"slug": { },
"description": "Identifier for the branch.", "publishedDate": {
"type": "string" "type": [
}, "string",
"ratio": { "null"
"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.", ],
"type": "integer" "description": "The date that this experiment was first published to Remote Settings. Note that this value is expected to be present in Remote Settings.\n\nIf null, it has not yet been published.",
}, "format": "date-time"
"features": {
"description": "An array of feature configurations.",
"items": {
"$ref": "#/$defs/ExperimentFeatureConfig"
},
"type": "array"
},
"feature": {
"$ref": "#/$defs/DesktopTombstoneFeatureConfig",
"description": "The feature key must be provided with values to prevent crashes if the is encountered by Desktop clients earlier than version 95."
},
"firefoxLabsTitle": {
"description": "An optional string containing the title of the branch",
"type": "string"
} }
}, },
"required": [ "required": [
"schemaVersion",
"slug", "slug",
"ratio", "id",
"features", "appName",
"feature", "appId",
"firefoxLabsTitle" "channel",
"userFacingName",
"userFacingDescription",
"isEnrollmentPaused",
"bucketConfig",
"branches",
"startDate",
"endDate",
"proposedEnrollment",
"referenceBranch"
], ],
"type": "object" "description": "The experiment definition accessible to: 1. The Nimbus SDK via Remote Settings 2. Jetstream via the Experimenter API"
},
"ExperimentMultiFeatureMobileBranch": {
"description": "The branch definition for mobile browsers. Supported on Firefox for Android 96+ and Firefox for iOS 39+.",
"properties": {
"slug": {
"description": "Identifier for the branch.",
"type": "string"
},
"ratio": {
"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.",
"type": "integer"
},
"features": {
"description": "An array of feature configurations.",
"items": {
"$ref": "#/$defs/ExperimentFeatureConfig"
},
"type": "array"
}
},
"required": [
"slug",
"ratio",
"features"
],
"type": "object"
},
"ExperimentOutcome": {
"properties": {
"slug": {
"description": "Identifier for the outcome.",
"type": "string"
},
"priority": {
"description": "e.g., \"primary\" or \"secondary\".",
"type": "string"
}
},
"required": [
"slug",
"priority"
],
"type": "object"
},
"ExperimentSingleFeatureBranch": {
"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.",
"properties": {
"slug": {
"description": "Identifier for the branch.",
"type": "string"
},
"ratio": {
"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.",
"type": "integer"
},
"feature": {
"$ref": "#/$defs/ExperimentFeatureConfig",
"description": "A single feature configuration."
}
},
"required": [
"slug",
"ratio",
"feature"
],
"type": "object"
},
"RandomizationUnit": {
"description": "A unique, stable indentifier for the user used as an input to bucket hashing.",
"enum": [
"normandy_id",
"nimbus_id",
"user_id",
"group_id"
],
"type": "string"
} }
} }
} }

Просмотреть файл

@ -5,24 +5,27 @@ bugzilla:
component: "Nimbus Desktop Client" component: "Nimbus Desktop Client"
origin: origin:
name: "mozilla-nimbus-schemas" name: "nimbus-shared"
description: "Schemas used by Mozilla Nimbus and related projects." description: "Shared data and schemas for Project Nimbus"
url: "https://github.com/mozilla/experimenter" url: "https://github.com/mozilla/nimbus-shared"
license: "MPL-2.0" license: "MPL-2.0"
release: "version 2024.11.1" release: "version 2.5.2"
revision: "ad39342a4e10d6f2ce644d64cb38c23ba4db1429" revision: "v2.5.2"
vendoring: vendoring:
url: "https://github.com/mozilla/experimenter" url: "https://github.com/mozilla/nimbus-shared"
source-hosting: "github" source-hosting: "github"
tracking: "commit" tracking: "tag"
flavor: "individual-files" skip-vendoring-steps:
individual-files: - "fetch"
- upstream: schemas/schemas/NimbusExperiment.schema.json - "update-moz-build"
destination: NimbusExperiment.schema.json
- upstream: schemas/schemas/DesktopFeature.schema.json keep:
destination: ExperimentFeature.schema.json - "*.schema.json"
- "vendor.sh"
- upstream: schemas/schemas/DesktopFeatureManifest.schema.json update-actions:
destination: ExperimentFeatureManifest.schema.json - action: "run-script"
script: "vendor.sh"
cwd: "{yaml_dir}"
args: ["{revision}"]

Просмотреть файл

@ -0,0 +1,31 @@
#!/bin/bash
set -euo pipefail
# Path to mach relative to toolkit/components/nimbus/schemas/
MACH=$(realpath "../../../../mach")
if [[ $(uname -a) == *MSYS* ]]; then
MACH="python ${MACH}"
fi
NPM="${MACH} npm"
# Strip the leading v from the tag to get the version number.
TAG="$1"
VERSION="${TAG:1}"
NAMESPACE="@mozilla/"
PACKAGE="nimbus-shared"
URL="https://registry.npmjs.org/${NAMESPACE}${PACKAGE}/-/${PACKAGE}-${VERSION}.tgz"
mkdir -p tmp
cd tmp
curl --proto '=https' --tlsv1.2 -sSf "${URL}" | tar -xzf - --strip-components 1
cp "schemas/experiments/NimbusExperiment.json" "../NimbusExperiment.schema.json"
cd ..
# Ensure the generated file ends with a newline
sed -i -e '$a\' NimbusExperiment.schema.json
rm -rf tmp

Просмотреть файл

@ -89,8 +89,6 @@ python/mozperftest/mozperftest/tests/data/
security/manager/tools/KnownRootHashes.json security/manager/tools/KnownRootHashes.json
security/manager/tools/PreloadedHPKPins.json security/manager/tools/PreloadedHPKPins.json
services/settings/dumps/ services/settings/dumps/
toolkit/components/nimbus/schemas/ExperimentFeature.schema.json
toolkit/components/nimbus/schemas/ExperimentFeatureManifest.schema.json
toolkit/components/nimbus/schemas/NimbusExperiment.schema.json toolkit/components/nimbus/schemas/NimbusExperiment.schema.json
toolkit/components/pdfjs/PdfJsDefaultPrefs.js toolkit/components/pdfjs/PdfJsDefaultPrefs.js
toolkit/components/uniffi-js/UniFFIGeneratedScaffolding.cpp toolkit/components/uniffi-js/UniFFIGeneratedScaffolding.cpp