Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
13ea866
Fix validation of SSL CA Certificate for DEK Registry client (#2348)
rayokota Nov 18, 2024
cfafad4
Include librdkafka 2.6.1 changelog link (#2354)
anchitj Nov 18, 2024
b2e4bfd
Add retry logic to RestService (#2353)
rayokota Nov 18, 2024
0e4765b
Add config for validating payloads against JSON Schema (#2350)
rayokota Nov 18, 2024
0923761
Update changelog for SR 2.6.1 (#2355)
rayokota Nov 19, 2024
4fe8bbd
Retrieve version for writer schema when getting migrations (#2358)
rayokota Nov 19, 2024
d0f8753
Mark some deprecated properties as obsolete in Schema (#2359)
rayokota Nov 19, 2024
97cdbd6
Add test for JSON with definition (#2363)
rayokota Nov 25, 2024
84f4e32
MINOR refactor env var lookup for consistency with other repos (#2368)
rayokota Nov 26, 2024
7d82888
Add Kafka Core to Third-Party Libraries (#2361)
ffernandolima Nov 29, 2024
224a561
Improve lock utilization on the consumer hot path (#2370)
Havret Dec 2, 2024
35b8f99
Improve perf of base64 encoding check on a consumer hot path (#2371)
Havret Dec 2, 2024
8656b58
Add missing validate check (#2372)
rayokota Dec 3, 2024
1a33645
Fix null reference exception (#2373)
rayokota Dec 4, 2024
16367a7
Ensure different key ids use different client instances (#2374)
rayokota Dec 4, 2024
3067153
DGS-19008: Add PR template (#2375)
GunalKupta Dec 5, 2024
16456fd
Set skipKnownTypes default to be consistent with other clients (#2376)
rayokota Dec 6, 2024
87979d8
Add ability to override disable flag and actions on a rule (#2377)
rayokota Dec 10, 2024
e759ac5
ci
marcin-krystianc Dec 12, 2024
331f867
ci (#1)
marcin-krystianc Dec 12, 2024
88681af
ci2
marcin-krystianc Dec 12, 2024
b0fb2bb
Merge remote-tracking branch 'marcin-krystianc/master' into dev-20241…
marcin-krystianc Dec 12, 2024
5448e5c
no branches
marcin-krystianc Dec 12, 2024
d8bae45
build
marcin-krystianc Dec 12, 2024
3526d6e
removing docfx
marcin-krystianc Dec 12, 2024
b72aa5c
only Confluent.Kafka
marcin-krystianc Dec 12, 2024
7f499d8
explicit dotnet test
marcin-krystianc Dec 12, 2024
9fc39e5
make
marcin-krystianc Dec 12, 2024
ca66707
suffix vsuffix
marcin-krystianc Dec 12, 2024
ae85d5e
rename
marcin-krystianc Dec 13, 2024
33e6613
no assembly signing
marcin-krystianc Dec 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!--
Suggested PR template: Fill/delete/add sections as needed. Optionally delete any commented block.
-->
What
----
<!--
Briefly describe **what** you have changed and **why**.
Optionally include implementation strategy.
-->

Checklist
------------------
- [ ] Contains customer facing changes? Including API/behavior changes <!-- This can help identify if it has introduced any breaking changes -->
- [ ] Did you add sufficient unit test and/or integration test coverage for this PR?
- If not, please explain why it is not required

References
----------
JIRA:
<!--
Copy&paste links: to Jira ticket, other PRs, issues, Slack conversations...
For code bumps: link to PR, tag or GitHub `/compare/master...master`
-->

Test & Review
------------
<!--
Has it been tested? how?
Copy&paste any handy instructions, steps or requirements that can save time to the reviewer or any reader.
-->

Open questions / Follow-ups
--------------------------
<!--
Optional: anything open to discussion for the reviewer, out of scope, or follow-ups.
-->

<!--
Review stakeholders
------------------
<!--
Optional: mention stakeholders or if special context that is required to review.
-->
98 changes: 98 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: 'confluent-kafka-dotnet build pipeline'

env:
CONFIGURATION: Release
DOTNET_CLI_TELEMETRY_OPTOUT: 'true'

on:
push:
pull_request:

jobs:
linux-build:
name: 'Linux x64'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: Build and test
run: |
dotnet restore
make build
make test

osx-build:
name: 'OSX x64'
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: Set ulimit
run: ulimit -n 1024
- name: Build and test
run: |
dotnet restore
make build
make test

windows-build:
name: 'Windows x64'
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.403'
- name: Build and test
run: |
dotnet restore
dotnet test -c $env:CONFIGURATION test/Confluent.Kafka.UnitTests/Confluent.Kafka.UnitTests.csproj
# dotnet test -c $env:CONFIGURATION test/Confluent.SchemaRegistry.UnitTests/Confluent.SchemaRegistry.UnitTests.csproj
# dotnet test -c $env:CONFIGURATION test/Confluent.SchemaRegistry.Serdes.UnitTests/Confluent.SchemaRegistry.Serdes.UnitTests.csproj

windows-artifacts:
name: 'Windows Artifacts'
needs: windows-build
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.403'
- name: Install DocFX
run: dotnet tool update -g docfx
- name: Build and create packages
run: |
dotnet restore
dotnet build Confluent.Kafka.sln -c $env:CONFIGURATION

# Different packaging for tagged vs untagged builds
if ($env:GITHUB_REF -match '^refs/tags/') {
$suffix = ""
$vsuffix = ""
} else {
$suffix = "ci-$env:GITHUB_RUN_ID"
$vsuffix = "--version-suffix"
}

dotnet pack src/Confluent.Kafka/Confluent.Kafka.csproj --output artifacts -c $env:CONFIGURATION $vsuffix $suffix
# dotnet pack src/Confluent.SchemaRegistry/Confluent.SchemaRegistry.csproj -c $env:CONFIGURATION $suffix --output artifacts
# dotnet pack src/Confluent.SchemaRegistry.Serdes.Avro/Confluent.SchemaRegistry.Serdes.Avro.csproj -c $env:CONFIGURATION $suffix --output artifacts
# dotnet pack src/Confluent.SchemaRegistry.Serdes.Protobuf/Confluent.SchemaRegistry.Serdes.Protobuf.csproj -c $env:CONFIGURATION $suffix --output artifacts
# dotnet pack src/Confluent.SchemaRegistry.Serdes.Json/Confluent.SchemaRegistry.Serdes.Json.csproj -c $env:CONFIGURATION $suffix --output artifacts

# docfx doc/docfx.json
# tar -czf artifacts/docs-$env:GITHUB_RUN_ID.zip doc/_site/*
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: artifacts/
60 changes: 60 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: 'Integration Tests'

env:
CONFIGURATION: Release
DOTNET_CLI_TELEMETRY_OPTOUT: 'true'
SEMAPHORE_SKIP_FLAKY_TESTS: 'true'

on:
push:
pull_request:

jobs:
integration-tests:
name: 'Integration tests'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_APIKEY }}

- name: Classic Protocol Tests
run: |
cd test/docker && docker-compose up -d && sleep 30 && cd ../..
dotnet restore
cd test/Confluent.Kafka.IntegrationTests && dotnet test -l "console;verbosity=normal" && cd ../..

- name: Consumer Protocol Tests
run: |
cd test/docker && docker-compose -f docker-compose-kraft.yaml up -d && cd ../..
sleep 300
export TEST_CONSUMER_GROUP_PROTOCOL=consumer
dotnet restore
cd test/Confluent.Kafka.IntegrationTests && dotnet test -l "console;verbosity=normal" && cd ../..

schema-registry-tests:
name: 'Schema registry and serdes integration tests'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_APIKEY }}
- name: Run Tests
run: |
cd test/docker && docker-compose up -d && cd ../..
dotnet restore
cd test/Confluent.SchemaRegistry.Serdes.IntegrationTests && dotnet test -l "console;verbosity=normal" && cd ../..
1 change: 1 addition & 0 deletions 3RD_PARTY.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ To add your project, open a pull request!
- [Multi Schema Avro Deserializer](https://github.com/ycherkes/multi-schema-avro-desrializer) - Avro deserializer for reading messages serialized with multiple schemas.
- [OpenSleigh.Transport.Kafka](https://github.com/mizrael/OpenSleigh/tree/develop/src/OpenSleigh.Transport.Kafka) - A Kafka Transport for OpenSleigh, a distributed saga management library.
- [SlimMessageBus.Host.Kafka](https://github.com/zarusz/SlimMessageBus) - Apache Kafka transport for SlimMessageBus (lightweight message bus for .NET)
- [Kafka Core](https://github.com/ffernandolima/confluent-kafka-core-dotnet) - Kafka Core empowers developers to build robust .NET applications on top of Confluent Kafka, focusing on simplicity, maintainability, and extensibility with intuitive abstractions and builders.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@

## Enhancements

* References librdkafka.redist 2.6.1. Refer to the [librdkafka v2.6.1 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.6.1) for more information.

## Fixes

* Fix to continue supporting .NET Framework 4.6.2+ in core client library (#2342).
* Fix JSON Schema handling to not require use of `$id` (#2339).
* Update Caching.Memory to 8.0.1 to address CVE (#23440.
* Added Qualified and Custom reference name strategy approaches for protobuf references (#2345).
* Fix validate of SSL CA certs in Schema Registry client (#2346).
* Skip SSL certs validation when configured in Schema Registry client (#2347).
* Allow proxy to be specified in Schema Registry client (#2348).


# 2.6.0
Expand Down
6 changes: 2 additions & 4 deletions src/Confluent.Kafka/Confluent.Kafka.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@
<PackageIconUrl>https://raw.githubusercontent.com/confluentinc/confluent-kafka-dotnet/master/confluent-logo.png</PackageIconUrl>
<PackageReleaseNotes>https://github.com/confluentinc/confluent-kafka-dotnet/releases</PackageReleaseNotes>
<PackageTags>Kafka;Confluent;librdkafka</PackageTags>
<PackageId>Confluent.Kafka</PackageId>
<PackageId>Confluent.Kafka.MK</PackageId>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Title>Confluent.Kafka</Title>
<AssemblyName>Confluent.Kafka</AssemblyName>
<AssemblyName>Confluent.Kafka.MK</AssemblyName>
<VersionPrefix>2.6.1</VersionPrefix>
<TargetFrameworks>netstandard2.0;net462;net6.0;net8.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>Confluent.Kafka.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Confluent.SchemaRegistry.Encryption.Aws/AwsKmsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class AwsKmsClient : IKmsClient
{
private AmazonKeyManagementServiceClient kmsClient;
private string keyId;

public string KekId { get; }

public AwsKmsClient(string kekId, AWSCredentials credentials)
Expand All @@ -36,7 +36,7 @@ public AwsKmsClient(string kekId, AWSCredentials credentials)

public bool DoesSupport(string uri)
{
return uri.StartsWith(AwsKmsDriver.Prefix);
return KekId == uri;
}

public async Task<byte[]> Encrypt(byte[] plaintext)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public AzureKmsClient(string kekId, TokenCredential tokenCredential)

public bool DoesSupport(string uri)
{
return uri.StartsWith(AzureKmsDriver.Prefix);
return KekId == uri;
}

public async Task<byte[]> Encrypt(byte[] plaintext)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public GcpKmsClient(string kekId, GoogleCredential credential)

public bool DoesSupport(string uri)
{
return uri.StartsWith(GcpKmsDriver.Prefix);
return KekId == uri;
}

public async Task<byte[]> Encrypt(byte[] plaintext)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ public class HcVaultKmsClient : IKmsClient

public HcVaultKmsClient(string kekId, string ns, string tokenId)
{
if (tokenId == null)
{
tokenId = Environment.GetEnvironmentVariable("VAULT_TOKEN");
ns = Environment.GetEnvironmentVariable("VAULT_NAMESPACE");
}
KekId = kekId;
Namespace = ns;
TokenId = tokenId;
Expand Down Expand Up @@ -53,7 +48,7 @@ public HcVaultKmsClient(string kekId, string ns, string tokenId)

public bool DoesSupport(string uri)
{
return uri.StartsWith(HcVaultKmsDriver.Prefix);
return KekId == uri;
}

public async Task<byte[]> Encrypt(byte[] plaintext)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ public IKmsClient NewKmsClient(IDictionary<string, string> config, string keyUrl
{
config.TryGetValue(TokenId, out string tokenId);
config.TryGetValue(Namespace, out string ns);
if (tokenId == null)
{
tokenId = Environment.GetEnvironmentVariable("VAULT_TOKEN");
ns = Environment.GetEnvironmentVariable("VAULT_NAMESPACE");
}
return new HcVaultKmsClient(keyUrl, ns, tokenId);
}
}
Expand Down
Loading
Loading