Skip to content

Commit

Permalink
[FAB-7873] Update sarama kafka client to v1.15.0
Browse files Browse the repository at this point in the history
- even more forgiving kafka version parsing
- removed default Kafka.Version from orderer.yaml
- kept default value of Kafka.Version in orderer binary as 0.10.2.0
  (future changeset to move this to 1.0.0 once kafka image has
   been updated)

Change-Id: I9220fccd6ebb03529458367c21dd0256483abb8c
Signed-off-by: Luis Sanchez <sanchezl@us.ibm.com>
  • Loading branch information
Luis Sanchez committed Jan 24, 2018
1 parent 88fd880 commit 90df55d
Show file tree
Hide file tree
Showing 19 changed files with 410 additions and 78 deletions.
3 changes: 2 additions & 1 deletion common/viperutil/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ func TestKafkaVersionDecode(t *testing.T) {
{"1", sarama.V1_0_0_0, false},
{"1.0", sarama.V1_0_0_0, false},
{"1.0.0", sarama.V1_0_0_0, false},
{"1.0.1", sarama.V1_0_0_0, true},
{"1.0.1", sarama.V1_0_0_0, false},
{"2.0.0", sarama.V1_0_0_0, false},
{"Malformed", sarama.KafkaVersion{}, true},
}

Expand Down
2 changes: 1 addition & 1 deletion common/viperutil/config_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func init() {
kafkaVersionConstraints[sarama.V0_10_1_0], _ = version.NewConstraint(">=0.10.1.0,<0.10.2.0")
kafkaVersionConstraints[sarama.V0_10_2_0], _ = version.NewConstraint(">=0.10.2.0,<0.11.0.0")
kafkaVersionConstraints[sarama.V0_11_0_0], _ = version.NewConstraint(">=0.11.0.0,<1.0.0")
kafkaVersionConstraints[sarama.V1_0_0_0], _ = version.NewConstraint(">=1.0.0,<1.0.1")
kafkaVersionConstraints[sarama.V1_0_0_0], _ = version.NewConstraint(">=1.0.0")
}

func kafkaVersionDecodeHook() mapstructure.DecodeHookFunc {
Expand Down
2 changes: 1 addition & 1 deletion sampleconfig/orderer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ Kafka:

# Kafka protocol version used to communicate with the Kafka cluster brokers
# (defaults to 0.10.2.0 if not specified)
Version: 0.10.2.0
Version:

################################################################################
#
Expand Down
26 changes: 26 additions & 0 deletions vendor/github.com/Shopify/sarama/CHANGELOG.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions vendor/github.com/Shopify/sarama/broker.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

121 changes: 121 additions & 0 deletions vendor/github.com/Shopify/sarama/create_partitions_request.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

94 changes: 94 additions & 0 deletions vendor/github.com/Shopify/sarama/create_partitions_response.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions vendor/github.com/Shopify/sarama/dev.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 90df55d

Please sign in to comment.