-
Notifications
You must be signed in to change notification settings - Fork 915
Fix for issue #443. #444
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 for issue #443. #444
Conversation
Fixing two small coding issues in update_compatibility and get_compatibility methods. No acccompanying tests as the mock object is incomplete and I didn't have time to dive in deep enough to fix that.
It looks like @charlie-white hasn't signed our Contributor License Agreement, yet.
You can read and sign our full Contributor License Agreement here. Once you've signed reply with Appreciation of efforts, clabot |
[clabot:check] |
@confluentinc It looks like @charlie-white just signed our Contributor License Agreement. 👍 Always at your service, clabot |
Thanks @charlie-white, I'll have to insist that an integration test be added so we can catch this issue earlier in the unlikely even the schema registry api changes in the future. Really we should have a test for each endpoint but that's another issue. Other than that the fix LGTM |
@@ -323,7 +323,7 @@ def get_compatibility(self, subject=None): | |||
if not is_successful_request: | |||
raise ClientError('Unable to fetch compatibility level. Error code: %d' % code) | |||
|
|||
compatibility = result.get('compatibility', None) | |||
compatibility = result.get('compatibilityLevel', None) |
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.
this seems to contradict the API docs:
https://docs.confluent.io/current/schema-registry/docs/api.html#put--config
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.
I have opened a docs jira for this. This absolutely the case I ran into the same issue implementing the SR client in golang.
see DOCS-762
@edenhill
I had to handle it as follows:
/* NOTE: GET uses compatibilityLevel, POST uses compatibility */
type compatibilityLevel struct {
CompatibilityUpdate Compatibility `json:"compatibility,omitempty"`
Compatibility Compatibility `json:"compatibilityLevel,omitempty"`
}
Rolled into #440 with schema registry client integration tests. Thanks for you contribution |
Fixing two small coding issues in update_compatibility and get_compatibility methods.
No acccompanying tests as the mock object is incomplete and I didn't have time to dive in deep enough to fix that.