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

fix: update version of the kafka admin SDK #848

Merged
merged 1 commit into from
Jul 28, 2021
Merged

fix: update version of the kafka admin SDK #848

merged 1 commit into from
Jul 28, 2021

Conversation

wtrocki
Copy link
Collaborator

@wtrocki wtrocki commented Jul 28, 2021

New API splits for topics/groups/acls.
I did not add ACL API yet but have concerns how to do update CLI.

We can either do this:

Screenshot 2021-07-28 at 15 46 09

Or this:

Screenshot 2021-07-28 at 15 45 37

Opinions? FIrst approach is implemented in PR

pkg/api/api.go Outdated
@@ -11,7 +11,7 @@ import (
type API struct {
Kafka func() kafkamgmtclient.DefaultApi
ServiceAccount func() kafkamgmtclient.SecurityApi
KafkaAdmin func(kafkaID string) (kafkainstanceclient.DefaultApi, *kafkamgmtclient.KafkaRequest, error)
KafkaAdmin func(kafkaID string) (kafkainstanceclient.TopicsApi, kafkainstanceclient.GroupsApi, *kafkamgmtclient.KafkaRequest, error)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
KafkaAdmin func(kafkaID string) (kafkainstanceclient.TopicsApi, kafkainstanceclient.GroupsApi, *kafkamgmtclient.KafkaRequest, error)
KafkaAdmin func(kafkaID string) (kafkainstanceclient, *kafkamgmtclient.KafkaRequest, error)

If we return the full API client like this, it can be used like: _ = api.TopicsApi.GetTopic()

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. This requires refactor of the KeycloakConnection so it will take some time

Copy link
Contributor

@craicoverflow craicoverflow left a comment

Choose a reason for hiding this comment

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

I'd like to see us return the full Kafka Admin client as suggested rather than returning multiple API groups

@wtrocki
Copy link
Collaborator Author

wtrocki commented Jul 28, 2021

@craicoverflow kafkainstanceclient is namespace.
Screenshot 2021-07-28 at 16 00 32

@wtrocki
Copy link
Collaborator Author

wtrocki commented Jul 28, 2021

Actually SDK returns: kafkainstanceclient.APIClient and that should be used, however this conflicts with unit testing capabilities etc. Still this is as good we can go without large refactor

@wtrocki wtrocki merged commit 1571455 into main Jul 28, 2021
@wtrocki wtrocki deleted the update-sdk branch July 28, 2021 15:26
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.

2 participants