Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add domain id for links #269

Merged

Conversation

magnusbaeck
Copy link
Member

Applicable Issues

Fixes #233

Description of the Change

To make cross-domain links unambiguous and make it easier and more performant to locate the target events of such links we introduce a domainId member to the link object. This is a backwards-compatible change since the absence of the new member means that the target event can be assumed to exist in the same domain as the source event.

Since we're now using the domain term in another place apart from the description of meta.source.domainId in each event we centralize the definition in a new glossary term.

Alternate Designs

None. Adding the domain ID for links can't be done in that many different ways.

Benefits

Unambiguous cross-domain links, potentially resulting in quicker queries and/or simpler lookup implementations. Cross-domain links themselves have several other benefits like supporting exchanges across functional or organizational boundaries, including between companies.

Possible Drawbacks

None.

Sign-off

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.

Signed-off-by: Magnus Bäck <magnus.back@axis.com>

@magnusbaeck
Copy link
Member Author

This is a draft PR that only modifies a single event. Once you're happy with the commit I'll amend it with the equivalent changes applied to all other events.

Copy link
Contributor

@t-persson t-persson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it!

eiffel-syntax-and-usage/the-links-object.md Outdated Show resolved Hide resolved
t-persson
t-persson previously approved these changes Sep 10, 2021
@magnusbaeck
Copy link
Member Author

Okay, all files have been updated and this is ready for review. All changes have been scripted so and manually checked so I'm pretty sure things check out.

I ran my script to create new event versions and apply an ed(1) script to add the links.domainId member:

./update_schemas.py '*' add_domainid.ed 'Add links.domainId member.' > diff.sh

This produced a script file with the diff commands needed to diff the new schemas with the ones they were based on. It has changed the expected number of files:

$ ls schemas | wc -l
23
$ wc -l < diff.sh
23

While inspecting the diff I noticed a mis-edit caused by the bug reported in #271.

Here are the diff results:

+ diff -u schemas/EiffelTestExecutionRecipeCollectionCreatedEvent/4.0.0.json schemas/EiffelTestExecutionRecipeCollectionCreatedEvent/4.1.0.json
--- schemas/EiffelTestExecutionRecipeCollectionCreatedEvent/4.0.0.json	2020-12-09 09:59:14.000000000 +0100
+++ schemas/EiffelTestExecutionRecipeCollectionCreatedEvent/4.1.0.json	2021-09-17 13:41:38.458948617 +0200
@@ -15,8 +15,8 @@
         },
         "version": {
           "type": "string",
-          "enum": [ "4.0.0" ],
-          "default": "4.0.0"
+          "enum": [ "4.1.0" ],
+          "default": "4.1.0"
         },
         "time": {
           "type": "integer"
@@ -258,6 +258,9 @@
           },
           "target": {
             "type": "string"
+          },
+          "domainId": {
+            "type": "string"
           }
         },
         "required": [
+ diff -u schemas/EiffelTestSuiteFinishedEvent/3.1.0.json schemas/EiffelTestSuiteFinishedEvent/3.2.0.json
--- schemas/EiffelTestSuiteFinishedEvent/3.1.0.json	2021-09-16 15:57:16.268423214 +0200
+++ schemas/EiffelTestSuiteFinishedEvent/3.2.0.json	2021-09-17 13:14:39.856942995 +0200
@@ -15,8 +15,8 @@
         },
         "version": {
           "type": "string",
-          "enum": [ "3.1.0" ],
-          "default": "3.1.0"
+          "enum": [ "3.2.0" ],
+          "default": "3.2.0"
         },
         "time": {
           "type": "integer"
@@ -199,6 +199,9 @@
           "target": {
             "type": "string",
             "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
+          },
+          "domainId": {
+            "type": "string"
           }
         },
         "required": [
+ diff -u schemas/EiffelActivityCanceledEvent/3.0.0.json schemas/EiffelActivityCanceledEvent/3.1.0.json
--- schemas/EiffelActivityCanceledEvent/3.0.0.json	2020-12-09 09:59:14.000000000 +0100
+++ schemas/EiffelActivityCanceledEvent/3.1.0.json	2021-09-17 13:14:39.860942970 +0200
@@ -15,8 +15,8 @@
         },
         "version": {
           "type": "string",
-          "enum": [ "3.0.0" ],
-          "default": "3.0.0"
+          "enum": [ "3.1.0" ],
+          "default": "3.1.0"
         },
         "time": {
           "type": "integer"
@@ -147,6 +147,9 @@
           "target": {
             "type": "string",
             "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
+          },
+          "domainId": {
+            "type": "string"
           }
         },
         "required": [
+ diff -u schemas/EiffelSourceChangeSubmittedEvent/3.0.0.json schemas/EiffelSourceChangeSubmittedEvent/3.1.0.json
--- schemas/EiffelSourceChangeSubmittedEvent/3.0.0.json	2020-12-09 09:59:14.000000000 +0100
+++ schemas/EiffelSourceChangeSubmittedEvent/3.1.0.json	2021-09-17 13:14:39.872942898 +0200
@@ -15,8 +15,8 @@
         },
         "version": {
           "type": "string",
-          "enum": [ "3.0.0" ],
-          "default": "3.0.0"
+          "enum": [ "3.1.0" ],
+          "default": "3.1.0"
         },
         "time": {
           "type": "integer"
@@ -252,6 +252,9 @@
           "target": {
             "type": "string",
             "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
+          },
+          "domainId": {
+            "type": "string"
           }
         },
         "required": [
+ diff -u schemas/EiffelTestCaseFinishedEvent/3.1.0.json schemas/EiffelTestCaseFinishedEvent/3.2.0.json
--- schemas/EiffelTestCaseFinishedEvent/3.1.0.json	2021-09-16 15:57:16.268423214 +0200
+++ schemas/EiffelTestCaseFinishedEvent/3.2.0.json	2021-09-17 13:14:39.876942873 +0200
@@ -15,8 +15,8 @@
         },
         "version": {
           "type": "string",
-          "enum": [ "3.1.0" ],
-          "default": "3.1.0"
+          "enum": [ "3.2.0" ],
+          "default": "3.2.0"
         },
         "time": {
           "type": "integer"
@@ -224,6 +224,9 @@
           "target": {
             "type": "string",
             "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
+          },
+          "domainId": {
+            "type": "string"
           }
         },
         "required": [
+ diff -u schemas/EiffelActivityFinishedEvent/3.1.0.json schemas/EiffelActivityFinishedEvent/3.2.0.json
--- schemas/EiffelActivityFinishedEvent/3.1.0.json	2021-09-16 15:57:16.268423214 +0200
+++ schemas/EiffelActivityFinishedEvent/3.2.0.json	2021-09-17 13:14:39.876942873 +0200
@@ -15,8 +15,8 @@
         },
         "version": {
           "type": "string",
-          "enum": [ "3.1.0" ],
-          "default": "3.1.0"
+          "enum": [ "3.2.0" ],
+          "default": "3.2.0"
         },
         "time": {
           "type": "integer"
@@ -197,6 +197,9 @@
           "target": {
             "type": "string",
             "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
+          },
+          "domainId": {
+            "type": "string"
           }
         },
         "required": [
+ diff -u schemas/EiffelArtifactPublishedEvent/3.1.0.json schemas/EiffelArtifactPublishedEvent/3.2.0.json
--- schemas/EiffelArtifactPublishedEvent/3.1.0.json	2020-12-10 16:21:13.000000000 +0100
+++ schemas/EiffelArtifactPublishedEvent/3.2.0.json	2021-09-17 13:14:39.880942849 +0200
@@ -15,8 +15,8 @@
         },
         "version": {
           "type": "string",
-          "enum": [ "3.1.0" ],
-          "default": "3.1.0"
+          "enum": [ "3.2.0" ],
+          "default": "3.2.0"
         },
         "time": {
           "type": "integer"
@@ -175,6 +175,9 @@
           "target": {
             "type": "string",
             "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
+          },
+          "domainId": {
+            "type": "string"
           }
         },
         "required": [
+ diff -u schemas/EiffelAnnouncementPublishedEvent/3.0.0.json schemas/EiffelAnnouncementPublishedEvent/3.1.0.json
--- schemas/EiffelAnnouncementPublishedEvent/3.0.0.json	2020-12-09 09:59:14.000000000 +0100
+++ schemas/EiffelAnnouncementPublishedEvent/3.1.0.json	2021-09-17 13:14:39.884942824 +0200
@@ -15,8 +15,8 @@
         },
         "version": {
           "type": "string",
-          "enum": [ "3.0.0" ],
-          "default": "3.0.0"
+          "enum": [ "3.1.0" ],
+          "default": "3.1.0"
         },
         "time": {
           "type": "integer"
@@ -162,6 +162,9 @@
           "target": {
             "type": "string",
             "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
+          },
+          "domainId": {
+            "type": "string"
           }
         },
         "required": [
+ diff -u schemas/EiffelTestSuiteStartedEvent/3.1.0.json schemas/EiffelTestSuiteStartedEvent/3.2.0.json
--- schemas/EiffelTestSuiteStartedEvent/3.1.0.json	2021-09-16 15:57:16.268423214 +0200
+++ schemas/EiffelTestSuiteStartedEvent/3.2.0.json	2021-09-17 13:14:39.888942801 +0200
@@ -15,8 +15,8 @@
         },
         "version": {
           "type": "string",
-          "enum": [ "3.1.0" ],
-          "default": "3.1.0"
+          "enum": [ "3.2.0" ],
+          "default": "3.2.0"
         },
         "time": {
           "type": "integer"
@@ -209,6 +209,9 @@
           "target": {
             "type": "string",
             "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
+          },
+          "domainId": {
+            "type": "string"
           }
         },
         "required": [
+ diff -u schemas/EiffelArtifactCreatedEvent/3.0.0.json schemas/EiffelArtifactCreatedEvent/3.1.0.json
--- schemas/EiffelArtifactCreatedEvent/3.0.0.json	2020-12-09 09:59:14.000000000 +0100
+++ schemas/EiffelArtifactCreatedEvent/3.1.0.json	2021-09-17 13:14:39.892942776 +0200
@@ -15,8 +15,8 @@
         },
         "version": {
           "type": "string",
-          "enum": [ "3.0.0" ],
-          "default": "3.0.0"
+          "enum": [ "3.1.0" ],
+          "default": "3.1.0"
         },
         "time": {
           "type": "integer"
@@ -201,6 +201,9 @@
           "target": {
             "type": "string",
             "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
+          },
+          "domainId": {
+            "type": "string"
           }
         },
         "required": [
+ diff -u schemas/EiffelArtifactReusedEvent/3.0.0.json schemas/EiffelArtifactReusedEvent/3.1.0.json
--- schemas/EiffelArtifactReusedEvent/3.0.0.json	2020-12-09 09:59:14.000000000 +0100
+++ schemas/EiffelArtifactReusedEvent/3.1.0.json	2021-09-17 13:14:39.896942752 +0200
@@ -15,8 +15,8 @@
         },
         "version": {
           "type": "string",
-          "enum": [ "3.0.0" ],
-          "default": "3.0.0"
+          "enum": [ "3.1.0" ],
+          "default": "3.1.0"
         },
         "time": {
           "type": "integer"
@@ -144,6 +144,9 @@
           "target": {
             "type": "string",
             "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
+          },
+          "domainId": {
+            "type": "string"
           }
         },
         "required": [
+ diff -u schemas/EiffelTestCaseStartedEvent/3.1.0.json schemas/EiffelTestCaseStartedEvent/3.2.0.json
--- schemas/EiffelTestCaseStartedEvent/3.1.0.json	2021-09-16 15:57:16.268423214 +0200
+++ schemas/EiffelTestCaseStartedEvent/3.2.0.json	2021-09-17 13:14:39.904942703 +0200
@@ -15,8 +15,8 @@
         },
         "version": {
           "type": "string",
-          "enum": [ "3.1.0" ],
-          "default": "3.1.0"
+          "enum": [ "3.2.0" ],
+          "default": "3.2.0"
         },
         "time": {
           "type": "integer"
@@ -175,6 +175,9 @@
           "target": {
             "type": "string",
             "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
+          },
+          "domainId": {
+            "type": "string"
           }
         },
         "required": [
+ diff -u schemas/EiffelTestCaseTriggeredEvent/3.0.0.json schemas/EiffelTestCaseTriggeredEvent/3.1.0.json
--- schemas/EiffelTestCaseTriggeredEvent/3.0.0.json	2020-12-09 09:59:14.000000000 +0100
+++ schemas/EiffelTestCaseTriggeredEvent/3.1.0.json	2021-09-17 13:14:39.908942680 +0200
@@ -15,8 +15,8 @@
         },
         "version": {
           "type": "string",
-          "enum": [ "3.0.0" ],
-          "default": "3.0.0"
+          "enum": [ "3.1.0" ],
+          "default": "3.1.0"
         },
         "time": {
           "type": "integer"
@@ -225,6 +225,9 @@
           "target": {
             "type": "string",
             "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
+          },
+          "domainId": {
+            "type": "string"
           }
         },
         "required": [
+ diff -u schemas/EiffelSourceChangeCreatedEvent/4.0.0.json schemas/EiffelSourceChangeCreatedEvent/4.1.0.json
--- schemas/EiffelSourceChangeCreatedEvent/4.0.0.json	2020-12-09 09:59:14.000000000 +0100
+++ schemas/EiffelSourceChangeCreatedEvent/4.1.0.json	2021-09-17 13:14:39.912942655 +0200
@@ -15,8 +15,8 @@
         },
         "version": {
           "type": "string",
-          "enum": [ "4.0.0" ],
-          "default": "4.0.0"
+          "enum": [ "4.1.0" ],
+          "default": "4.1.0"
         },
         "time": {
           "type": "integer"
@@ -276,6 +276,9 @@
           "target": {
             "type": "string",
             "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
+          },
+          "domainId": {
+            "type": "string"
           }
         },
         "required": [
+ diff -u schemas/EiffelActivityStartedEvent/4.1.0.json schemas/EiffelActivityStartedEvent/4.2.0.json
--- schemas/EiffelActivityStartedEvent/4.1.0.json	2021-09-16 15:57:16.268423214 +0200
+++ schemas/EiffelActivityStartedEvent/4.2.0.json	2021-09-17 13:14:39.916942631 +0200
@@ -15,8 +15,8 @@
         },
         "version": {
           "type": "string",
-          "enum": [ "4.1.0" ],
-          "default": "4.1.0"
+          "enum": [ "4.2.0" ],
+          "default": "4.2.0"
         },
         "time": {
           "type": "integer"
@@ -175,6 +175,9 @@
           "target": {
             "type": "string",
             "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
+          },
+          "domainId": {
+            "type": "string"
           }
         },
         "required": [
+ diff -u schemas/EiffelActivityTriggeredEvent/4.0.0.json schemas/EiffelActivityTriggeredEvent/4.1.0.json
--- schemas/EiffelActivityTriggeredEvent/4.0.0.json	2020-12-09 09:59:14.000000000 +0100
+++ schemas/EiffelActivityTriggeredEvent/4.1.0.json	2021-09-17 13:14:39.920942606 +0200
@@ -15,8 +15,8 @@
         },
         "version": {
           "type": "string",
-          "enum": [ "4.0.0" ],
-          "default": "4.0.0"
+          "enum": [ "4.1.0" ],
+          "default": "4.1.0"
         },
         "time": {
           "type": "integer"
@@ -190,6 +190,9 @@
           "target": {
             "type": "string",
             "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
+          },
+          "domainId": {
+            "type": "string"
           }
         },
         "required": [
+ diff -u schemas/EiffelFlowContextDefinedEvent/3.0.0.json schemas/EiffelFlowContextDefinedEvent/3.1.0.json
--- schemas/EiffelFlowContextDefinedEvent/3.0.0.json	2020-12-09 09:59:14.000000000 +0100
+++ schemas/EiffelFlowContextDefinedEvent/3.1.0.json	2021-09-17 13:14:39.920942606 +0200
@@ -15,8 +15,8 @@
         },
         "version": {
           "type": "string",
-          "enum": [ "3.0.0" ],
-          "default": "3.0.0"
+          "enum": [ "3.1.0" ],
+          "default": "3.1.0"
         },
         "time": {
           "type": "integer"
@@ -159,6 +159,9 @@
           "target": {
             "type": "string",
             "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
+          },
+          "domainId": {
+            "type": "string"
           }
         },
         "required": [
+ diff -u schemas/EiffelIssueDefinedEvent/3.0.0.json schemas/EiffelIssueDefinedEvent/3.1.0.json
--- schemas/EiffelIssueDefinedEvent/3.0.0.json	2020-12-09 09:59:14.000000000 +0100
+++ schemas/EiffelIssueDefinedEvent/3.1.0.json	2021-09-17 13:14:39.924942583 +0200
@@ -15,8 +15,8 @@
         },
         "version": {
           "type": "string",
-          "enum": [ "3.0.0" ],
-          "default": "3.0.0"
+          "enum": [ "3.1.0" ],
+          "default": "3.1.0"
         },
         "time": {
           "type": "integer"
@@ -173,6 +173,9 @@
           "target": {
             "type": "string",
             "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
+          },
+          "domainId": {
+            "type": "string"
           }
         },
         "required": [
+ diff -u schemas/EiffelIssueVerifiedEvent/4.0.0.json schemas/EiffelIssueVerifiedEvent/4.1.0.json
--- schemas/EiffelIssueVerifiedEvent/4.0.0.json	2021-09-17 11:48:20.090239622 +0200
+++ schemas/EiffelIssueVerifiedEvent/4.1.0.json	2021-09-17 13:14:39.928942558 +0200
@@ -15,8 +15,8 @@
         },
         "version": {
           "type": "string",
-          "enum": [ "4.0.0" ],
-          "default": "4.0.0"
+          "enum": [ "4.1.0" ],
+          "default": "4.1.0"
         },
         "time": {
           "type": "integer"
@@ -144,6 +144,9 @@
           "target": {
             "type": "string",
             "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
+          },
+          "domainId": {
+            "type": "string"
           }
         },
         "required": [
+ diff -u schemas/EiffelTestCaseCanceledEvent/3.0.0.json schemas/EiffelTestCaseCanceledEvent/3.1.0.json
--- schemas/EiffelTestCaseCanceledEvent/3.0.0.json	2020-12-09 09:59:14.000000000 +0100
+++ schemas/EiffelTestCaseCanceledEvent/3.1.0.json	2021-09-17 13:14:39.936942509 +0200
@@ -15,8 +15,8 @@
         },
         "version": {
           "type": "string",
-          "enum": [ "3.0.0" ],
-          "default": "3.0.0"
+          "enum": [ "3.1.0" ],
+          "default": "3.1.0"
         },
         "time": {
           "type": "integer"
@@ -147,6 +147,9 @@
           "target": {
             "type": "string",
             "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
+          },
+          "domainId": {
+            "type": "string"
           }
         },
         "required": [
+ diff -u schemas/EiffelConfidenceLevelModifiedEvent/3.0.0.json schemas/EiffelConfidenceLevelModifiedEvent/3.1.0.json
--- schemas/EiffelConfidenceLevelModifiedEvent/3.0.0.json	2020-12-09 09:59:14.000000000 +0100
+++ schemas/EiffelConfidenceLevelModifiedEvent/3.1.0.json	2021-09-17 13:14:39.940942485 +0200
@@ -15,8 +15,8 @@
         },
         "version": {
           "type": "string",
-          "enum": [ "3.0.0" ],
-          "default": "3.0.0"
+          "enum": [ "3.1.0" ],
+          "default": "3.1.0"
         },
         "time": {
           "type": "integer"
@@ -173,6 +173,9 @@
           "target": {
             "type": "string",
             "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
+          },
+          "domainId": {
+            "type": "string"
           }
         },
         "required": [
+ diff -u schemas/EiffelCompositionDefinedEvent/3.1.0.json schemas/EiffelCompositionDefinedEvent/3.2.0.json
--- schemas/EiffelCompositionDefinedEvent/3.1.0.json	2020-12-09 09:59:14.000000000 +0100
+++ schemas/EiffelCompositionDefinedEvent/3.2.0.json	2021-09-17 13:14:39.940942485 +0200
@@ -15,8 +15,8 @@
         },
         "version": {
           "type": "string",
-          "enum": [ "3.1.0" ],
-          "default": "3.1.0"
+          "enum": [ "3.2.0" ],
+          "default": "3.2.0"
         },
         "time": {
           "type": "integer"
@@ -153,6 +153,9 @@
           "target": {
             "type": "string",
             "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
+          },
+          "domainId": {
+            "type": "string"
           }
         },
         "required": [
+ diff -u schemas/EiffelEnvironmentDefinedEvent/3.1.0.json schemas/EiffelEnvironmentDefinedEvent/3.2.0.json
--- schemas/EiffelEnvironmentDefinedEvent/3.1.0.json	2021-09-16 15:57:16.268423214 +0200
+++ schemas/EiffelEnvironmentDefinedEvent/3.2.0.json	2021-09-17 13:14:39.944942460 +0200
@@ -15,8 +15,8 @@
         },
         "version": {
           "type": "string",
-          "enum": [ "3.1.0" ],
-          "default": "3.1.0"
+          "enum": [ "3.2.0" ],
+          "default": "3.2.0"
         },
         "time": {
           "type": "integer"
@@ -175,6 +175,9 @@
           "target": {
             "type": "string",
             "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
+          },
+          "domainId": {
+            "type": "string"
           }
         },
         "required": [

@magnusbaeck
Copy link
Member Author

Sorry for the extra force push, but I noticed I had left out the issue link the changelog of each event (see diff).

Copy link
Member

@e-backmark-ericsson e-backmark-ericsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small clarification/addition needed before approving this :)


- a type,
- a UUID corresponding to the __meta.id__ of the target event, on string format, and
- optionally the id of the [domain](glossary.md#domain) where the target event was published (i.e. its __meta.source.domainId__ member). The absence of a domain id means that the target event is in the same domain as the current event.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- optionally the id of the [domain](glossary.md#domain) where the target event was published (i.e. its __meta.source.domainId__ member). The absence of a domain id means that the target event is in the same domain as the current event.
- optionally the id of the [domain](glossary.md#domain) where the target event was published (i.e. its __meta.source.domainId__ member). The absence of a domain id means that the target event was sent, or can at least be retrieved, in the same domain as the current event.

To make cross-domain links unambiguous and make it easier and more
performant to locate the target events of such links we introduce a
domainId member to the link object. This is a backwards-compatible
change since the absence of the new member means that the target
event can be assumed to exist in the same domain as the source event.

Since we're now using the domain term in another place apart from the
description of meta.source.domainId in each event we centralize the
definition in a new glossary term.
@magnusbaeck
Copy link
Member Author

magnusbaeck commented Sep 20, 2021

Fixed both issues but with a slight change in wording to address Emil's comment. Currently only have GitHub access from my phone, but see my previous comment for a URL that makes it easy to diff two commits when a forced push has taken place.

@magnusbaeck
Copy link
Member Author

Thanks! Could either of you merge the PR as well? Technically I could do it myself as an org admin but it's better if a maintainer does it.

@e-backmark-ericsson e-backmark-ericsson merged commit f5f82c7 into eiffel-community:master Sep 20, 2021
@magnusbaeck magnusbaeck deleted the link-domain branch September 20, 2021 14:10
e-backmark-ericsson pushed a commit to e-backmark-ericsson/eiffel that referenced this pull request Apr 13, 2022
To make cross-domain links unambiguous and make it easier and more
performant to locate the target events of such links we introduce a
domainId member to the link object. This is a backwards-compatible
change since the absence of the new member means that the target
event can be assumed to exist in the same domain as the source event.

Since we're now using the domain term in another place apart from the
description of meta.source.domainId in each event we centralize the
definition in a new glossary term.
@magnusbaeck magnusbaeck added the protocol All protocol changes label Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
protocol All protocol changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Link Object with SourceDomain
4 participants