Skip to content

fix: update version of the kafka admin SDK#848

Merged
wtrocki merged 1 commit intomainfrom
update-sdk
Jul 28, 2021
Merged

fix: update version of the kafka admin SDK#848
wtrocki merged 1 commit intomainfrom
update-sdk

Conversation

@wtrocki
Copy link
Copy Markdown
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

Comment thread pkg/api/api.go Outdated
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator Author

wtrocki commented Jul 28, 2021

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

@wtrocki
Copy link
Copy Markdown
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