Skip to content

Commit e3ab50a

Browse files
committed
update(links): Relax link schemas to support domain-level identifier
This change updates all link schemas (START, END, RELATION, and embedded variants) to allow references to either a CDEvent contextId, a domainId, or both. Previously, links could only reference event context IDs. This limited cross-system connectivity and encouraged embedding execution identifiers in customData purely for graph reconstruction. By allowing domainId alongside contextId: - Links can represent relationships between domain executions (e.g., pipelinerun) as well as individual events. - Connectivity metadata no longer needs to be embedded in event payloads. - Chain-first modeling constraints are relaxed, enabling relation-first graph modeling. - The change remains backward compatible. At least one of contextId or domainId is now required for link endpoints. AdditionalProperties are restricted to prevent schema drift. This preserves existing semantics while improving flexibility and reducing customData pollution. Signed-off-by: xibz <bjp@apple.com>
1 parent 4f893b2 commit e3ab50a

7 files changed

Lines changed: 40 additions & 0 deletions

File tree

schemas/links/embeddedlinkend.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
"contextId": {
1616
"type": "string",
1717
"minLength": 1
18+
},
19+
"domainId": {
20+
"type": "string",
21+
"format": "uri-reference"
1822
}
1923
},
2024
"required": [

schemas/links/embeddedlinkpath.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
"contextId": {
1616
"type": "string",
1717
"minLength": 1
18+
},
19+
"domainId": {
20+
"type": "string",
21+
"format": "uri-reference"
1822
}
1923
},
2024
"required": [

schemas/links/embeddedlinkrelation.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
"contextId": {
2020
"type": "string",
2121
"minLength": 1
22+
},
23+
"domainId": {
24+
"type": "string",
25+
"format": "uri-reference"
2226
}
2327
}
2428
},

schemas/links/linkend.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
"contextId": {
2626
"type": "string",
2727
"minLength": 1
28+
},
29+
"domainId": {
30+
"type": "string",
31+
"format": "uri-reference"
2832
}
2933
},
3034
"required": [
@@ -38,6 +42,10 @@
3842
"contextId": {
3943
"type": "string",
4044
"minLength": 1
45+
},
46+
"domainId": {
47+
"type": "string",
48+
"format": "uri-reference"
4149
}
4250
},
4351
"required": [

schemas/links/linkpath.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
"contextId": {
2323
"type": "string",
2424
"minLength": 1
25+
},
26+
"domainId": {
27+
"type": "string",
28+
"format": "uri-reference"
2529
}
2630
},
2731
"required": [
@@ -34,6 +38,10 @@
3438
"contextId": {
3539
"type": "string",
3640
"minLength": 1
41+
},
42+
"domainId": {
43+
"type": "string",
44+
"format": "uri-reference"
3745
}
3846
},
3947
"required": [

schemas/links/linkrelation.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
"contextId": {
2929
"type": "string",
3030
"minLength": 1
31+
},
32+
"domainId": {
33+
"type": "string",
34+
"format": "uri-reference"
3135
}
3236
},
3337
"required": [
@@ -41,6 +45,10 @@
4145
"contextId": {
4246
"type": "string",
4347
"minLength": 1
48+
},
49+
"domainId": {
50+
"type": "string",
51+
"format": "uri-reference"
4452
}
4553
},
4654
"required": [

schemas/links/linkstart.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
"contextId": {
2626
"type": "string",
2727
"minLength": 1
28+
},
29+
"domainId": {
30+
"type": "string",
31+
"format": "uri-reference"
2832
}
2933
},
3034
"required": [

0 commit comments

Comments
 (0)