Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

updated sarama versions and base kubeless project version to fix the … #13

Merged
merged 5 commits into from
Dec 13, 2018

Conversation

dimagoldin
Copy link
Contributor

@dimagoldin dimagoldin commented Dec 8, 2018

…CRC error when using kafka version 2.0

Issue Ref: [Issue number related to this PR or None]
vmware-archive/kubeless#970
Description:
On consuming messages from kafka version 2.0, the kafka client fails with CRC mismatch errors.

[PR Description]
Version changes to sarama library to latest version that includes fixes the the bug in question.
Version change to the kubeless base project to latest stable (v1.0.0)
TODOs:

  • Ready to review
  • Automated Tests
  • Docs

@andresmgot
Copy link
Contributor

Hi @dimagoldin,

I fixed a couple of issues related to the latest kubeless but now the CI is failing because the compilation of the sarama library:

#!/bin/bash -eo pipefail
make VERSION=${CONTROLLER_TAG} binary
CGO_ENABLED=1 ./script/binary
Removing Old Kafka trigger controller binary
Build Kafka trigger controller binary
# github.com/kubeless/kafka-trigger/vendor/github.com/Shopify/sarama
vendor/github.com/Shopify/sarama/config.go:200:14: undefined: BalanceStrategy
Makefile:29: recipe for target 'binary' failed
make: *** [binary] Error 2
Exited with code 2

Have you tried to compile this locally? Maybe it's necessary to update something else?

@dimagoldin
Copy link
Contributor Author

dimagoldin commented Dec 11, 2018

@andresmgot

These are the steps i took;
updated glide.yaml with the new versions
glide update -v
make kafka-controller-image
docker tag kafka-controller-image myregistry/kafka-controller-image
docker push myregistry/kafka-controller-image

deleted the old deployment from my k8s cluster
changed k8s definitions with the the new image and the corresponding secret
deployed the new deployment to k8s cluster
created kafka trigger
published messages to topic, checked logs and saw everything is consumed and triggered perfectly

Just to make sure, i deployed the old image again, published messages and saw CRC errors.
Redeployed new one, published same messages, everything triggered correctly.

glide update or glide install (without -v) didnt work, no idea why, first time im working with glide (or golang)

@andresmgot
Copy link
Contributor

Hi @dimagoldin, the problem with glide update is that is trying to update all the dependencies, which is causing errors. Probably is working for you because you have some local dependencies that are being used. In order to fix it run:

rm -rf glide.lock vendor/
glide install -v
git add .
git commit -m "Update deps"

That will update the sarama library leaving the rest untouched. Can you try that?

@dimagoldin
Copy link
Contributor Author

dimagoldin commented Dec 12, 2018

@andresmgot
you were right, the build passes now. :)

@andresmgot
Copy link
Contributor

Thanks @dimagoldin !

@andresmgot andresmgot merged commit 672ee13 into vmware-archive:master Dec 13, 2018
@andresmgot andresmgot mentioned this pull request Dec 13, 2018
3 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants