From 17e98700ff3be16a23a720780c7dac616b7c79a5 Mon Sep 17 00:00:00 2001 From: Vlad Gorodetsky Date: Wed, 5 Aug 2020 07:10:44 +0300 Subject: [PATCH] Add support for Kafka 2.6.0 --- .github/workflows/ci.yml | 4 ++-- .golangci.yml | 4 +++- README.md | 2 +- utils.go | 4 +++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 062b76c7d3..11a0c3a421 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: fail-fast: false matrix: go-version: [1.14.x] - kafka-version: [2.4.1, 2.5.0] + kafka-version: [2.4.1, 2.6.0] platform: [ubuntu-latest] env: @@ -41,7 +41,7 @@ jobs: - name: Install dependencies run: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.27.0 + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0 export REPOSITORY_ROOT=${GITHUB_WORKSPACE} - name: Run test suite diff --git a/.golangci.yml b/.golangci.yml index 077ef653f6..ce2b5230d6 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -66,10 +66,12 @@ linters: - varcheck - whitespace # - goconst - # - gochecknoinits + - gochecknoinits issues: exclude: - consider giving a name to these results - include an explanation for nolint directive - Potential Integer overflow made by strconv.Atoi result conversion to int16/32 + - Use of weak random number generator + - TLS MinVersion too low diff --git a/README.md b/README.md index a3dd59056a..38d39695b7 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ You might also want to look at the [Frequently Asked Questions](https://github.c Sarama provides a "2 releases + 2 months" compatibility guarantee: we support the two latest stable releases of Kafka and Go, and we provide a two month grace period for older releases. This means we currently officially support -Go 1.12 through 1.14, and Kafka 2.3 through 2.5, although older releases are +Go 1.13 through 1.14, and Kafka 2.4 through 2.6, although older releases are still likely to work. Sarama follows semantic versioning and provides API stability via the gopkg.in service. diff --git a/utils.go b/utils.go index d138a5eb32..93bdeefef6 100644 --- a/utils.go +++ b/utils.go @@ -161,6 +161,7 @@ var ( V2_3_0_0 = newKafkaVersion(2, 3, 0, 0) V2_4_0_0 = newKafkaVersion(2, 4, 0, 0) V2_5_0_0 = newKafkaVersion(2, 5, 0, 0) + V2_6_0_0 = newKafkaVersion(2, 6, 0, 0) SupportedVersions = []KafkaVersion{ V0_8_2_0, @@ -187,9 +188,10 @@ var ( V2_3_0_0, V2_4_0_0, V2_5_0_0, + V2_6_0_0, } MinVersion = V0_8_2_0 - MaxVersion = V2_5_0_0 + MaxVersion = V2_6_0_0 ) //ParseKafkaVersion parses and returns kafka version or error from a string