Skip to content

Instantly share code, notes, and snippets.

@georgf
Created February 20, 2016 21:57
Show Gist options
  • Save georgf/b39db5914b2a2ad4efab to your computer and use it in GitHub Desktop.
Save georgf/b39db5914b2a2ad4efab to your computer and use it in GitHub Desktop.
Fixups for main ping schema
--- main.schema.json 2016-02-20 22:54:40.000000000 +0100
+++ toolkit/components/telemetry/tests/schemas/main.schema.json 2016-02-20 22:34:59.000000000 +0100
@@ -21,21 +21,21 @@
"release"
]
},
"name": {
"type": "string"
},
"platformVersion": {
"type": "string",
- "pattern": "^\\d{2}\\."
+ "pattern": "^\\d+\\."
},
"version": {
"type": "string",
- "pattern": "^\\d{2}\\."
+ "pattern": "^\\d+\\."
},
"vendor": {
"type": "string"
},
"xpcomAbi": {
"type": "string"
}
},
@@ -64,17 +64,17 @@
"type": "object",
"properties": {
"activeAddons": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/addon"
}
},
- "active Experiment": {
+ "activeExperiment": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"branch": {
"type": "string"
}
@@ -157,28 +157,31 @@
"architecturesInBinary": {
"type": "string"
},
"buildId": {
"type": "string",
"pattern": "^\\d{10}"
},
"hotfixVersion": {
- "type": "string"
+ "type": [
+ "string",
+ "null"
+ ]
},
"version": {
"type": "string",
- "pattern": "^\\d{2}\\."
+ "pattern": "^\\d+\\."
},
"vendor": {
"type": "string"
},
"platformVersion": {
"type": "string",
- "pattern": "^\\d{2}\\."
+ "pattern": "^\\d+\\."
},
"xpcomAbi": {
"type": "string"
}
},
"required": [
"applicationId",
"applicationName",
@@ -600,52 +603,64 @@
}
},
"additionalProperties": false
},
"gmPlugin": {
"type": "object",
"properties": {
"version": {
- "type": "string"
+ "type": [
+ "string",
+ "null"
+ ]
},
"userDisabled": {
"type": "boolean"
},
"applyBackgroundUpdates": {
"type": [
"integer",
"boolean"
]
}
}
},
"payload": {
"type": "object",
"properties": {
"addonDetails": {
- "type": "object",
+ "type": [
+ "object",
+ "null"
+ ],
"properties": {}
},
"addonHistograms": {
"type": "object",
"properties": {}
},
"childPayloads": {
"type": "array",
"items": {
"$ref": "#/definitions/payload"
}
},
"chromeHangs": {
- "type": "object",
+ "type": [
+ "object",
+ "null"
+ ],
"properties": {}
},
"fileIOReports": {
- "type": "object",
+ "type": [
+ "object",
+ "null"
+ ],
"properties": {
"xre": {
"type": "array",
"items": {
"type": "number"
},
"maxItems": 6
},
@@ -672,23 +687,27 @@
},
"asyncPluginInit": {
"type": "boolean"
},
"flashVersion": {
"type": "string"
},
"previousBuildId":{
- "$ref": "#/definitions/buildId"
+ "type": [
+ "string",
+ "null"
+ ],
+ "pattern": "^\\d{10}"
},
"previousSessionId": {
- "$ref": "#/definitions/UUID4"
+ "$ref": "#/definitions/UUID4OrNull"
},
"previousSubsessionId": {
- "$ref": "#/definitions/UUID4"
+ "$ref": "#/definitions/UUID4OrNull"
},
"profileSubsessionCounter": {
"type": "integer"
},
"reason": {
"type": "string"
},
"revision": {
@@ -726,78 +745,90 @@
"type": "object",
"additionalProperties": {
"additionalProperties": {
"$ref": "#/definitions/histogram"
}
}
},
"lateWrites": {
- "type": "object",
+ "type": [
+ "object",
+ "null"
+ ],
"properties": {}
},
"log": {
"type": [
"array",
- "object"
+ "null"
],
"items": {
"type": "array",
"items": [
{"type": "string"},
{"type": "integer"}
],
"additionalItems": true
}
},
"simpleMeasurements": {
"type": "object",
"properties": {}
},
"slowSQL": {
- "type": "object",
+ "type": [
+ "object",
+ "null"
+ ],
"properties": {
"mainThread": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/slowSQL"
}
},
"otherThreads": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/slowSQL"
}
}
}
},
"slowSQLStartup": {
- "type": "object",
+ "type": [
+ "object",
+ "null"
+ ],
"properties": {}
},
"threadHangStats": {
"type": [
"array",
- "object"
+ "null"
],
"items": {
"$ref": "#/definitions/threadHang"
}
},
"UIMeasurements": {
"type": [
"array",
- "object"
+ "null"
]
},
"ver": {
"type": "integer"
},
"webrtc": {
- "type": "object",
+ "type": [
+ "object",
+ "null"
+ ],
"properties": {
"IceCandidatesStats": {
"type": "object",
"properties": {
"webrtc": {
"type": "object"
},
"loop": {
@@ -905,11 +936,18 @@
"pluginIsWhitelistedForShumway": {
"type": "boolean"
}
}
},
"UUID4": {
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+ },
+ "UUID4OrNull": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment