Skip to content

Commit c2be3ce

Browse files
committed
[ksqlDb.RestApi.Client.Protobuf]: upgrade to .NET 9 and removed unsupported .NET 6
1 parent 339324f commit c2be3ce

File tree

5 files changed

+58
-51
lines changed

5 files changed

+58
-51
lines changed
Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
1-
using ksqlDB.RestApi.Client.KSql.Query.Context;
1+
using ksqlDb.RestApi.Client.FluentAPI.Builders;
2+
using ksqlDB.RestApi.Client.KSql.Query.Context;
23
using ksqlDb.RestApi.Client.KSql.Query.Context.Options;
34
using ksqlDB.RestApi.Client.KSql.RestApi.Http;
45
using ksqlDb.RestApi.Client.ProtoBuf.KSql.RestApi;
56
using ksqlDb.RestApi.Client.ProtoBuf.Tests.Helpers;
67

78
namespace ksqlDb.RestApi.Client.ProtoBuf.Tests.KSql.RestApi;
89

9-
internal class TestableKSqlDbQueryProvider : KSqlDbQueryProvider
10+
internal class TestableKSqlDbQueryProvider(IHttpV1ClientFactory httpClientFactory)
11+
: KSqlDbQueryProvider(httpClientFactory, new ModelBuilder(), KSqlDbContextOptionsInstance)
1012
{
1113
public static readonly KSqlDBContextOptions KSqlDbContextOptionsInstance = new(TestParameters.KsqlDbUrl)
1214
{
1315
JsonSerializerOptions = KSqlDbJsonSerializerOptions.CreateInstance()
1416
};
1517

16-
public TestableKSqlDbQueryProvider(IHttpV1ClientFactory httpClientFactory)
17-
: base(httpClientFactory, KSqlDbContextOptionsInstance)
18-
{
19-
}
20-
2118
protected string QueryResponse =
2219
"[{\"header\":{\"queryId\":\"transient_MOVIES_8790538776625545898\",\"schema\":\"`ID` INTEGER, `TITLE` STRING, `RELEASE_YEAR` INTEGER\",\"protoSchema\":\"syntax = \\\"proto3\\\";\\n\\nmessage ConnectDefault1 {\\n int32 ID = 1;\\n string TITLE = 2;\\n int32 RELEASE_YEAR = 3;\\n}\\n\"}}," +
2320
"\r\n{\"row\":{\"protobufBytes\":\"CgZBbGllbnMQARjCDw==\"}},"+
@@ -27,4 +24,4 @@ protected override HttpClient OnCreateHttpClient()
2724
{
2825
return FakeHttpClient.CreateWithResponse(QueryResponse);
2926
}
30-
}
27+
}

ksqlDb.RestApi.Client.ProtoBuf/ChangeLog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# ksqlDB.RestApi.Client.ProtoBuf
22

3+
# 5.0.0
4+
- added .NET 9.0 target framework
5+
6+
# ⚠️ Breaking changes
7+
- removed unsupported .NET 6.0 target framework
8+
- upgraded `ksqlDb.RestApi.Client` to v7.0.0
9+
310
# 4.0.0
411
- ksqlDb.RestApi.Client upgraded to v6.0.0
512

ksqlDb.RestApi.Client.ProtoBuf/KSql/RestApi/KSqlDbQueryProvider.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
using System.Net;
1+
using System.Net;
22
using System.Text.Json;
3+
using ksqlDb.RestApi.Client.FluentAPI.Builders;
34
using ksqlDb.RestApi.Client.KSql.Query.Context.Options;
45
using ksqlDB.RestApi.Client.KSql.RestApi;
56
using ksqlDB.RestApi.Client.KSql.RestApi.Query;
@@ -11,10 +12,10 @@
1112

1213
namespace ksqlDb.RestApi.Client.ProtoBuf.KSql.RestApi;
1314

14-
internal class KSqlDbQueryProvider : KSqlDbProvider
15+
internal class KSqlDbQueryProvider : KSqlDbProvider
1516
{
16-
public KSqlDbQueryProvider(IHttpClientFactory httpClientFactory, KSqlDbProviderOptions options, ILogger? logger = null)
17-
: base(httpClientFactory, options, logger)
17+
public KSqlDbQueryProvider(IHttpClientFactory httpClientFactory, IMetadataProvider metadataProvider, KSqlDbProviderOptions options, ILogger? logger = null)
18+
: base(httpClientFactory, metadataProvider, options, logger)
1819
{
1920
#if NETCOREAPP3_1
2021
AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);
@@ -119,4 +120,4 @@ private static Stream GenerateStreamFromString(string rawData)
119120

120121
return stream;
121122
}
122-
}
123+
}
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
using ksqlDb.RestApi.Client.KSql.Query.Context.Options;
1+
using ksqlDb.RestApi.Client.FluentAPI.Builders;
2+
using ksqlDb.RestApi.Client.KSql.Query.Context.Options;
23
using Microsoft.Extensions.Logging;
34
using IHttpClientFactory = ksqlDB.RestApi.Client.KSql.RestApi.Http.IHttpClientFactory;
45

56
namespace ksqlDb.RestApi.Client.ProtoBuf.KSql.RestApi;
67

78
internal class KSqlDbQueryStreamProvider : KSqlDbQueryProvider
89
{
9-
public KSqlDbQueryStreamProvider(IHttpClientFactory httpClientFactory, KSqlDbProviderOptions options, ILogger? logger = null)
10-
: base(httpClientFactory, options, logger)
10+
public KSqlDbQueryStreamProvider(IHttpClientFactory httpClientFactory, IMetadataProvider metadataProvider, KSqlDbProviderOptions options, ILogger? logger = null)
11+
: base(httpClientFactory, metadataProvider, options, logger)
1112
{
1213
}
1314

1415
protected override string QueryEndPointName => "query-stream";
15-
}
16+
}
Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,44 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks>
5-
<Authors>Tomas Fabian</Authors>
6-
<Company />
7-
<PackageProjectUrl>https://github.com/tomasfabian/ksqlDB.RestApi.Client-DotNet/tree/main/ksqlDb.RestApi.Client.ProtoBuf</PackageProjectUrl>
8-
<RepositoryUrl>https://github.com/tomasfabian/ksqlDB.RestApi.Client-DotNet</RepositoryUrl>
9-
<Copyright>@tomasfabian</Copyright>
10-
<Description>
3+
<PropertyGroup>
4+
<TargetFrameworks>net9.0</TargetFrameworks>
5+
<!-- <TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks> -->
6+
<Authors>Tomas Fabian</Authors>
7+
<Company />
8+
<PackageProjectUrl>https://github.com/tomasfabian/ksqlDB.RestApi.Client-DotNet/tree/main/ksqlDb.RestApi.Client.ProtoBuf</PackageProjectUrl>
9+
<RepositoryUrl>https://github.com/tomasfabian/ksqlDB.RestApi.Client-DotNet</RepositoryUrl>
10+
<Copyright>@tomasfabian</Copyright>
11+
<Description>
1112
ksqlDB.RestApi.Client.ProtoBuf adds support for Protobuf content type. ksqlDB.RestApi.Client is a C# LINQ-enabled client API for issuing and consuming ksqlDB push queries.
1213
Targets .NET 7, .NET 8, and .NET 9.
1314
Documentation for the library can be found at https://github.com/tomasfabian/ksqlDB.RestApi.Client-DotNet/blob/main/README.md.
1415
</Description>
15-
<PackageTags>ksql ksqlDB ProtoBuf LINQ .NET csharp push query</PackageTags>
16-
<Version>4.0.0</Version>
17-
<AssemblyVersion>4.0.0.0</AssemblyVersion>
18-
<LangVersion>13.0</LangVersion>
19-
<ImplicitUsings>enable</ImplicitUsings>
20-
<Nullable>enable</Nullable>
21-
<PackageReleaseNotes>https://github.com/tomasfabian/ksqlDB.RestApi.Client-DotNet/blob/main/ksqlDb.RestApi.Client.ProtoBuf/ChangeLog.md</PackageReleaseNotes>
22-
<PackageLicenseExpression>MIT</PackageLicenseExpression>
23-
<PackageReadmeFile>README.md</PackageReadmeFile>
24-
</PropertyGroup>
25-
26-
<ItemGroup>
27-
<!-- <PackageReference Include="ksqlDb.RestApi.Client" Version="7.0.0" /> -->
28-
<ProjectReference Include="..\ksqlDb.RestApi.Client\ksqlDb.RestApi.Client.csproj" />
29-
<PackageReference Include="protobuf-net" Version="3.2.0" />
30-
</ItemGroup>
16+
<PackageTags>ksql ksqlDB ProtoBuf LINQ .NET csharp push query</PackageTags>
17+
<Version>5.0.0</Version>
18+
<AssemblyVersion>5.0.0.0</AssemblyVersion>
19+
<LangVersion>13.0</LangVersion>
20+
<ImplicitUsings>enable</ImplicitUsings>
21+
<Nullable>enable</Nullable>
22+
<PackageReleaseNotes>https://github.com/tomasfabian/ksqlDB.RestApi.Client-DotNet/blob/main/ksqlDb.RestApi.Client.ProtoBuf/ChangeLog.md</PackageReleaseNotes>
23+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
24+
<PackageReadmeFile>README.md</PackageReadmeFile>
25+
</PropertyGroup>
3126

32-
<ItemGroup>
33-
<InternalsVisibleTo Include="ksqlDb.RestApi.Client.ProtoBuf.Tests" />
34-
</ItemGroup>
27+
<ItemGroup>
28+
<!-- <PackageReference Include="ksqlDb.RestApi.Client" Version="7.0.0" /> -->
29+
<ProjectReference Include="..\ksqlDb.RestApi.Client\ksqlDb.RestApi.Client.csproj" />
30+
<PackageReference Include="protobuf-net" Version="3.2.0" />
31+
</ItemGroup>
3532

36-
<ItemGroup>
37-
<None Include="..\README.md">
38-
<Pack>True</Pack>
39-
<PackagePath>\</PackagePath>
40-
</None>
41-
</ItemGroup>
33+
<ItemGroup>
34+
<InternalsVisibleTo Include="ksqlDb.RestApi.Client.ProtoBuf.Tests" />
35+
</ItemGroup>
4236

43-
</Project>
37+
<ItemGroup>
38+
<None Include="..\README.md">
39+
<Pack>True</Pack>
40+
<PackagePath>\</PackagePath>
41+
</None>
42+
</ItemGroup>
43+
44+
</Project>

0 commit comments

Comments
 (0)