Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ability to specify version in kafka trigger. Closes #990. #991

Merged
merged 5 commits into from
Dec 21, 2020

Conversation

whynowy
Copy link
Member

@whynowy whynowy commented Dec 12, 2020

Also defaults Kafka version to v1.0.0 which is the same as Kafka event source.

Closes #990.

Signed-off-by: Derek Wang [email protected]

Checklist:

@whynowy whynowy requested a review from VaibhavPage December 14, 2020 21:35
@whynowy whynowy requested a review from alexec December 21, 2020 03:55

// Specify what kafka version is being connected to enables certain features in sarama, defaults to 1.0.0
// +optional
Version string `json:"version" protobuf:"bytes,11,opt,name=version"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be version,omitempty

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@@ -49,6 +49,16 @@ func NewKafkaTrigger(sensor *v1alpha1.Sensor, trigger *v1alpha1.Trigger, kafkaPr
var err error
config := sarama.NewConfig()

if kafkatrigger.Version == "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add a kafkatrigger.GetVersion() (string, error)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dot not want to import sarama package into models.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point

Signed-off-by: Derek Wang <[email protected]>
@whynowy whynowy merged commit 31d3e93 into argoproj:master Dec 21, 2020
@whynowy whynowy deleted the kafka_version branch December 21, 2020 21:23
juliev0 pushed a commit to juliev0/argo-events that referenced this pull request Mar 29, 2022
… (argoproj#991)

* feat: ability to specify version in kafka trigger. Closes argoproj#990.

Signed-off-by: Derek Wang <[email protected]>

* upgrade slack version

Signed-off-by: Derek Wang <[email protected]>

* omitempty

Signed-off-by: Derek Wang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kafka trigger produces wrong timestamp
2 participants