Skip to content

Commit 6e11b60

Browse files
bobcatfishtekton-robot
authored andcommitted
Document API change policy 👩 ⚖️
This commit adds docs about the policy the current governing board has been discussing around how to handle API changes and make sure they are reviewed by the ppl that should review them. We can adjust this policy as needed, e.g. if we start running into situations where not enough owners can review within a reasonable amount of time. Also added links to the doc where we are working on our plan to get to Beta and updated our docs about this. Fixes tektoncd#906
1 parent bb85571 commit 6e11b60

File tree

3 files changed

+34
-33
lines changed

3 files changed

+34
-33
lines changed

.github/pull_request_template.md

+10
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ Double check this list of stuff that's easy to miss:
2121
- If you are adding [a new binary/image to the `cmd` dir](../cmd), please update
2222
[the release Task](../tekton/publish.yaml) and [TaskRun](../tekton/publish-run.yaml) to build and release this image
2323

24+
## Reviewer Notes
25+
26+
If [API changes](https://github.com/tektoncd/pipeline/blob/master/api_compatibility_policy.md)
27+
are included, [additive changes](https://github.com/tektoncd/pipeline/blob/master/api_compatibility_policy.md#additive-changes)
28+
must be approved by at least two [OWNERS](https://github.com/tektoncd/pipeline/blob/master/OWNERS)
29+
and [backwards incompatible changes](https://github.com/tektoncd/pipeline/blob/master/api_compatibility_policy.md#backwards-incompatible-changes)
30+
must be approved by [more than 50% of the OWNERS](https://github.com/tektoncd/pipeline/blob/master/OWNERS),
31+
and they must first be added
32+
[in a backwards compatible way](https://github.com/tektoncd/pipeline/blob/master/api_compatibility_policy.md#backwards-compatible-changes-first).
33+
2434
# Release Notes
2535

2636
```

CONTRIBUTING.md

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ on:
2424
[reviews](https://github.com/tektoncd/community/blob/master/process.md#reviews)
2525
and
2626
[becoming an OWNER](https://github.com/tektoncd/community/blob/master/process.md#owners)
27+
- [Making API changes](api_compatibility_policy.md#approving-api-changes)
2728

2829
You can find details on our automation infrastructure in
2930
[the plumbing repo](https://github.com/tektoncd/plumbing).

api_compatibility_policy.md

+23-33
Original file line numberDiff line numberDiff line change
@@ -40,48 +40,38 @@ The API is considered to consist of:
4040
- The spec if the CRDs
4141
- The order that `PipelineResources` declared within a `Task` are applied in
4242

43-
## `TaskRun`, `Task`, and `ClusterTask`
43+
### Getting to beta
4444

45-
The CRD types
46-
[`Task`](https://github.com/tektoncd/pipeline/blob/master/docs/tasks.md),
47-
[`ClusterTask`](https://github.com/tektoncd/pipeline/blob/master/docs/tasks.md#clustertask),
48-
and
49-
[`TaskRun`](https://github.com/tektoncd/pipeline/blob/master/docs/taskruns.md)
50-
should be considered `alpha`, however these types are more stable than
51-
`Pipeline`, `PipelineRun`, and `PipelineResource`.
45+
[This document](https://docs.google.com/document/d/1H8I2Rk4kLdQaR4mV0A71Qbk-1FxXFrmvisEAjLKT6H0/edit#)
46+
(visible to members of [the mailing list](https://github.com/tektoncd/community/blob/master/contact.md#mailing-list))
47+
describes our plan to get to beta.
5248

53-
### Possibly `beta` in 0.3
49+
#### Backwards compatible changes first
5450

55-
The status of these types will be revisited ~2 releases (i.e. 0.3) and see if
56-
they can be promoted to `beta`.
57-
58-
Once these types are promoted to `beta`, any backwards incompatible changes must
51+
At this point, any backwards incompatible changes must
5952
be introduced in a backwards compatible manner first, with a deprecation warning
6053
in the release notes, for at least one full release before the backward
6154
incompatible change is made.
6255

63-
There are two reasons for this:
56+
## Approving API changes
57+
58+
API changes must be approved by [OWNERS](OWNERS). The policy is slightly different
59+
for [additive changes](#additive-changes) vs.
60+
[backwards incompatible changes](#backwards-incompatible-changes).
61+
62+
### Additive changes
6463

65-
- `Task` and `TaskRun` are considered upgraded versions of [Build](https://github.com/knative/docs/blob/master/docs/build/builds.md#source) and [BuildTemplate](https://github.com/knative/docs/blob/master/docs/build/build-templates.md), meaning that the APIs benefit from a significant amount of user feedback and iteration
66-
- Going forward users should use `TaskRun` and `Task` instead of `Build` and `BuildTemplate`, those users should not expect the API to be changed on them
67-
without warning
64+
Additive changes are changes that add to the API and do not cause problems for users
65+
of previous versions of the API.
6866

69-
The exception to this is that `PipelineResource` definitions can be embedded in
70-
`TaskRuns`, and since the `PipelineResource` definitions are considered less
71-
stable, changes to the spec of the embedded `PipelineResource` can be introduced
72-
between releases.
67+
These changes must be approved by at least 2 [OWNERS](OWNERS).
7368

74-
## `PipelineRun`, `Pipeline` and `PipelineResource`
69+
### Backwards incompatible changes
7570

76-
The CRD types
77-
[`Pipeline`](https://github.com/tektoncd/pipeline/blob/master/docs/pipelines.md),
78-
[`PipelineRun`](https://github.com/tektoncd/pipeline/blob/master/docs/pipelines.md)
79-
and
80-
[`PipelineResource`](https://github.com/tektoncd/pipeline/blob/master/docs/resources.md#pipelineresources)
81-
should be considered `alpha`, i.e. the API should be considered unstable.
82-
Backwards incompatible changes can be introduced between releases, however they
83-
must include a backwards incompatibility warning in the release notes.
71+
Backwards incompatible changes change the API, e.g. by removing fields from a CRD
72+
spec. These changes will mean that folks using a previous version of the API will need
73+
to adjust their usage in order to use the new version.
8474

85-
The reason for this is not yet having enough user feedback to commit to the APIs
86-
as they currently exist. Once significant user input has been given into the API
87-
design, we can upgrade these CRDs to `beta`.
75+
These changes must be make [in a backwards compatible manner first](#backwards-compatible-changes-first),
76+
and they must be improved by [more than half of the project OWNERS](OWNERS)
77+
(i.e. 50% + 1).

0 commit comments

Comments
 (0)