Skip to content

Fix for issue #443.#444

Closed
Charlie White (charlie-white) wants to merge 1 commit into
confluentinc:masterfrom
charlie-white:issue_443
Closed

Fix for issue #443.#444
Charlie White (charlie-white) wants to merge 1 commit into
confluentinc:masterfrom
charlie-white:issue_443

Conversation

@charlie-white

Copy link
Copy Markdown

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.

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.
@ghost

Copy link
Copy Markdown

It looks like Charlie White (@charlie-white) hasn't signed our Contributor License Agreement, yet.

The purpose of a CLA is to ensure that the guardian of a project's outputs has the necessary ownership or grants of rights over all contributions to allow them to distribute under the chosen licence.
Wikipedia

You can read and sign our full Contributor License Agreement here.

Once you've signed reply with [clabot:check] to prove it.

Appreciation of efforts,

clabot

@edenhill

Copy link
Copy Markdown
Contributor

[clabot:check]

@ghost

Copy link
Copy Markdown

Confluent Inc. (@confluentinc) It looks like Charlie White (@charlie-white) just signed our Contributor License Agreement. 👍

Always at your service,

clabot

@rnpridgeon

Ryan P (rnpridgeon) commented Sep 8, 2018

Copy link
Copy Markdown
Contributor

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)

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.

@rnpridgeon Ryan P (rnpridgeon) Sep 19, 2018

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.

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"`
}

@rnpridgeon

Copy link
Copy Markdown
Contributor

Rolled into #440 with schema registry client integration tests. Thanks for you contribution

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.

3 participants