Skip to content

Commit

Permalink
meta.domainId -> meta.source.domainId (#36)
Browse files Browse the repository at this point in the history
* Fix #35: meta.domainId -> meta.source.domainId

* meta.domainId -> meta.source.domainId
* make source a required field
* extended description for domainId

Signed-off-by: Andrey Devyatkin <andrey.a.devyatkin@gmail.com>

* Update examples to reflect domainId change

Signed-off-by: Andrey Devyatkin <andrey.a.devyatkin@gmail.com>

* Update schemas to fix validation

Signed-off-by: Andrey Devyatkin <andrey.a.devyatkin@gmail.com>

* Updated according review comments

Signed-off-by: Andrey Devyatkin <andrey.a.devyatkin@gmail.com>
  • Loading branch information
Andrey Devyatkin authored and d-stahl-ericsson committed Aug 10, 2016
1 parent d6a1f82 commit 70751bd
Show file tree
Hide file tree
Showing 13 changed files with 277 additions and 127 deletions.
14 changes: 7 additions & 7 deletions eiffel-syntax-and-usage/the-meta-object.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
The __meta__ object contains meta-information describing the event: when it was created, where it came from, its type et cetera. The __meta__ object contains the same members regardless of __meta.type__<sup>[1](#footnote1)</sup>, with the caveat that certain members are optional and the tendency to use them may vary with event type.

## Meta Members
### meta.domainId
__Type:__ String
__Format:__ Free text
__Required:__ Yes
__Description:__ Identifies the domain in which the event was produced. A domain is an infrastructure topological concept, which may or may not correspond to organization or product structures.

### meta.id
__Type:__ String
__Format:__ [UUID](http://tools.ietf.org/html/rfc4122)
Expand Down Expand Up @@ -41,9 +35,15 @@ __Description:__ Any tags or keywords associated with the events, for searchabil
### meta.source
__Type:__ Object
__Format:__
__Required:__ No
__Required:__ Yes
__Description:__ A description of the event sender. Primarily for traceability purposes.

#### meta.source.domainId
__Type:__ String
__Format:__ Free text
__Required:__ Yes
__Description:__ Identifies the domain that produced an event. A domain is an infrastructure topological concept, which may or may not corresponds to an organization or product structures. A good example would be Java packages notation, ex. com.mycompany.product.component or mycompany.site.division. Also, keep in mind that all names are more or less prone to change. Particularly, it is recommended to avoid organizational names or site names, as organizations tend to be volatile and development is easily relocated. Relatively speaking, product and component names tend to be more stable and are therefore encouraged, while code names may be an option. You need to decide what is the most sensible option in your case.

#### meta.source.host
__Type:__ String
__Format:__ Hostname
Expand Down
6 changes: 4 additions & 2 deletions examples/events/EiffelActivityCanceledEvent/simple.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
"type": "EiffelActivityCanceledEvent",
"version": "1.0",
"time": 1234567890,
"domainId": "example.domain",
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee0"
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee0",
"source": {
"domainId": "example.domain"
}
},
"data": {
"reason": "Made irrelevant by newly scheduled execution."
Expand Down
6 changes: 4 additions & 2 deletions examples/events/EiffelActivityFinishedEvent/simple.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
"type": "EiffelActivityFinishedEvent",
"version": "1.0",
"time": 1234567890,
"domainId": "example.domain",
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee0"
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee0",
"source": {
"domainId": "example.domain"
}
},
"data": {
"outcome": {
Expand Down
6 changes: 4 additions & 2 deletions examples/events/EiffelActivityStartedEvent/simple.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
"type": "EiffelActivityStartedEvent",
"version": "1.0",
"time": 1234567890,
"domainId": "example.domain",
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee0"
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee0",
"source": {
"domainId": "example.domain"
}
},
"data": {
"executionUri": "https://my.jenkins.host/myJob/43",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"meta": {
"domainId": "domainId-test",
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee0",
"type": "EiffelActivityTriggeredEvent",
"version": "1.0",
"time": 1234567890
"time": 1234567890,
"source": {
"domainId": "test-domainId"
}
},
"data": {
"name": "Component X Build",
Expand Down
8 changes: 5 additions & 3 deletions examples/events/EiffelActivityTriggeredEvent/simple.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"meta": {
"domainId": "domainId-test",
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee0",
"id": "e1e93f13-7c3c-4f17-9753-ebf0c86ff1c2",
"type": "EiffelActivityTriggeredEvent",
"version": "1.0",
"time": 1234567890
"time": 1234567890,
"source": {
"domainId": "example.domain"
}
},
"data": {
"name": "Component X Build",
Expand Down
6 changes: 4 additions & 2 deletions examples/events/EiffelArtifactCreatedEvent/simple.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
"type": "EiffelArtifactCreatedEvent",
"version": "1.0",
"time": 1234567890,
"domainId": "example.domain",
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee0"
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee0",
"source": {
"domainId": "example.domain"
}
},
"data": {
"gav": {
Expand Down
6 changes: 4 additions & 2 deletions examples/events/EiffelArtifactPublishedEvent/simple.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
"type": "EiffelArtifactPublishedEvent",
"version": "1.0",
"time": 1234567890,
"domainId": "example.domain",
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee0"
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee0",
"source": {
"domainId": "example.domain"
}
},
"data": {
"locations": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
"type": "EiffelConfidenceLevelModifiedEvent",
"version": "1.0",
"time": 1234567890,
"domainId": "example.domain",
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee0"
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee0",
"source": {
"domainId": "example.domain"
}
},
"data": {
"name": "stable",
Expand Down
78 changes: 52 additions & 26 deletions examples/flows/build-avoidance/events.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
"type": "EiffelSourceChangeSubmittedEvent",
"version": "1.0",
"time": 1000,
"domainId": "example.domain",
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee0"
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee0",
"source": {
"domainId": "example.domain"
}
},
"data": {
"placeholder": "The syntax of this event has not yet been defined."
Expand All @@ -18,8 +20,10 @@
"type": "EiffelSourceChangeSubmittedEvent",
"version": "1.0",
"time": 101000,
"domainId": "example.domain",
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee1"
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee1",
"source": {
"domainId": "example.domain"
}
},
"data": {
"placeholder": "The syntax of this event has not yet been defined."
Expand All @@ -36,8 +40,10 @@
"type": "EiffelCompositionDefinedEvent",
"version": "1.0",
"time": 2000,
"domainId": "example.domain",
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee2"
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee2",
"source": {
"domainId": "example.domain"
}
},
"data": {
"placeholder": "The syntax of this event has not yet been defined."
Expand All @@ -54,8 +60,10 @@
"type": "EiffelCompositionDefinedEvent",
"version": "1.0",
"time": 102000,
"domainId": "example.domain",
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee3"
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee3",
"source": {
"domainId": "example.domain"
}
},
"data": {
"placeholder": "The syntax of this event has not yet been defined."
Expand All @@ -76,8 +84,10 @@
"type": "EiffelArtifactCreatedEvent",
"version": "1.0",
"time": 3000,
"domainId": "example.domain",
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee4"
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee4",
"source": {
"domainId": "example.domain"
}
},
"data": {
"gav": {
Expand Down Expand Up @@ -105,8 +115,10 @@
"type": "EiffelArtifactCreatedEvent",
"version": "1.0",
"time": 4000,
"domainId": "example.domain",
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee5"
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee5",
"source": {
"domainId": "example.domain"
}
},
"data": {
"gav": {
Expand Down Expand Up @@ -134,8 +146,10 @@
"type": "EiffelArtifactCreatedEvent",
"version": "1.0",
"time": 5000,
"domainId": "example.domain",
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee6"
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee6",
"source": {
"domainId": "example.domain"
}
},
"data": {
"gav": {
Expand Down Expand Up @@ -163,8 +177,10 @@
"type": "EiffelArtifactCreatedEvent",
"version": "1.0",
"time": 6000,
"domainId": "example.domain",
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee7"
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee7",
"source": {
"domainId": "example.domain"
}
},
"data": {
"gav": {
Expand Down Expand Up @@ -192,8 +208,10 @@
"type": "EiffelArtifactCreatedEvent",
"version": "1.0",
"time": 7000,
"domainId": "example.domain",
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee8"
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee8",
"source": {
"domainId": "example.domain"
}
},
"data": {
"gav": {
Expand Down Expand Up @@ -221,8 +239,10 @@
"type": "EiffelArtifactCreatedEvent",
"version": "1.0",
"time": 103000,
"domainId": "example.domain",
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee9"
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee9",
"source": {
"domainId": "example.domain"
}
},
"data": {
"gav": {
Expand Down Expand Up @@ -254,8 +274,10 @@
"type": "EiffelArtifactCreatedEvent",
"version": "1.0",
"time": 104000,
"domainId": "example.domain",
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeee10"
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeee10",
"source": {
"domainId": "example.domain"
}
},
"data": {
"gav": {
Expand Down Expand Up @@ -287,8 +309,10 @@
"type": "EiffelCompositionDefinedEvent",
"version": "1.0",
"time": 8000,
"domainId": "example.domain",
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeee11"
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeee11",
"source": {
"domainId": "example.domain"
}
},
"data": {
"placeholder": "The syntax of this event has not yet been defined."
Expand Down Expand Up @@ -321,8 +345,10 @@
"type": "EiffelCompositionDefinedEvent",
"version": "1.0",
"time": 105000,
"domainId": "example.domain",
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeee12"
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeee12",
"source": {
"domainId": "example.domain"
}
},
"data": {
"placeholder": "The syntax of this event has not yet been defined."
Expand Down

0 comments on commit 70751bd

Please sign in to comment.