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/PreloadedHPKPins.json
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/pdfjs/PdfJsDefaultPrefs.js
toolkit/components/pdfjs/PdfJsOverridePrefs.js

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

@ -1,55 +1,117 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"title": "DesktopFeature",
"description": "A feature.",
"additionalProperties": false,
"type": "object",
"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"
"type": "string",
"description": "The owner of the feature."
},
"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": {
"$ref": "#/$defs/DesktopApplication"
"type": "string",
"enum": ["firefox-desktop", "firefox-desktop-background-task"]
},
"minLength": 1,
"type": "array"
"minItems": 1
},
"variables": {
"additionalProperties": {
"$ref": "#/$defs/DesktopFeatureVariable"
},
"description": "The variables that this feature can set.",
"type": "object"
"hasExposure": {
"type": "boolean",
"description": "If the feature sends an exposure event."
},
"exposureDescription": {
"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": {
"$ref": "#/$defs/NimbusFeatureSchema",
"description": "An optional JSON schema that describes the feature variables."
"type": "object",
"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": [
"description",
"hasExposure",
"owner",
"variables"
],
"required": ["description", "hasExposure", "owner", "variables"],
"if": {
"properties": {
"hasExposure": {
@ -58,208 +120,6 @@
}
},
"then": {
"required": [
"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"
}
"required": ["exposureDescription"]
}
}

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

@ -1,272 +1,8 @@
{
"$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",
"additionalProperties": {
"$ref": "#/$defs/DesktopFeature"
},
"$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"
}
"additionalProperties": false,
"patternProperties": {
"^[A-Za-z0-9_-]*$": { "$ref": "ExperimentFeature.schema.json" }
}
}

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

@ -1,463 +1,378 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"title": "NimbusExperiment",
"description": "The experiment definition accessible to: 1. The Nimbus SDK via Remote Settings 2. Jetstream via the Experimenter API",
"type": "object",
"properties": {
"schemaVersion": {
"description": "Version of the NimbusExperiment schema this experiment refers to",
"type": "string"
},
"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"
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/NimbusExperiment",
"definitions": {
"NimbusExperiment": {
"type": "object",
"properties": {
"schemaVersion": {
"type": "string",
"description": "Version of the NimbusExperiment schema this experiment refers to"
},
{
"items": {
"$ref": "#/$defs/ExperimentMultiFeatureDesktopBranch"
},
"type": "array"
"slug": {
"type": "string",
"description": "Unique identifier for the experiment"
},
{
"items": {
"$ref": "#/$defs/ExperimentMultiFeatureMobileBranch"
},
"type": "array"
}
],
"description": "Branch configuration for the experiment."
},
"targeting": {
"anyOf": [
{
"type": "string"
"id": {
"type": "string",
"description": "Unique identifier for the experiment. This is a duplicate of slug, but is a required field for all Remote Settings records."
},
{
"type": "null"
}
],
"description": "A JEXL targeting expression used to filter out experiments."
},
"startDate": {
"anyOf": [
{
"format": "date",
"type": "string"
"appName": {
"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\"."
},
{
"type": "null"
}
],
"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"
"appId": {
"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\"."
},
{
"type": "null"
}
],
"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"
"channel": {
"type": "string",
"description": "A specific channel of an application such as \"nightly\", \"beta\", or \"release\""
},
{
"type": "null"
}
],
"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"
"userFacingName": {
"type": "string",
"description": "Public name of the experiment displayed on \"about:studies\""
},
{
"type": "null"
}
],
"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"
"userFacingDescription": {
"type": "string",
"description": "Short public description of the experiment displayed on on \"about:studies\""
},
{
"type": "null"
}
]
},
"locales": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
"isEnrollmentPaused": {
"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."
},
{
"type": "null"
}
],
"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"
"isRollout": {
"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"
},
{
"type": "null"
}
],
"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": {
"bucketConfig": {
"type": "object",
"properties": {
"isRollout": {
"const": false
"randomizationUnit": {
"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": [
"isRollout"
]
"randomizationUnit",
"namespace",
"start",
"count",
"total"
],
"description": "Bucketing configuration"
},
"properties": {
"firefoxLabsTitle": {
"outcomes": {
"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"
},
"firefoxLabsDescription": {
"type": "string"
}
"description": "A list of featureIds the experiment contains configurations for."
},
"required": [
"firefoxLabsTitle",
"firefoxLabsDescription"
],
"then": {
"properties": {
"branches": {
"branches": {
"anyOf": [
{
"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",
"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": [
"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"
]
}
}
}
}
}
}
},
"$defs": {
"DesktopTombstoneFeatureConfig": {
"properties": {
"featureId": {
"const": "unused-feature-id-for-legacy-support",
"type": "string"
],
"description": "Branch configuration for the experiment"
},
"value": {
"type": "object"
"targeting": {
"type": [
"string",
"null"
],
"description": "JEXL expression used to filter experiments based on locale, geo, etc."
},
"enabled": {
"const": false,
"type": "boolean"
}
},
"required": [
"featureId",
"value",
"enabled"
],
"type": "object"
},
"ExperimentBucketConfig": {
"properties": {
"randomizationUnit": {
"$ref": "#/$defs/RandomizationUnit"
},
"namespace": {
"description": "Additional inputs to the hashing function.",
"type": "string"
},
"start": {
"description": "Index of the starting bucket of the range.",
"type": "integer"
},
"count": {
"description": "Number of buckets in the range.",
"type": "integer"
},
"total": {
"description": "The total number of buckets. You can assume this will always be 10000",
"type": "integer"
}
},
"required": [
"randomizationUnit",
"namespace",
"start",
"count",
"total"
],
"type": "object"
},
"ExperimentFeatureConfig": {
"properties": {
"featureId": {
"description": "The identifier for the feature flag.",
"type": "string"
},
"value": {
"description": "The values that define the feature configuration. This should be validated against a schema.",
"type": "object"
}
},
"required": [
"featureId",
"value"
],
"type": "object"
},
"ExperimentLocalizations": {
"additionalProperties": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"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"
},
"ExperimentMultiFeatureDesktopBranch": {
"description": "The branch definition supported on Firefox Desktop 95+.",
"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"
},
"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"
"startDate": {
"type": [
"string",
"null"
],
"description": "Actual publish date of the experiment Note that this value is expected to be null in Remote Settings.",
"format": "date"
},
"enrollmentEndDate": {
"type": [
"string",
"null"
],
"description": "Actual enrollment end date of the experiment. Note that this value is expected to be null in Remote Settings.",
"format": "date"
},
"endDate": {
"type": [
"string",
"null"
],
"description": "Actual end date of the experiment. Note that this value is expected to be null in Remote Settings.",
"format": "date"
},
"proposedDuration": {
"type": "integer",
"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)"
},
"proposedEnrollment": {
"type": "integer",
"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)"
},
"referenceBranch": {
"type": [
"string",
"null"
],
"description": "The slug of the reference branch (that is, which branch we consider \"control\")"
},
"featureValidationOptOut": {
"type": "boolean",
"description": "Opt out of feature schema validation. Only supported on desktop."
},
"localizations": {
"anyOf": [
{
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
{
"type": "null"
}
],
"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."
},
"locales": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
],
"description": "The list of locale codes (e.g., \"en-US\" or \"fr\") that this experiment is targeting.\n\nIf null, all locales are targeted."
},
"publishedDate": {
"type": [
"string",
"null"
],
"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"
}
},
"required": [
"schemaVersion",
"slug",
"ratio",
"features",
"feature",
"firefoxLabsTitle"
"id",
"appName",
"appId",
"channel",
"userFacingName",
"userFacingDescription",
"isEnrollmentPaused",
"bucketConfig",
"branches",
"startDate",
"endDate",
"proposedEnrollment",
"referenceBranch"
],
"type": "object"
},
"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"
"description": "The experiment definition accessible to: 1. The Nimbus SDK via Remote Settings 2. Jetstream via the Experimenter API"
}
}
}

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

@ -5,24 +5,27 @@ bugzilla:
component: "Nimbus Desktop Client"
origin:
name: "mozilla-nimbus-schemas"
description: "Schemas used by Mozilla Nimbus and related projects."
url: "https://github.com/mozilla/experimenter"
name: "nimbus-shared"
description: "Shared data and schemas for Project Nimbus"
url: "https://github.com/mozilla/nimbus-shared"
license: "MPL-2.0"
release: "version 2024.11.1"
revision: "ad39342a4e10d6f2ce644d64cb38c23ba4db1429"
release: "version 2.5.2"
revision: "v2.5.2"
vendoring:
url: "https://github.com/mozilla/experimenter"
url: "https://github.com/mozilla/nimbus-shared"
source-hosting: "github"
tracking: "commit"
flavor: "individual-files"
individual-files:
- upstream: schemas/schemas/NimbusExperiment.schema.json
destination: NimbusExperiment.schema.json
tracking: "tag"
skip-vendoring-steps:
- "fetch"
- "update-moz-build"
- upstream: schemas/schemas/DesktopFeature.schema.json
destination: ExperimentFeature.schema.json
keep:
- "*.schema.json"
- "vendor.sh"
- upstream: schemas/schemas/DesktopFeatureManifest.schema.json
destination: ExperimentFeatureManifest.schema.json
update-actions:
- 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/PreloadedHPKPins.json
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/pdfjs/PdfJsDefaultPrefs.js
toolkit/components/uniffi-js/UniFFIGeneratedScaffolding.cpp