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
feature: [VRD-679] New client function get_kafka_topics()
#3727
feature: [VRD-679] New client function get_kafka_topics()
#3727
Conversation
…pdate doc-string
…afka config by default when it is not present in KafkaSettings.
!rebuild |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are past comments that weren't addressed. Are they fine?
@liuverta Did you happen to see my prior responses in each of the two threads you referenced? In the first case, using In the second case, sending a |
… drop unused call (was a result of no value for stage being found)
…nfigs, and config returned is missing the ID we need)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for tackling the tests 😵💫 Some feedback on the error messages, then I think we'll be good
Co-authored-by: Liu <96442646+liuverta@users.noreply.github.com>
Co-authored-by: Liu <96442646+liuverta@users.noreply.github.com>
@liuverta - No problem. Thanks for the review. I accepted the changes to the error messages and I just pushed a commit to update the unit tests accordingly. Cheers |
* feature: add client function for fetching Kafka topics * refactor: make `cluster_config_id` optional in KafkaSettings class, update doc-string * refactor: make endpoint fetch Kafka `cluster_config_id` from active Kafka config by default when it is not present in KafkaSettings. * refactor: move hypothesis strategy to strategies.py with all the others * test: expand hypothesis strategies with some mocked kafka elements * test: add fixtures for mocking a Client and a RegisteredModelVersion * test: add property/unit tests for the changes to Endpoint * test: add property/unit tests for `Client.get_kafka_topics()` * fix: final newline * docs: fix attribute descritpion * docs: fix arg descritpion * test: drop `ignore_conn_err` from mocked client test fixture * test: make arbitrary id numbers more explicit for test clarity * docs: use `versionchanged` instead of `versionadded` * docs: Reword doc string for `cluster_config_id` * refactor: raise client errors for missing kafka config or missing config id * test: fix return from get_stages api to simulate correct response and drop unused call (was a result of no value for stage being found) * test: add unit tests for both new error conditions (no valid kafka configs, and config returned is missing the ID we need) * Update client/verta/verta/endpoint/_endpoint.py Co-authored-by: Liu <96442646+liuverta@users.noreply.github.com> * Update client/verta/verta/endpoint/_endpoint.py Co-authored-by: Liu <96442646+liuverta@users.noreply.github.com> * test: update unit tests for changes to error messaging --------- Co-authored-by: Liu <96442646+liuverta@users.noreply.github.com>
Impact and Context
verta.client.Client
that will allow users to fetch a list of available Kafka topics.KafkaSettings
class to make thecluster_config_id
argument optional.verta._endpoint.Endpoint()
to fetch the Kafka config ID when it is not included.cluster_config_id
.black
formatting changes to bring changed files up to standard.Risks and Area of Effect
Testing
Validation script for running against a real env with a Kafka config:
Output:
Note the
cluster_config_id
(4th arg) has been fetched.Reverting