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 (@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] |
|
Confluent Inc. (@confluentinc) It looks like Charlie White (@charlie-white) just signed our Contributor License Agreement. 👍 Always at your service, clabot |
|
Thanks Charlie White (@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 |
| 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.
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.
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 Magnus Edenhill (@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.