Fix use.schema.id, broken by signature change to sr.lookup_schema(). #2104
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
What
The
use.schema.idfunctionality for publishing broke between v2.11.1 and v2.12.0, because the signature of thesr.lookup_schema()function changed to add thefmtargument before thedeletedargument (diff showingschema_registry_client.pyshowing the change at target line 828) so when called passing arguments positionally as part of looking up a provided schema ID, theTrueintended fordeletedis passed asfmt, and aPOSTis made with a query string including&deleted=False&format=Truewhere it should have had simply&deleted=True. This is causing our schema registry, at least, to throw back a500 Server Error. I've fixed it by passing some arguments by name, including in some similar methods.Checklist
Test & Review
I'll report back once I'm able to test the changes in a real environment.I have successfully tested this fixes the issue I was experiencing in a real environment.Open questions / Follow-ups
Review stakeholders