Skip to content

Commit

Permalink
schema: Add "origin_url" field to every object
Browse files Browse the repository at this point in the history
Add an "origin_url" field to every schema object, pointing to the object
within, and served by, the origin CI system.

Fixes #93
  • Loading branch information
spbnick committed Jul 15, 2020
1 parent 8189aa6 commit 3eafd3d
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
16 changes: 16 additions & 0 deletions kcidb/db/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@

# Test environment fields
ENVIRONMENT_FIELDS = (
Field(
"origin_url", "STRING",
description="The URL of the environment in the origin CI system",
),
Field(
"description", "STRING",
description="Human-readable description of the environment",
Expand All @@ -36,6 +40,10 @@
description="The name of the CI system which submitted "
"the revision",
),
Field(
"origin_url", "STRING",
description="The URL of the revision in the origin CI system",
),
Field(
"tree_name", "STRING",
description="The widely-recognized name of the sub-tree (fork) "
Expand Down Expand Up @@ -128,6 +136,10 @@
description="The name of the CI system which submitted "
"the build",
),
Field(
"origin_url", "STRING",
description="The URL of the build in the origin CI system",
),
Field(
"description", "STRING",
description="Human-readable description of the build",
Expand Down Expand Up @@ -199,6 +211,10 @@
description="The name of the CI system which submitted "
"the test run",
),
Field(
"origin_url", "STRING",
description="The URL of the test run in the origin CI system",
),
Field(
"environment", "RECORD", fields=ENVIRONMENT_FIELDS,
description="The environment the test ran in. "
Expand Down
29 changes: 29 additions & 0 deletions kcidb/io/schema/v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@
"The name of the CI system which submitted the revision",
"pattern": f"^{ORIGIN_PATTERN}$",
},
"origin_url": {
"type": "string",
"format": "uri",
"description": "The URL of the revision in the origin CI system",
},
"tree_name": {
"type": "string",
"description":
Expand Down Expand Up @@ -265,6 +270,15 @@
"The name of the CI system which submitted the build",
"pattern": f"^{ORIGIN_PATTERN}$",
},
"origin_url": {
"type": "string",
"format": "uri",
"description": "The URL of the build in the origin CI system",
"examples": [
"https://kernelci.org/build/net-next/branch/master/"
"kernel/v5.8-rc4-1414-g4ff91fa0a3ac/",
],
},
"description": {
"type": "string",
"description":
Expand Down Expand Up @@ -389,6 +403,14 @@
"The name of the CI system which submitted the test run",
"pattern": f"^{ORIGIN_PATTERN}$",
},
"origin_url": {
"type": "string",
"format": "uri",
"description": "The URL of the test run in the origin CI system",
"examples": [
"https://kernelci.org/test/case/id/5f0e86fc459ceb8c2885bb39/",
],
},
"environment": {
"type": "object",
"description":
Expand All @@ -397,6 +419,13 @@
"amount of memory/storage/CPUs, for each host; "
"process environment variables, etc.",
"properties": {
"origin_url": {
"type": "string",
"format": "uri",
"description":
"The URL of the environment in the origin CI system",
"examples": ["https://kernelci.org/soc/allwinner/"],
},
"description": {
"type": "string",
"description":
Expand Down

0 comments on commit 3eafd3d

Please sign in to comment.