Browse Source

Add support for Kafka 2.6.0

Vlad Gorodetsky 3 years ago
parent
commit
dc17426238
5 changed files with 10 additions and 6 deletions
  1. 2 2
      .github/workflows/ci.yml
  2. 3 1
      .golangci.yml
  3. 1 1
      README.md
  4. 1 1
      functional_test.go
  5. 3 1
      utils.go

+ 2 - 2
.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

+ 3 - 1
.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

+ 1 - 1
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.

+ 1 - 1
functional_test.go

@@ -119,7 +119,7 @@ func prepareDockerTestEnvironment(ctx context.Context, env *testEnvironment) err
 	// found here: https://docs.confluent.io/current/installation/versions-interoperability.html
 	var confluentPlatformVersion string
 	switch env.KafkaVersion {
-	case "2.5.0":
+	case "2.6.0":
 		confluentPlatformVersion = "5.5.0"
 	case "2.4.1":
 		confluentPlatformVersion = "5.4.2"

+ 3 - 1
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