Skip to content

Commit 9cc192e

Browse files
authored
Merge pull request #409 from justinsb/project_management_deprecation
docs: how to introduce functionality without breaking users
2 parents a17da32 + ba06c4b commit 9cc192e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Diff for: docs/project-management/deprecations.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Deprecations and new functionality
2+
3+
As kubernetes and the controller ecosystem continues to evolve,
4+
we will sometimes want to add new functionality or behaviour to kdp.
5+
6+
However, as a library, we do not want to break the functionality of controllers that upgrade their kdp version,
7+
particularly as the coupling to kubernetes versions means that users must upgrade periodically.
8+
9+
We will aim to follow these rules therefore:
10+
11+
* Do not remove functionality or fundamentally change the behaviour in a way that will break users.
12+
13+
* Bug fixes are good, but we should think about existing users even for bug fixes.
14+
15+
* Consider introducing a new method or type instead of breaking existing functionality.
16+
17+
* Use the go `// Deprecated:` [convention](https://go.dev/wiki/Deprecated) to discourage usage of "old" methods, fields or types.
18+
19+
* Prefer errors at compilation time to errors at run time. Reasonable code changes are acceptable (e.g. adding a context method).
20+
Crashing at run time because a field is not populated is not acceptable.

0 commit comments

Comments
 (0)