Skip to content

Commit a134bfa

Browse files
Add versioning section to readme and docs (#8580) (#8581)
(cherry picked from commit 5590581) Co-authored-by: Florian Bernd <[email protected]>
1 parent 2532f44 commit a134bfa

File tree

4 files changed

+59
-3
lines changed

4 files changed

+59
-3
lines changed

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,20 @@ or
99
**for a free trial of Elastic Cloud**.
1010

1111
The .NET client for Elasticsearch provides strongly typed requests and responses
12-
for Elasticsearch APIs. It delegates protocol handling to the
13-
[Elastic.Transport](https://github.com/elastic/elastic-transport-net) library,
12+
for Elasticsearch APIs. It delegates protocol handling to the
13+
[Elastic.Transport](https://github.com/elastic/elastic-transport-net) library,
1414
which takes care of all transport-level concerns (HTTP connection establishment
1515
and pooling, retries, etc.).
1616

17+
## Versioning
18+
19+
The *major* and *minor* version parts of the Elasticsearch .NET client are dictated by the version of the Elasticsearch server.
20+
21+
> [!WARNING]
22+
> This means that the Elasticsearch .NET client **does not** strictly follows semantic versioning!
23+
>
24+
> Although we try to avoid this as much as possible, it can happen that a *minor* or even *patch* version contains breaking changes (see also: [breaking changes policy](https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/breaking-changes-policy.html)). Please always check the [release notes](https://github.com/elastic/elasticsearch-net/releases) before updating the client package.
25+
1726
## Compatibility
1827

1928
Language clients are **forward compatible**:
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
mapped_pages:
3+
- https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/breaking-changes-policy.html
4+
---
5+
6+
# Breaking changes policy [breaking-changes-policy]
7+
8+
The .NET API Client source code is generated from a [formal specification of the Elasticsearch API](https://github.com/elastic/elasticsearch-specification). This API specification is large, and although it is tested against hundreds of Elasticsearch test files, it may have discrepancies with the actual API that result in issues in the .NET API Client.
9+
10+
Fixing these discrepancies in the API specification results in code changes in the .NET API Client, and some of these changes can require code updates in your applications.
11+
12+
This section explains how these breaking changes are considered for inclusion in .NET API Client releases.
13+
14+
## Breaking changes in patch releases [_breaking_changes_in_patch_releases]
15+
16+
Some issues in the API specification are properties that have an incorrect type, such as a `long` that should be a `string`, or a required property that is actually optional. These issues can cause the .NET API Client to not work properly or even throw exceptions.
17+
18+
When a specification issue is discovered and resolved, it may require code updates in applications using the .NET API Client. Such breaking changes are considered acceptable, *even in patch releases* (e.g. 7.17.0 → 7.17.1), as they introduce stability to APIs that may otherwise be unusable.
19+
20+
## Breaking changes in minor releases [_breaking_changes_in_minor_releases]
21+
22+
Along with these bug fixes, the API specification is constantly refined, more precise type definitions are introduced to improve developer comfort and remove ambiguities. The specification of often-used APIs is fairly mature, so these changes happen generally on less often used APIs. These changes can also cause breaking changes requiring code updates which are considered *acceptable in minor releases* (e.g. 8.0 → 8.1).
23+
24+
## Breaking changes in major releases [_breaking_changes_in_major_releases]
25+
26+
Major releases (e.g. 8.x → 9.x) can include larger refactorings of the API specification and the framework underlying the .NET API Client. These refactorings are considered carefully and done only when they unlock new important features or new developments.
27+
28+
## Elasticsearch API stability guarantees [_elasticsearch_api_stability_guarantees]
29+
30+
All Elasticsearch APIs have stability indicators, which imply potential changes. If an API is `stable` only additional non-breaking changes are added. In case of `experimental` APIs, breaking changes can be introduced any time, which means that these changes, will also be reflected in the .NET API Client.
31+
32+
## Breaking changes by release
33+
34+
For more information, refer to the [](../release-notes/breaking-changes.md).

docs/reference/index.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,18 @@ The .NET {{es}} client is built on the Elastic Transport library, which provides
2727
* Connection management and load balancing across all available nodes.
2828
* Request retries and dead connections handling.
2929

30+
## Versioning [versioning]
31+
32+
The *major* and *minor* version parts of the Elasticsearch .NET client are dictated by the version of the Elasticsearch server.
33+
34+
:::{warning}
35+
36+
This means that the Elasticsearch .NET client **does not** strictly follows semantic versioning!
37+
38+
Although we try to avoid this as much as possible, it can happen that a *minor* or even *patch* version contains breaking changes (see also: [breaking changes policy](./breaking-changes-policy.md)). Please always check the [release notes](https://github.com/elastic/elasticsearch-net/releases) before updating the client package.
39+
40+
:::
41+
3042
## {{es}} version compatibility [_es_version_compatibility]
3143

3244
Language clients are **forward compatible**:

docs/reference/toc.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ toc:
3030
children:
3131
- file: troubleshoot/audit-trail.md
3232
- file: troubleshoot/debug-information.md
33-
- file: troubleshoot/debug-mode.md
33+
- file: troubleshoot/debug-mode.md
34+
- file: breaking-changes-policy.md

0 commit comments

Comments
 (0)