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 protocol support for ApiVersionRequest #678

Merged
merged 1 commit into from May 4, 2016
Merged

Conversation

dpkp
Copy link
Owner

@dpkp dpkp commented May 3, 2016

Use the api to identify 0.10 brokers in check_version.

Leaving deeper support for ApiVersion response (min / max versions) for a separate task.

@@ -225,7 +225,7 @@ def __init__(self, *topics, **configs):
# Check Broker Version if not set explicitly
if self.config['api_version'] == 'auto':
self.config['api_version'] = self._client.check_version()
assert self.config['api_version'] in ('0.9', '0.8.2', '0.8.1', '0.8.0'), 'Unrecognized api version'
assert self.config['api_version'] in ('0.10', '0.9', '0.8.2', '0.8.1', '0.8.0'), 'Unrecognized api version'
Copy link
Owner Author

Choose a reason for hiding this comment

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

This should probably be refactored. A user should not ever need to pass in api_version='0.10' since that broker supports ApiVersionRequest.

Copy link
Collaborator

Choose a reason for hiding this comment

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

But the user still could set api_version='0.10' (or higher in the future) right?

Copy link
Owner Author

Choose a reason for hiding this comment

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

I'm convinced! merging

@zackdever
Copy link
Collaborator

Woot! LGTM

@dpkp dpkp merged commit d401bde into master May 4, 2016
@dpkp dpkp deleted the check_version_0_10 branch January 17, 2017 17:54
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.

None yet

2 participants