Skip to content

Commit a2f2163

Browse files
floberndgithub-actions[bot]
authored andcommitted
Release 9.0 (#8485)
1 parent 7bde0e4 commit a2f2163

File tree

2,814 files changed

+499699
-334071
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,814 files changed

+499699
-334071
lines changed

Diff for: .buildkite/DockerFile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG DOTNET_VERSION=8.0.400
1+
ARG DOTNET_VERSION=9.0.100
22
FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION} AS elasticsearch-net-build
33

44
ENV NUGET_SCRATCH="/tmp/NuGetScratch"

Diff for: .buildkite/pipeline.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ steps:
55
env:
66
TEST_SUITE: "{{ matrix.suite }}"
77
STACK_VERSION: master-SNAPSHOT
8-
DOTNET_VERSION: 8.0.400
8+
DOTNET_VERSION: 9.0.100
99
matrix:
1010
setup:
1111
suite:

Diff for: .buildkite/run-repository.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ param(
1414
$NODE_NAME,
1515

1616
[string]
17-
$DOTNET_VERSION = "8.0.400"
17+
$DOTNET_VERSION = "9.0.100"
1818
)
1919

2020
$ESC = [char]27

Diff for: .buildkite/run-repository.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ script_path=$(dirname $(realpath -s $0))
99
source $script_path/functions/imports.sh
1010
set -euo pipefail
1111

12-
DOTNET_VERSION=${DOTNET_VERSION-8.0.400}
12+
DOTNET_VERSION=${DOTNET_VERSION-9.0.100}
1313
ELASTICSEARCH_URL=${ELASTICSEARCH_URL-"$elasticsearch_url"}
1414
elasticsearch_container=${elasticsearch_container-}
1515

Diff for: .buildkite/run-tests.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ param (
88
$TEST_SUITE = "free",
99

1010
[string]
11-
$DOTNET_VERSION = "8.0.400"
11+
$DOTNET_VERSION = "9.0.100"
1212
)
1313

1414
$ESC = [char]27

Diff for: .ci/DockerFile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG DOTNET_VERSION=8.0.400
1+
ARG DOTNET_VERSION=9.0.100
22
FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION} AS elasticsearch-net-build
33

44
ENV NUGET_SCRATCH="/tmp/NuGetScratch"

Diff for: .ci/make.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ OUTPUT_DIR="$repo/${output_folder}"
4242
REPO_BINDING="${OUTPUT_DIR}:/sln/${output_folder}"
4343
mkdir -p "$OUTPUT_DIR"
4444

45-
DOTNET_VERSION=${DOTNET_VERSION-8.0.400}
45+
DOTNET_VERSION=${DOTNET_VERSION-9.0.100}
4646

4747
echo -e "\033[34;1mINFO:\033[0m PRODUCT ${product}\033[0m"
4848
echo -e "\033[34;1mINFO:\033[0m VERSION ${STACK_VERSION}\033[0m"

Diff for: .ci/readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ $ STACK_VERSION=8.0.0-SNAPSHOT ./.ci/run-tests
3030
|-------------------------|-------------|-------------|
3131
| `STACK_VERSION` | `N/A` | The elasticsearch version to target
3232
| `TEST_SUITE` | `basic` | `free` or `platinum` sets which test suite to run and which container to run against. |
33-
| `DOTNET_VERSION` | `8.0.400` | The .NET sdk version used to grab the proper container |
33+
| `DOTNET_VERSION` | `9.0.100` | The .NET sdk version used to grab the proper container |
3434

3535
If you want to manually spin up elasticsearch for these tests and call the runner afterwards you can use
3636

Diff for: .ci/run-repository.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ param(
1414
$NODE_NAME,
1515

1616
[string]
17-
$DOTNET_VERSION = "8.0.400"
17+
$DOTNET_VERSION = "9.0.100"
1818
)
1919

2020
$ESC = [char]27

Diff for: .ci/run-repository.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ script_path=$(dirname $(realpath -s $0))
99
source $script_path/functions/imports.sh
1010
set -euo pipefail
1111

12-
DOTNET_VERSION=${DOTNET_VERSION-8.0.400}
12+
DOTNET_VERSION=${DOTNET_VERSION-9.0.100}
1313
ELASTICSEARCH_URL=${ELASTICSEARCH_URL-"$elasticsearch_url"}
1414
elasticsearch_container=${elasticsearch_container-}
1515

Diff for: .ci/run-tests.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ param (
88
$TEST_SUITE = "free",
99

1010
[string]
11-
$DOTNET_VERSION = "8.0.400"
11+
$DOTNET_VERSION = "9.0.100"
1212
)
1313

1414
$ESC = [char]27

Diff for: .ci/test-matrix.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ TEST_SUITE:
88
- platinum
99

1010
DOTNET_VERSION:
11-
- 8.0.400
11+
- 9.0.100
1212

1313
exclude: ~

Diff for: Directory.Build.props

+4
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,8 @@
5050
<ItemGroup>
5151
<PackageReference Include="DotNet.ReproducibleBuilds" Version="1.1.1" PrivateAssets="All"/>
5252
</ItemGroup>
53+
54+
<PropertyGroup>
55+
<WarningsNotAsErrors>NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
56+
</PropertyGroup>
5357
</Project>

Diff for: Elasticsearch.sln

-7
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "scripts", "build\scripts\sc
5555
EndProject
5656
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests.ClusterLauncher", "tests\Tests.ClusterLauncher\Tests.ClusterLauncher.csproj", "{F6162603-D134-4121-8106-2BA4DAD7350B}"
5757
EndProject
58-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Clients.Elasticsearch.JsonNetSerializer", "src\Elastic.Clients.Elasticsearch.JsonNetSerializer\Elastic.Clients.Elasticsearch.JsonNetSerializer.csproj", "{8C9275D9-29CE-4A20-8FD5-6B26C6CAAADB}"
59-
EndProject
6058
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "tests\Tests\Tests.csproj", "{6FD804B2-CE80-41CB-A411-2023F34C18FE}"
6159
EndProject
6260
Global
@@ -101,10 +99,6 @@ Global
10199
{F6162603-D134-4121-8106-2BA4DAD7350B}.Debug|Any CPU.Build.0 = Debug|Any CPU
102100
{F6162603-D134-4121-8106-2BA4DAD7350B}.Release|Any CPU.ActiveCfg = Release|Any CPU
103101
{F6162603-D134-4121-8106-2BA4DAD7350B}.Release|Any CPU.Build.0 = Release|Any CPU
104-
{8C9275D9-29CE-4A20-8FD5-6B26C6CAAADB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
105-
{8C9275D9-29CE-4A20-8FD5-6B26C6CAAADB}.Debug|Any CPU.Build.0 = Debug|Any CPU
106-
{8C9275D9-29CE-4A20-8FD5-6B26C6CAAADB}.Release|Any CPU.ActiveCfg = Release|Any CPU
107-
{8C9275D9-29CE-4A20-8FD5-6B26C6CAAADB}.Release|Any CPU.Build.0 = Release|Any CPU
108102
{6FD804B2-CE80-41CB-A411-2023F34C18FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
109103
{6FD804B2-CE80-41CB-A411-2023F34C18FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
110104
{6FD804B2-CE80-41CB-A411-2023F34C18FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -123,7 +117,6 @@ Global
123117
{F8A7E60C-0C48-4D76-AF7F-7881DF5A263D} = {D455EC79-E1E0-4509-B297-0DA3AED8DFF7}
124118
{68D1BFDC-F447-4D2C-AF81-537807636610} = {1FE49D14-216A-41EE-A177-E42BFF53E0DC}
125119
{F6162603-D134-4121-8106-2BA4DAD7350B} = {362B2776-4B29-46AB-B237-56776B5372B6}
126-
{8C9275D9-29CE-4A20-8FD5-6B26C6CAAADB} = {D455EC79-E1E0-4509-B297-0DA3AED8DFF7}
127120
{6FD804B2-CE80-41CB-A411-2023F34C18FE} = {362B2776-4B29-46AB-B237-56776B5372B6}
128121
EndGlobalSection
129122
GlobalSection(ExtensibilityGlobals) = postSolution

Diff for: build/scripts/Versioning.fs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module Versioning =
1717
// Since that file is now generated by the dotnet tooling and GitVersion and similar tooling all still have
1818
// active issues related to dotnet core, we now just burn this info in global.json
1919

20-
let parse (v:string) = SemVer.parse(v)
20+
let parse (v: string) = SemVer.parse(if String.IsNullOrEmpty(v) then "1.0.0" else v)
2121

2222
//Versions in form of e.g 6.1.0 is inferred as datetime so we bake the json shape into the provider like this
2323
type SdkVersion = { version:string; rollForward:string; allowPrerelease:bool }

Diff for: build/scripts/scripts.fsproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net8.0</TargetFramework>
3+
<TargetFramework>net9.0</TargetFramework>
44
<OutputType>Exe</OutputType>
55
<!-- Type Providers are restored using net461, fine for netcoreapp2.2 so we kill the warning -->
66
<NoWarn>$(NoWarn);NU1701</NoWarn>

Diff for: docs/release-notes/breaking-changes.md

+196-10
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,208 @@ mapped_pages:
55
---
66

77
# Elasticsearch .NET Client breaking changes [elasticsearch-net-client-breaking-changes]
8+
89
Breaking changes can impact your Elastic applications, potentially disrupting normal operations. Before you upgrade, carefully review the Elasticsearch .NET Client breaking changes and take the necessary steps to mitigate any issues. To learn how to upgrade, check [Upgrade](docs-content://deploy-manage/upgrade.md).
910

10-
% ## Next version [elasticsearch-nett-client-nextversion-breaking-changes]
11+
% ## Next version [elasticsearch-net-client-nextversion-breaking-changes]
1112

1213
% ::::{dropdown} Title of breaking change
14+
%
15+
% **Impact**: High/Low.
16+
%
1317
% Description of the breaking change.
1418
% For more information, check [PR #](PR link).
15-
% **Impact**<br> Impact of the breaking change.
16-
% **Action**<br> Steps for mitigating deprecation impact.
19+
%
1720
% ::::
1821

19-
% ## 9.0.0 [elasticsearch-nett-client-900-breaking-changes]
22+
## 9.0.0 [elasticsearch-net-client-900-breaking-changes]
2023

21-
% ::::{dropdown} Title of breaking change
22-
% Description of the breaking change.
23-
% For more information, check [PR #](PR link).
24-
% **Impact**<br> Impact of the breaking change.
25-
% **Action**<br> Steps for mitigating deprecation impact.
26-
% ::::
24+
### Overview
25+
26+
- [1. Container types](#1-container-types)
27+
- [2. Removal of certain generic request descriptors](#2-removal-of-certain-generic-request-descriptors)
28+
- [3. Removal of certain descriptor constructors and related request APIs](#3-removal-of-certain-descriptor-constructors-and-related-request-apis)
29+
- [4. Date / Time / Duration values](#4-date--time--duration-values)
30+
- [5. `ExtendedBounds`](#5-extendedbounds)
31+
- [6. `Field.Format`](#6-fieldformat)
32+
- [7. `Field`/`Fields` semantics](#7-fieldfields-semantics)
33+
- [8. `FieldValue`](#8-fieldvalue)
34+
- [9. `FieldSort`](#9-fieldsort)
35+
- [10. Descriptor types `class` -\> `struct`](#10-descriptor-types-class---struct)
36+
37+
### Breaking changes
38+
39+
#### 1. Container types
40+
41+
**Impact**: High.
42+
43+
Container types now use regular properties for their variants instead of static factory methods ([read more](index.md#7-improved-container-design)).
44+
45+
This change primarily affects the `Query` and `Aggregation` types.
46+
47+
```csharp
48+
// 8.x
49+
new SearchRequest
50+
{
51+
Query = Query.MatchAll(
52+
new MatchAllQuery
53+
{
54+
}
55+
)
56+
};
57+
58+
// 9.0
59+
new SearchRequest
60+
{
61+
Query = new Query
62+
{
63+
MatchAll = new MatchAllQuery
64+
{
65+
}
66+
}
67+
};
68+
```
69+
70+
#### 2. Removal of certain generic request descriptors
71+
72+
**Impact**: High.
73+
74+
Removed the generic version of some request descriptors for which the corresponding requests do not contain inferrable properties.
75+
76+
These descriptors were generated unintentionally.
77+
78+
When migrating, the generic type parameter must be removed from the type, e.g., `AsyncSearchStatusRequestDescriptor<TDocument>` should become just `AsyncSearchStatusRequestDescriptor`.
79+
80+
List of affected descriptors:
81+
82+
- `AsyncQueryDeleteRequestDescriptor<TDocument>`
83+
- `AsyncQueryGetRequestDescriptor<TDocument>`
84+
- `AsyncSearchStatusRequestDescriptor<TDocument>`
85+
- `DatabaseConfigurationDescriptor<TDocument>`
86+
- `DatabaseConfigurationFullDescriptor<TDocument>`
87+
- `DeleteAsyncRequestDescriptor<TDocument>`
88+
- `DeleteAsyncSearchRequestDescriptor<TDocument>`
89+
- `DeleteDataFrameAnalyticsRequestDescriptor<TDocument>`
90+
- `DeleteGeoipDatabaseRequestDescriptor<TDocument>`
91+
- `DeleteIpLocationDatabaseRequestDescriptor<TDocument>`
92+
- `DeleteJobRequestDescriptor<TDocument>`
93+
- `DeletePipelineRequestDescriptor<TDocument>`
94+
- `DeleteScriptRequestDescriptor<TDocument>`
95+
- `DeleteSynonymRequestDescriptor<TDocument>`
96+
- `EqlDeleteRequestDescriptor<TDocument>`
97+
- `EqlGetRequestDescriptor<TDocument>`
98+
- `GetAsyncRequestDescriptor<TDocument>`
99+
- `GetAsyncSearchRequestDescriptor<TDocument>`
100+
- `GetAsyncStatusRequestDescriptor<TDocument>`
101+
- `GetDataFrameAnalyticsRequestDescriptor<TDocument>`
102+
- `GetDataFrameAnalyticsStatsRequestDescriptor<TDocument>`
103+
- `GetEqlStatusRequestDescriptor<TDocument>`
104+
- `GetGeoipDatabaseRequestDescriptor<TDocument>`
105+
- `GetIpLocationDatabaseRequestDescriptor<TDocument>`
106+
- `GetJobsRequestDescriptor<TDocument>`
107+
- `GetPipelineRequestDescriptor<TDocument>`
108+
- `GetRollupCapsRequestDescriptor<TDocument>`
109+
- `GetRollupIndexCapsRequestDescriptor<TDocument>`
110+
- `GetScriptRequestDescriptor<TDocument>`
111+
- `GetSynonymRequestDescriptor<TDocument>`
112+
- `IndexModifyDataStreamActionDescriptor<TDocument>`
113+
- `PreprocessorDescriptor<TDocument>`
114+
- `PutGeoipDatabaseRequestDescriptor<TDocument>`
115+
- `PutIpLocationDatabaseRequestDescriptor<TDocument>`
116+
- `PutScriptRequestDescriptor<TDocument>`
117+
- `PutSynonymRequestDescriptor<TDocument>`
118+
- `QueryVectorBuilderDescriptor<TDocument>`
119+
- `RankDescriptor<TDocument>`
120+
- `RenderSearchTemplateRequestDescriptor<TDocument>`
121+
- `SmoothingModelDescriptor<TDocument>`
122+
- `StartDataFrameAnalyticsRequestDescriptor<TDocument>`
123+
- `StartJobRequestDescriptor<TDocument>`
124+
- `StopDataFrameAnalyticsRequestDescriptor<TDocument>`
125+
- `StopJobRequestDescriptor<TDocument>`
126+
- `TokenizationConfigDescriptor<TDocument>`
127+
- `UpdateDataFrameAnalyticsRequestDescriptor<TDocument>`
128+
129+
#### 3. Removal of certain descriptor constructors and related request APIs
130+
131+
**Impact**: High.
132+
133+
Removed `(TDocument, IndexName)` descriptor constructors and related request APIs for all requests with `IndexName` and `Id` path parameters.
134+
135+
For example:
136+
137+
```csharp
138+
// 8.x
139+
public IndexRequestDescriptor(TDocument document, IndexName index, Id? id) { }
140+
public IndexRequestDescriptor(TDocument document, IndexName index) { }
141+
public IndexRequestDescriptor(TDocument document, Id? id) { }
142+
public IndexRequestDescriptor(TDocument document) { }
143+
144+
// 9.0
145+
public IndexRequestDescriptor(TDocument document, IndexName index, Id? id) { }
146+
public IndexRequestDescriptor(TDocument document, Id? id) { }
147+
public IndexRequestDescriptor(TDocument document) { }
148+
```
149+
150+
These overloads caused invocation ambiguities since both, `IndexName` and `Id` implement implicit conversion operators from `string`.
151+
152+
Alternative with same semantics:
153+
154+
```csharp
155+
// Descriptor constructor.
156+
new IndexRequestDescriptor(document, "my_index", Id.From(document));
157+
158+
// Request API method.
159+
await client.IndexAsync(document, "my_index", Id.From(document), ...);
160+
```
161+
162+
#### 4. Date / Time / Duration values
163+
164+
**Impact**: High.
165+
166+
In places where previously `long` or `double` was used to represent a date/time/duration value, `DateTimeOffset` or `TimeSpan` is now used instead.
167+
168+
#### 5. `ExtendedBounds`
169+
170+
**Impact**: High.
171+
172+
Removed `ExtendedBoundsDate`/`ExtendedBoundsDateDescriptor`, `ExtendedBoundsFloat`/`ExtendedBoundsFloatDescriptor`.
173+
174+
Replaced by `ExtendedBounds<T>`, `ExtendedBoundsOfFieldDateMathDescriptor`, and `ExtendedBoundsOfDoubleDescriptor`.
175+
176+
#### 6. `Field.Format`
177+
178+
**Impact**: Low.
179+
180+
Removed `Field.Format` property and corresponding constructor and inferrer overloads.
181+
182+
This property has not been used for some time (replaced by the `FieldAndFormat` type).
183+
184+
#### 7. `Field`/`Fields` semantics
185+
186+
**Impact**: Low.
187+
188+
`Field`/`Fields` static factory methods and conversion operators no longer return nullable references but throw exceptions instead (`Field`) if the input `string`/`Expression`/`PropertyInfo` argument is `null`.
189+
190+
This makes implicit conversions to `Field` more user-friendly without requiring the null-forgiveness operator (`!`) ([read more](index.md#field-name-inference)).
191+
192+
#### 8. `FieldValue`
193+
194+
**Impact**: Low.
195+
196+
Removed `FieldValue.IsLazyDocument`, `FieldValue.IsComposite`, and the corresponding members in the `FieldValue.ValueKind` enum.
197+
198+
These values have not been used for some time.
199+
200+
#### 9. `FieldSort`
201+
202+
**Impact**: Low.
203+
204+
Removed static `FieldSort.Empty` member.
205+
206+
Sorting got reworked which makes this member obsolete ([read more](index.md#sorting)).
207+
208+
#### 10. Descriptor types `class` -> `struct`
209+
210+
**Impact**: Low.
211+
212+
All descriptor types are now implemented as `struct` instead of `class`.

0 commit comments

Comments
 (0)