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
Add domain id for links #269
Conversation
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. |
68e01e1
to
7e2c3a7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it!
7e2c3a7
to
e72ee92
Compare
f91de19
f91de19
to
660c3d6
Compare
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:
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:
While inspecting the diff I noticed a mis-edit caused by the bug reported in #271. Here are the diff results:
|
660c3d6
to
7fa6dc3
Compare
Sorry for the extra force push, but I noticed I had left out the issue link the changelog of each event (see diff). |
There was a problem hiding this 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 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.
7fa6dc3
to
80e98ab
Compare
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. |
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. |
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.
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>