Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@
"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}$",
"type": "string"
},
"rallyId": {
"description": "Bug 1677567 - Rally id reported by the core addon",
"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}$",
"type": "string"
},
"sample_id": {
"description": "Hashed version of client_id (if present) useful for partitioning; ranges from 0 to 99",
"type": "integer"
Expand Down
5 changes: 5 additions & 0 deletions schemas/metadata/pioneer-error/pioneer-error.1.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@
"description": "e.g. \"HTTP/1.1\"",
"type": "string"
},
"rallyId": {
"description": "Bug 1677567 - Rally id reported by the core addon",
"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}$",
"type": "string"
},
"remote_addr": {
"description": "Deprecated; will always be null",
"type": "string"
Expand Down
29 changes: 23 additions & 6 deletions schemas/metadata/pioneer-ingestion/pioneer-ingestion.1.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@
"$comment": "Added in bug 1636317; extends the metadata included in structured ingestion, accounting for additional fields in the Pioneer envelope.",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "http://jsonschema.net",
"oneOf": [
{
"required": [
"submission_timestamp",
"metadata",
"pioneerId",
"studyName"
]
},
{
"required": [
"submission_timestamp",
"metadata",
"rallyId",
"studyName"
]
}
],
"properties": {
"additional_properties": {
"description": "A JSON string containing any payload properties not present in the schema",
Expand Down Expand Up @@ -124,6 +142,11 @@
"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}$",
"type": "string"
},
"rallyId": {
"description": "Bug 1677567 - Rally id reported by the core addon",
"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}$",
"type": "string"
},
"sample_id": {
"description": "Hashed version of client_id (if present) useful for partitioning; ranges from 0 to 99",
"type": "integer"
Expand All @@ -141,11 +164,5 @@
"type": "string"
}
},
"required": [
"submission_timestamp",
"metadata",
"pioneerId",
"studyName"
],
"type": "object"
}
5 changes: 5 additions & 0 deletions templates/include/metadata/pioneerTopLevel.1.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
@COMMON_PATTERN_UUID_1_JSON@,
"type": "string"
},
"rallyId": {
"description": "Bug 1677567 - Rally id reported by the core addon",
@COMMON_PATTERN_UUID_1_JSON@,
"type": "string"
},
"studyName": {
"description": "Name of a particular study. Usually the addon_id.",
"maxLength": 100,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,22 @@
}
}
},
"required": [
"submission_timestamp",
"metadata",
"pioneerId",
"studyName"
"oneOf": [
{
"required": [
"submission_timestamp",
"metadata",
"pioneerId",
"studyName"
]
},
{
"required": [
"submission_timestamp",
"metadata",
"rallyId",
"studyName"
]
}
]
}
15 changes: 15 additions & 0 deletions validation/metadata/pioneer-ingestion.1.missing-id.fail.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"submission_timestamp": "2020-05-07T21:02:18.123456Z",
"metadata": {
"geo": {
"country": "CA"
},
"header": {
"x_debug_id": "mysession"
},
"user_agent": {}
},
"sample_id": 18,
"normalized_channel": "Other",
"studyName": "pioneer-v2-example@example.com"
}
16 changes: 16 additions & 0 deletions validation/metadata/pioneer-ingestion.1.rallyId.pass.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"submission_timestamp": "2020-05-07T21:02:18.123456Z",
"metadata": {
"geo": {
"country": "CA"
},
"header": {
"x_debug_id": "mysession"
},
"user_agent": {}
},
"sample_id": 18,
"normalized_channel": "Other",
"rallyId": "9af045aa-80ca-e743-92de-b31431abc547",
"studyName": "pioneer-v2-example@example.com"
}