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

Add Describe + AlterConfigs #1014

Merged
merged 11 commits into from
Feb 3, 2018
Merged

Add Describe + AlterConfigs #1014

merged 11 commits into from
Feb 3, 2018

Conversation

Mongey
Copy link
Contributor

@Mongey Mongey commented Dec 28, 2017

No description provided.

@Mongey Mongey changed the title Add DescribeConfigs Add Describe + AlterConfigs Dec 29, 2017
@Mongey Mongey force-pushed the cm-describe-configs branch from 14c65ba to 971d162 Compare December 29, 2017 03:33
}

type AlterConfigsResource struct {
T ResourceType
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 prefer a more useful name here... I guess Type is reserved and ResourceType is already the name of the struct, but maybe ConfigResourceType or something? Or make that the name of the struct and call the element just ResourceType?

Copy link
Contributor Author

@Mongey Mongey Jan 3, 2018

Choose a reason for hiding this comment

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

😊 I meant to do a second pass to rename this. I think we can use Type here, since it's type that's reserved

edit: Looks like Type will work, and I did start renaming. I'll finish off renaming🤦‍♂️ https://github.com/Shopify/sarama/pull/1014/files#diff-c125aeefa1915047784a716284e870f0R13


type ConfigEntryKV struct {
Name string
Value string
Copy link
Contributor

Choose a reason for hiding this comment

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

values are supposed to be nullable, this should probably be a *string or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whoops! you're right, I'll update

resource_type.go Outdated
type ResourceType int8

const (
UnknownResource ResourceType = 0
Copy link
Contributor

Choose a reason for hiding this comment

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

curious where you got this set of constants? I don't see it in the docs anywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Took me a while to track it down again. It's from KIP-133

I can add a comment in the code

@eapache
Copy link
Contributor

eapache commented Jan 2, 2018

Thanks, this looks pretty good, just a few minor things.


type AlterConfigsResourceResponse struct {
ErrorCode int16
ErrorMsg string
Copy link
Contributor Author

Choose a reason for hiding this comment

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

🤔 Maybe I should squash ErrorCode and ErrorMsg into a KError

Copy link
Contributor

Choose a reason for hiding this comment

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

It’s not clear to me from the docs whether this is a KError or if it’s some other error status set? Normally KErrors don’t include a string in the actual message, just the code.

@@ -0,0 +1,91 @@
package sarama

type Resource struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

CI is failing because there is already a type named Resource being used for the ACL stuff

@Mongey Mongey force-pushed the cm-describe-configs branch from b2aca2b to 9b166a1 Compare February 3, 2018 15:08
@Mongey Mongey force-pushed the cm-describe-configs branch from fd728c2 to 9ca6aff Compare February 3, 2018 15:56
@eapache
Copy link
Contributor

eapache commented Feb 3, 2018

Thanks!

@eapache eapache merged commit f7466ea into IBM:master Feb 3, 2018
@Mongey Mongey deleted the cm-describe-configs branch February 3, 2018 21:04
@andrejvanderzee
Copy link
Contributor

@Mongey It looks like you have everything for the terraform plugin for Kafka topics now. Great stuff really appreciate your work, if I can help you out in one way or another (code review or whatever), I would love too!

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.

3 participants