Skip to content

Commit e215f9a

Browse files
committed
Add patch version for events
Based on the discussion on the PR and slack, adding the patch version for events as well. Signed-off-by: Andrea Frittoli <[email protected]>
1 parent 0670593 commit e215f9a

File tree

4 files changed

+64
-54
lines changed

4 files changed

+64
-54
lines changed

continuous-integration-pipeline-events.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ An `artifact` is usually produced as output of a build process. Events need to b
7272

7373
This event represents a Build task that has been queued; this build process usually is in charge of producing a binary from source code.
7474

75-
- Event Type: __`dev.cdevents.build.queued.0.1-draft`__
75+
- Event Type: __`dev.cdevents.build.queued.0.1.0-draft`__
7676
- Predicate: queued
7777
- Subject: [`build`](#build)
7878

@@ -87,7 +87,7 @@ This event represents a Build task that has been queued; this build process usua
8787

8888
This event represents a Build task that has been started; this build process usually is in charge of producing a binary from source code.
8989

90-
- Event Type: __`dev.cdevents.build.started.0.1-draft`__
90+
- Event Type: __`dev.cdevents.build.started.0.1.0-draft`__
9191
- Predicate: started
9292
- Subject: [`build`](#build)
9393

@@ -102,7 +102,7 @@ This event represents a Build task that has been started; this build process usu
102102

103103
This event represents a Build task that has finished. This event will eventually contain the finished status, success, error or failure
104104

105-
- Event Type: __`dev.cdevents.build.finished.0.1-draft`__
105+
- Event Type: __`dev.cdevents.build.finished.0.1.0-draft`__
106106
- Predicate: finished
107107
- Subject: [`build`](#build)
108108

@@ -118,7 +118,7 @@ This event represents a Build task that has finished. This event will eventually
118118

119119
This event represents a Test task that has been queued, and it is waiting to be started.
120120

121-
- Event Type: __`dev.cdevents.testcase.queued.0.1-draft`__
121+
- Event Type: __`dev.cdevents.testcase.queued.0.1.0-draft`__
122122
- Predicate: queued
123123
- Subject: [`testCase`](#testcase)
124124

@@ -133,7 +133,7 @@ This event represents a Test task that has been queued, and it is waiting to be
133133

134134
This event represents a Test task that has started.
135135

136-
- Event Type: __`dev.cdevents.testcase.started.0.1-draft`__
136+
- Event Type: __`dev.cdevents.testcase.started.0.1.0-draft`__
137137
- Predicate: started
138138
- Subject: [`testCase`](#testcase)
139139

@@ -148,7 +148,7 @@ This event represents a Test task that has started.
148148

149149
This event represents a Test task that has finished. This event will eventually contain the finished status: success, error or failure.
150150

151-
- Event Type: __`dev.cdevents.testcase.finished.0.1-draft`__
151+
- Event Type: __`dev.cdevents.testcase.finished.0.1.0-draft`__
152152
- Predicate: finished
153153
- Subject: [`testCase`](#testcase)
154154

@@ -163,7 +163,7 @@ This event represents a Test task that has finished. This event will eventually
163163

164164
This event represents a Test suite that has been started.
165165

166-
- Event Type: __`dev.cdevents.testsuite.started.0.1-draft`__
166+
- Event Type: __`dev.cdevents.testsuite.started.0.1.0-draft`__
167167
- Predicate: started
168168
- Subject: [`testSuite`](#testsuite)
169169

@@ -178,7 +178,7 @@ This event represents a Test suite that has been started.
178178

179179
This event represents a Test suite that has has finished, the event will contain the finished status: success, error or failure.
180180

181-
- Event Type: __`dev.cdevents.testsuite.finished.0.1-draft`__
181+
- Event Type: __`dev.cdevents.testsuite.finished.0.1.0-draft`__
182182
- Predicate: finished
183183
- Subject: [`testSuite`](#testsuite)
184184

@@ -193,7 +193,7 @@ This event represents a Test suite that has has finished, the event will contain
193193

194194
The event represents an artifact that has been packaged for distribution; this artifact is now versioned with a fixed version.
195195

196-
- Event Type: __`dev.cdevents.artifact.packaged.0.1-draft`__
196+
- Event Type: __`dev.cdevents.artifact.packaged.0.1.0-draft`__
197197
- Predicate: packaged
198198
- Subject: [`artifact`](#artifact)
199199

@@ -206,7 +206,7 @@ The event represents an artifact that has been packaged for distribution; this a
206206

207207
The event represents an artifact that has been published and it can be advertised for others to use.
208208

209-
- Event Type: __`dev.cdevents.artifact.published.0.1-draft`__
209+
- Event Type: __`dev.cdevents.artifact.published.0.1.0-draft`__
210210
- Predicate: published
211211
- Subject: [`artifact`](#artifact)
212212

core.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Due the dynamic nature of Pipelines, most of actual work needs to be queued to
6666
happen in a distributed way, hence queued events are added. Adopters can choose
6767
to ignore these events if they don't apply to their use cases.
6868

69-
- Event Type: __`dev.cdevents.pipelinerun.queued.0.1-draft`__
69+
- Event Type: __`dev.cdevents.pipelinerun.queued.0.1.0-draft`__
7070
- Predicate: queued
7171
- Subject: [`pipelineRun`](#pipelinerun)
7272

@@ -81,7 +81,7 @@ to ignore these events if they don't apply to their use cases.
8181

8282
A pipelineRun has started and it is running.
8383

84-
- Event Type: __`dev.cdevents.pipelinerun.started.0.1-draft`__
84+
- Event Type: __`dev.cdevents.pipelinerun.started.0.1.0-draft`__
8585
- Predicate: started
8686
- Subject: [`pipelineRun`](#pipelinerun)
8787

@@ -96,7 +96,7 @@ A pipelineRun has started and it is running.
9696

9797
A pipelineRun has finished, successfully or not.
9898

99-
- Event Type: __`dev.cdevents.pipelinerun.finished.0.1-draft`__
99+
- Event Type: __`dev.cdevents.pipelinerun.finished.0.1.0-draft`__
100100
- Predicate: finished
101101
- Subject: [`pipelineRun`](#pipelinerun)
102102

@@ -113,7 +113,7 @@ A pipelineRun has finished, successfully or not.
113113

114114
A taskRun has started and it is running.
115115

116-
- Event Type: __`dev.cdevents.taskrun.started.0.1-draft`__
116+
- Event Type: __`dev.cdevents.taskrun.started.0.1.0-draft`__
117117
- Predicate: started
118118
- Subject: [`taskRun`](#taskrun)
119119

@@ -129,7 +129,7 @@ A taskRun has started and it is running.
129129

130130
A taskRun has finished, successfully or not.
131131

132-
- Event Type: __`dev.cdevents.taskrun.finished.0.1-draft`__
132+
- Event Type: __`dev.cdevents.taskrun.finished.0.1.0-draft`__
133133
- Predicate: finished
134134
- Subject: [`taskRun`](#taskrun)
135135

primer.md

Lines changed: 39 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -100,52 +100,62 @@ extensions](https://github.com/cloudevents/spec/blob/v1.0.1/documented-extension
100100

101101
## Versioning
102102

103-
The CDEvents specification and events are versioned independently, both following the
104-
principle of semantic versioning.
103+
The CDEvents specification and events are versioned independently, both
104+
following the principle of semantic versioning.
105105

106106
### Versioning of CDEvents
107107

108-
Individual CDEvents are versioned using semantic versioning, with a `major.minor`
109-
format of the version.
108+
Individual CDEvents are versioned using semantic versioning, with a
109+
`major.minor.patch` format of the version.
110110

111-
- Backward compatible changes to events are identified by a change in the minor
112-
version of the event, for instance 0.1 -> 0.2. This means that an unmodified
113-
consumer can parse a more recent minor version of an event, as long as it ignores
114-
extra fields. Fields introduced in the new minor version will be ignored, but
115-
everything else will work as before.
111+
Backward compatible changes are changes that allow existing consumers to parse
112+
messages with a newer version, have access to the same data as before, as long
113+
the extra fields are ignored. Broadening the accepted values for a property is a
114+
backward incompatible change, as the consumer may not be prepared to manage the
115+
new format of value.
116116

117-
- Backward incompatible changes to events are identified by a change in the major
118-
version of the event, for instance 0.3 -> 1.0. Moved or removed fields will
119-
require a new major version.
117+
Note that this means that consumers SHOULD be prepared to handle (and disregard)
118+
unrecognized properties in higher minor versions than they are familiar with.
120119

121-
while the specification of an event is work in progress, its version is tagged with
122-
an extra `-draft` at the end.
120+
- Major versions (e.g. 0.3.1 -> 1.0.0): backward incompatible changes to events.
121+
Renamed, moved or removed fields requires a new major version.
123122

124-
The version of an event is included in its type. This allows for easy filtering of
125-
events of a specific version, by looking at a single field in the context. Examples
126-
of full event versions are:
123+
- Minor versions (e.g. 0.1.2 -> 0.2.0): backward compatible changes to events
124+
that involve a structural change in the schema. A new field is added, a copy
125+
of an existing field is added and the old location deprecated, or a new
127126

128-
- `dev.cdevents.build.queued.0.1-draft`
129-
- `dev.cdevents.environment.deleted.0.1`
127+
- Patch versions (e.g. 0.1.0 -> 0.1.1): backward compatible changes to events
128+
that do not involve any structural change in the schema, for instance
129+
narrowing the accepted values for a property
130+
131+
While the specification of an event is work in progress, its version is tagged
132+
with an extra `-draft` at the end.
133+
134+
The version of an event is included in its type. This allows for easy filtering
135+
of events of a specific version, by looking at a single field in the context.
136+
Examples of full event versions are:
137+
138+
- `dev.cdevents.build.queued.0.1.0-draft`
139+
- `dev.cdevents.environment.deleted.0.1.0`
130140

131141
### Versioning of the CDEvents specification
132142

133-
The overall CDEvents specification is versioned using semantic versioning, with a
134-
`major.minor.patch` format of the version. The specification version is associated
135-
to a git version (tag) in the `cdevents/spec` repository, in the format
136-
`vMajor.Minor.Patch`.
143+
The overall CDEvents specification is versioned using semantic versioning, with
144+
a `major.minor.patch` format of the version. The specification version is
145+
associated to a git version (tag) in the `cdevents/spec` repository, in the
146+
format `vMajor.Minor.Patch`.
137147

138-
- A specification that includes only cosmetic fixes is identified by a change in the
139-
patch version, for instance 0.1.0 -> 0.1.1
148+
- A specification that includes only cosmetic fixes is identified by a change in
149+
the patch version, for instance 0.1.0 -> 0.1.1
140150

141-
- A specification that includes only backwards compatible change is identified by
142-
a change in the minor version, for instance 0.1.3 -> 0.2.0
151+
- A specification that includes only backwards compatible change is identified
152+
by a change in the minor version, for instance 0.1.3 -> 0.2.0
143153

144154
- A specification that includes at least one backward incompatible change, is
145155
identified by a change in the major version, for instance 0.1.2 -> 2.0.0
146156

147-
While a version of the specification is work in progress, its version is tagged with
148-
an extra `-draft` at the end, for instance 0.1.0-draft.
157+
While a version of the specification is work in progress, its version is tagged
158+
with an extra `-draft` at the end, for instance 0.1.0-draft.
149159

150160
### Development of a new version
151161

source-code-version-control.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ A `change` identifies a proposed set of changes to the content of a `repository`
6161

6262
A new Source Code Repository was created to host source code for a project.
6363

64-
- Event Type: __`dev.cdevents.repository.created.0.1-draft`__
64+
- Event Type: __`dev.cdevents.repository.created.0.1.0-draft`__
6565
- Predicate: created
6666
- Subject: [`repository`](#repository)
6767

@@ -78,7 +78,7 @@ A new Source Code Repository was created to host source code for a project.
7878

7979
A Source Code Repository modified some of its attributes, like location, or owner.
8080

81-
- Event Type: __`dev.cdevents.repository.modified.0.1-draft`__
81+
- Event Type: __`dev.cdevents.repository.modified.0.1.0-draft`__
8282
- Predicate: modified
8383
- Subject: [`repository`](#repository)
8484

@@ -93,7 +93,7 @@ A Source Code Repository modified some of its attributes, like location, or owne
9393

9494
### `repository deleted`
9595

96-
- Event Type: __`dev.cdevents.repository.deleted.0.1-draft`__
96+
- Event Type: __`dev.cdevents.repository.deleted.0.1.0-draft`__
9797
- Predicate: modified
9898
- Subject: [`repository`](#repository)
9999

@@ -110,7 +110,7 @@ A Source Code Repository modified some of its attributes, like location, or owne
110110

111111
A branch inside the Repository was created.
112112

113-
- Event Type: __`dev.cdevents.branch.created.0.1-draft`__
113+
- Event Type: __`dev.cdevents.branch.created.0.1.0-draft`__
114114
- Predicate: created
115115
- Subject: [`branch`](#branch)
116116

@@ -125,7 +125,7 @@ A branch inside the Repository was created.
125125

126126
A branch inside the Repository was deleted.
127127

128-
- Event Type: __`dev.cdevents.branch.deleted.0.1-draft`__
128+
- Event Type: __`dev.cdevents.branch.deleted.0.1.0-draft`__
129129
- Predicate: deleted
130130
- Subject: [`branch`](#branch)
131131

@@ -140,7 +140,7 @@ A branch inside the Repository was deleted.
140140

141141
A source code change was created and submitted to a repository specific branch. Examples: PullRequest sent to Github, MergeRequest sent to Gitlab, Change created in Gerrit.
142142

143-
- Event Type: __`dev.cdevents.change.created.0.1-draft`__
143+
- Event Type: __`dev.cdevents.change.created.0.1.0-draft`__
144144
- Predicate: created
145145
- Subject: [`change`](#change)
146146

@@ -155,7 +155,7 @@ A source code change was created and submitted to a repository specific branch.
155155

156156
Someone (user) or an automated system submitted an review to the source code change. A user or an automated system needs to be in charge of understanding how many approvals/rejections are needed for this change to be merged or rejected. The review event needs to include if the change is approved by the reviewer, more changes are needed or if the change is rejected.
157157

158-
- Event Type: __`dev.cdevents.change.reviewed.0.1-draft`__
158+
- Event Type: __`dev.cdevents.change.reviewed.0.1.0-draft`__
159159
- Predicate: reviewed
160160
- Subject: [`change`](#change)
161161

@@ -170,7 +170,7 @@ Someone (user) or an automated system submitted an review to the source code cha
170170

171171
A change is merged to the target branch where it was submitted.
172172

173-
- Event Type: __`dev.cdevents.change.merged.0.1-draft`__
173+
- Event Type: __`dev.cdevents.change.merged.0.1.0-draft`__
174174
- Predicate: merged
175175
- Subject: [`change`](#change)
176176

@@ -185,7 +185,7 @@ A change is merged to the target branch where it was submitted.
185185

186186
A tool or a user decides that the change has been inactive for a while and it can be considered abandoned.
187187

188-
- Event Type: __`dev.cdevents.change.abandoned.0.1-draft`__
188+
- Event Type: __`dev.cdevents.change.abandoned.0.1.0-draft`__
189189
- Predicate: abandoned
190190
- Subject: [`change`](#change)
191191

@@ -200,7 +200,7 @@ A tool or a user decides that the change has been inactive for a while and it ca
200200

201201
A Change has been updated, for example a new commit is added or removed from an existing Change.
202202

203-
- Event Type: __`dev.cdevents.change.updated.0.1-draft`__
203+
- Event Type: __`dev.cdevents.change.updated.0.1.0-draft`__
204204
- Predicate: updated
205205
- Subject: [`change`](#change)
206206

0 commit comments

Comments
 (0)