Skip to content

Commit f70d058

Browse files
authored
Respond to transport refactoring (#6191)
1 parent bcaf0ef commit f70d058

File tree

57 files changed

+136
-136
lines changed

Some content is hidden

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

57 files changed

+136
-136
lines changed

benchmarks/Benchmarks/packages.lock.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
},
5353
"Elastic.Transport": {
5454
"type": "Transitive",
55-
"resolved": "0.3.1",
56-
"contentHash": "zjY9FwRW77/jDctjIOZecuvRrGRuLg0IDMulT8jQr0ycsU4Ikde8uj5pUTkkkWyEmGRgjzf477QkeKGyq8AqVQ==",
55+
"resolved": "0.3.2",
56+
"contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==",
5757
"dependencies": {
5858
"Microsoft.CSharp": "4.7.0",
5959
"System.Buffers": "4.5.1",
@@ -1129,7 +1129,7 @@
11291129
"elastic.clients.elasticsearch": {
11301130
"type": "Project",
11311131
"dependencies": {
1132-
"Elastic.Transport": "0.3.1"
1132+
"Elastic.Transport": "0.3.2"
11331133
}
11341134
}
11351135
}

benchmarks/Profiling/packages.lock.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
},
1717
"Elastic.Transport": {
1818
"type": "Transitive",
19-
"resolved": "0.3.1",
20-
"contentHash": "zjY9FwRW77/jDctjIOZecuvRrGRuLg0IDMulT8jQr0ycsU4Ikde8uj5pUTkkkWyEmGRgjzf477QkeKGyq8AqVQ==",
19+
"resolved": "0.3.2",
20+
"contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==",
2121
"dependencies": {
2222
"Microsoft.CSharp": "4.7.0",
2323
"System.Buffers": "4.5.1",
@@ -65,7 +65,7 @@
6565
"elastic.clients.elasticsearch": {
6666
"type": "Project",
6767
"dependencies": {
68-
"Elastic.Transport": "0.3.1"
68+
"Elastic.Transport": "0.3.2"
6969
}
7070
}
7171
}

src/Elastic.Clients.Elasticsearch.JsonNetSerializer/packages.lock.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
},
3636
"Elastic.Transport": {
3737
"type": "Transitive",
38-
"resolved": "0.3.1",
39-
"contentHash": "zjY9FwRW77/jDctjIOZecuvRrGRuLg0IDMulT8jQr0ycsU4Ikde8uj5pUTkkkWyEmGRgjzf477QkeKGyq8AqVQ==",
38+
"resolved": "0.3.2",
39+
"contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==",
4040
"dependencies": {
4141
"Microsoft.CSharp": "4.7.0",
4242
"System.Buffers": "4.5.1",
@@ -148,7 +148,7 @@
148148
"elastic.clients.elasticsearch": {
149149
"type": "Project",
150150
"dependencies": {
151-
"Elastic.Transport": "0.3.1"
151+
"Elastic.Transport": "0.3.2"
152152
}
153153
}
154154
},
@@ -192,8 +192,8 @@
192192
},
193193
"Elastic.Transport": {
194194
"type": "Transitive",
195-
"resolved": "0.3.1",
196-
"contentHash": "zjY9FwRW77/jDctjIOZecuvRrGRuLg0IDMulT8jQr0ycsU4Ikde8uj5pUTkkkWyEmGRgjzf477QkeKGyq8AqVQ==",
195+
"resolved": "0.3.2",
196+
"contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==",
197197
"dependencies": {
198198
"Microsoft.CSharp": "4.7.0",
199199
"System.Buffers": "4.5.1",
@@ -400,7 +400,7 @@
400400
"elastic.clients.elasticsearch": {
401401
"type": "Project",
402402
"dependencies": {
403-
"Elastic.Transport": "0.3.1",
403+
"Elastic.Transport": "0.3.2",
404404
"System.Reflection.Emit": "4.3.0",
405405
"System.Reflection.Emit.Lightweight": "4.3.0"
406406
}

src/Elastic.Clients.Elasticsearch/Common/ElasticsearchClientProductRegistration.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public ElasticsearchClientProductRegistration(Type markerType) : base(markerType
1515
public static ElasticsearchClientProductRegistration DefaultForElasticsearchClientsElasticsearch { get; } = new(typeof(ElasticsearchClient));
1616

1717
/// <summary>
18-
/// Elastic.Clients.Elasticsearch handles 404 in its <see cref="ResponseBase.IsValid" />, we do not want the low level client throwing
18+
/// Elastic.Clients.Elasticsearch handles 404 in its <see cref="ElasticsearchResponseBase.IsValid" />, we do not want the low level client throwing
1919
/// exceptions
2020
/// when <see cref="ITransportConfiguration.ThrowExceptions" /> is enabled for 404's. The client is in charge of
2121
/// composing paths
@@ -25,12 +25,12 @@ public override bool HttpStatusCodeClassifier(HttpMethod method, int statusCode)
2525
statusCode is >= 200 and < 300 or 404;
2626

2727
/// <summary>
28-
/// Makes the low level transport aware of Elastic.Clients.Elasticsearch's <see cref="ResponseBase" />
28+
/// Makes the low level transport aware of Elastic.Clients.Elasticsearch's <see cref="ElasticsearchResponseBase" />
2929
/// so that it can peek in to its exposed error when reporting failures.
3030
/// </summary>
3131
public override bool TryGetServerErrorReason<TResponse>(TResponse response, out string? reason)
3232
{
33-
if (response is not ResponseBase r)
33+
if (response is not ElasticsearchResponseBase r)
3434
return base.TryGetServerErrorReason(response, out reason);
3535
reason = r.ServerError?.Error?.ToString();
3636
return !string.IsNullOrEmpty(reason);

src/Elastic.Clients.Elasticsearch/Common/Infer/Inferrer.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ public Inferrer(IElasticsearchClientSettings elasticsearchClientSettings)
3939
// Action<MultiGetResponseFormatter.MultiHitTuple, IJsonFormatterResolver, ICollection<IMultiGetHit<object>>>>();
4040
//CreateSearchResponseDelegates =
4141
// new ConcurrentDictionary<Type,
42-
// Action<MultiSearchResponseFormatter.SearchHitTuple, IJsonFormatterResolver, IDictionary<string, IResponse>>>();
42+
// Action<MultiSearchResponseFormatter.SearchHitTuple, IJsonFormatterResolver, IDictionary<string, IElasticsearchResponse>>>();
4343
}
4444

4545
//internal ConcurrentDictionary<Type, Action<MultiGetResponseFormatter.MultiHitTuple, IJsonFormatterResolver, ICollection<IMultiGetHit<object>>>
4646
// >
4747
// CreateMultiHitDelegates { get; }
4848

4949
//internal ConcurrentDictionary<Type,
50-
// Action<MultiSearchResponseFormatter.SearchHitTuple, IJsonFormatterResolver, IDictionary<string, IResponse>>>
50+
// Action<MultiSearchResponseFormatter.SearchHitTuple, IJsonFormatterResolver, IDictionary<string, IElasticsearchResponse>>>
5151
// CreateSearchResponseDelegates { get; }
5252

5353
private FieldResolver FieldResolver { get; }

src/Elastic.Clients.Elasticsearch/Common/Response/ExistsResponseBase.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace Elastic.Clients.Elasticsearch
88
{
9-
public abstract class ExistsResponseBase : ResponseBase
9+
public abstract class ExistsResponseBase : ElasticsearchResponseBase
1010
{
1111
public bool Exists => ApiCall is {Success: true, HttpStatusCode: 200};
1212
}

src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<Nullable>annotations</Nullable>
1818
</PropertyGroup>
1919
<ItemGroup>
20-
<PackageReference Include="Elastic.Transport" Version="0.3.1" />
20+
<PackageReference Include="Elastic.Transport" Version="0.3.2" />
2121
<PackageReference Condition="'$(TargetFramework)' == 'netstandard2.0'" Include="System.Reflection.Emit" Version="4.3.0" />
2222
<PackageReference Condition="'$(TargetFramework)' == 'netstandard2.0'" Include="System.Reflection.Emit.Lightweight" Version="4.3.0" />
2323
</ItemGroup>

src/Elastic.Clients.Elasticsearch/Helpers/BulkAllObservable.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ private async Task<BulkAllResponse> RetryDocuments(long page, int backOffRetries
238238
return await BulkAsync(retryDocuments, page, backOffRetries).ConfigureAwait(false);
239239
}
240240

241-
private Exception ThrowOnBadBulk(IResponse response, string message)
241+
private Exception ThrowOnBadBulk(IElasticsearchResponse response, string message)
242242
{
243243
_incrementFailed();
244244
_partitionedBulkRequest.BackPressure?.Release();

src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch.AsyncSearch
2424
{
25-
public partial class AsyncSearchStatusResponse : ResponseBase
25+
public partial class AsyncSearchStatusResponse : ElasticsearchResponseBase
2626
{
2727
[JsonInclude]
2828
[JsonPropertyName("completion_status")]

src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/DeleteAsyncSearchResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch.AsyncSearch
2424
{
25-
public partial class DeleteAsyncSearchResponse : ResponseBase
25+
public partial class DeleteAsyncSearchResponse : ElasticsearchResponseBase
2626
{
2727
[JsonInclude]
2828
[JsonPropertyName("acknowledged")]

src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch
2424
{
25-
public partial class BulkResponse : ResponseBase
25+
public partial class BulkResponse : ElasticsearchResponseBase
2626
{
2727
[JsonInclude]
2828
[JsonPropertyName("errors")]

src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch
2424
{
25-
public partial class ClosePointInTimeResponse : ResponseBase
25+
public partial class ClosePointInTimeResponse : ElasticsearchResponseBase
2626
{
2727
[JsonInclude]
2828
[JsonPropertyName("num_freed")]

src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterAllocationExplainResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch.Cluster
2424
{
25-
public partial class ClusterAllocationExplainResponse : ResponseBase
25+
public partial class ClusterAllocationExplainResponse : ElasticsearchResponseBase
2626
{
2727
[JsonInclude]
2828
[JsonPropertyName("allocate_explanation")]

src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterHealthResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch.Cluster
2424
{
25-
public partial class ClusterHealthResponse : ResponseBase
25+
public partial class ClusterHealthResponse : ElasticsearchResponseBase
2626
{
2727
[JsonInclude]
2828
[JsonPropertyName("active_primary_shards")]

src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterPendingTasksResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch.Cluster
2424
{
25-
public partial class ClusterPendingTasksResponse : ResponseBase
25+
public partial class ClusterPendingTasksResponse : ElasticsearchResponseBase
2626
{
2727
[JsonInclude]
2828
[JsonPropertyName("tasks")]

src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterStateResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch.Cluster
2424
{
25-
public partial class ClusterStateResponse : ResponseBase
25+
public partial class ClusterStateResponse : ElasticsearchResponseBase
2626
{
2727
}
2828
}

src/Elastic.Clients.Elasticsearch/_Generated/Api/CountResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch
2424
{
25-
public partial class CountResponse : ResponseBase
25+
public partial class CountResponse : ElasticsearchResponseBase
2626
{
2727
[JsonInclude]
2828
[JsonPropertyName("count")]

src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch
2424
{
25-
public partial class CreateResponse : ResponseBase
25+
public partial class CreateResponse : ElasticsearchResponseBase
2626
{
2727
[JsonInclude]
2828
[JsonPropertyName("forced_refresh")]

src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch
2424
{
25-
public partial class DeleteResponse : ResponseBase
25+
public partial class DeleteResponse : ElasticsearchResponseBase
2626
{
2727
[JsonInclude]
2828
[JsonPropertyName("forced_refresh")]

src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/DeleteEqlResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch.Eql
2424
{
25-
public partial class DeleteEqlResponse : ResponseBase
25+
public partial class DeleteEqlResponse : ElasticsearchResponseBase
2626
{
2727
[JsonInclude]
2828
[JsonPropertyName("acknowledged")]

src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetStatusResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch.Eql
2424
{
25-
public partial class EqlGetStatusResponse : ResponseBase
25+
public partial class EqlGetStatusResponse : ElasticsearchResponseBase
2626
{
2727
[JsonInclude]
2828
[JsonPropertyName("completion_status")]

src/Elastic.Clients.Elasticsearch/_Generated/Api/GetResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch
2424
{
25-
public partial class GetResponse<TDocument> : ResponseBase
25+
public partial class GetResponse<TDocument> : ElasticsearchResponseBase
2626
{
2727
[JsonInclude]
2828
[JsonPropertyName("fields")]

src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch.IndexManagement
2424
{
25-
public partial class DeleteResponse : ResponseBase
25+
public partial class DeleteResponse : ElasticsearchResponseBase
2626
{
2727
[JsonInclude]
2828
[JsonPropertyName("acknowledged")]

src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RefreshResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch.IndexManagement
2424
{
25-
public partial class RefreshResponse : ResponseBase
25+
public partial class RefreshResponse : ElasticsearchResponseBase
2626
{
2727
[JsonInclude]
2828
[JsonPropertyName("_shards")]

src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch
2424
{
25-
public partial class IndexResponse : ResponseBase
25+
public partial class IndexResponse : ElasticsearchResponseBase
2626
{
2727
[JsonInclude]
2828
[JsonPropertyName("forced_refresh")]

src/Elastic.Clients.Elasticsearch/_Generated/Api/OpenPointInTimeResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch
2424
{
25-
public partial class OpenPointInTimeResponse : ResponseBase
25+
public partial class OpenPointInTimeResponse : ElasticsearchResponseBase
2626
{
2727
[JsonInclude]
2828
[JsonPropertyName("id")]

src/Elastic.Clients.Elasticsearch/_Generated/Api/PingResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch
2424
{
25-
public partial class PingResponse : ResponseBase
25+
public partial class PingResponse : ElasticsearchResponseBase
2626
{
2727
}
2828
}

src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch
2424
{
25-
public partial class SearchResponse<TDocument> : ResponseBase
25+
public partial class SearchResponse<TDocument> : ElasticsearchResponseBase
2626
{
2727
[JsonInclude]
2828
[JsonPropertyName("aggregations")]

src/Elastic.Clients.Elasticsearch/_Generated/Api/SourceResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch
2424
{
25-
public partial class SourceResponse<TDocument> : ResponseBase
25+
public partial class SourceResponse<TDocument> : ElasticsearchResponseBase
2626
{
2727
}
2828
}

src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/SqlClearCursorResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch.Sql
2424
{
25-
public partial class SqlClearCursorResponse : ResponseBase
25+
public partial class SqlClearCursorResponse : ElasticsearchResponseBase
2626
{
2727
[JsonInclude]
2828
[JsonPropertyName("succeeded")]

src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/SqlDeleteAsyncResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch.Sql
2424
{
25-
public partial class SqlDeleteAsyncResponse : ResponseBase
25+
public partial class SqlDeleteAsyncResponse : ElasticsearchResponseBase
2626
{
2727
[JsonInclude]
2828
[JsonPropertyName("acknowledged")]

src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/SqlGetAsyncResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch.Sql
2424
{
25-
public partial class SqlGetAsyncResponse : ResponseBase
25+
public partial class SqlGetAsyncResponse : ElasticsearchResponseBase
2626
{
2727
[JsonInclude]
2828
[JsonPropertyName("columns")]

src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/SqlGetAsyncStatusResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch.Sql
2424
{
25-
public partial class SqlGetAsyncStatusResponse : ResponseBase
25+
public partial class SqlGetAsyncStatusResponse : ElasticsearchResponseBase
2626
{
2727
[JsonInclude]
2828
[JsonPropertyName("completion_status")]

src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/SqlQueryResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch.Sql
2424
{
25-
public partial class SqlQueryResponse : ResponseBase
25+
public partial class SqlQueryResponse : ElasticsearchResponseBase
2626
{
2727
[JsonInclude]
2828
[JsonPropertyName("columns")]

src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/GetTasksResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch.Tasks
2424
{
25-
public partial class GetTasksResponse : ResponseBase
25+
public partial class GetTasksResponse : ElasticsearchResponseBase
2626
{
2727
[JsonInclude]
2828
[JsonPropertyName("completed")]

0 commit comments

Comments
 (0)