-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Unable to create JSON stream with Schema Registry #4789
Comments
Looked into this with @agavra and found the issue: The intended behavior is that both However, pre-5.5 versions of Schema Registry do not support JSON schemas, which means the current behavior breaks compatibility of ksqlDB with older Schema Registry versions since when Schema Registry is configured and a Options going forward include:
Chatting with @agavra we think it makes sense to pursue the quick fix for the ksqlDB 0.8.0 and CP 5.5.0 releases, and looking into the more involved fix for future releases. WDYT? @MichaelDrogalis @derekjn @apurvam ? UPDATE: This is only a problem on master and not 5.5 (see discussion below). |
So with the quick fix, JSON format will behave exactly as in previous versions: no schema inference, no backward compatibility checks,etc The JSON_SR format has all those goodies, and only works with CP 5.5. What is the error message if JSON_SR is used with older CP versions? Seems to me without version detection and with lazy registration of schemas we will not be able to provide good UX right ? Finally, how did we find thid? |
Correct.
Schemas are now registered at topic creation time, not lazily (see #4717), which is why the bug reported in this issue causes the The error message if
After I cut a candidate release image I tried running through the ksqlDB quickstart as a sanity check, which failed on the first statement since I was using a docker compose file with 5.4.1 Schema Registry. |
Cool. Thanks for the details. The quick fix is fine by me. Though I’m not sure that #4717 is on 5.5 |
Confirmed that this isn't an issue in 5.5 (I was sure I had tested exactly this!) - it was introduced by #4717
The second fails because SR deployed is 5.4 (error message is not great, but there's a separate ticket to fix that). |
Good call -- I'll close the change I targeted at 5.5, and only merge the one targeted at master. Thanks for the catch! |
Closing this issue since the quick fix has been implemented. Created another JIRA to track the more involved fix going forward: #4802 |
Describe the bug
On the latest master, when KSQL is started with Schema Registry,
CREATE STREAM
statements with value formatJSON
fail with the error messageCould not register schema for topic.
which is a bug since theJSON
format should work independent of Schema Registry (no schemas should be registered at all).To Reproduce
On the current
master
:ksql.schema.registry.url=http://localhost:8081
from the server properties filelocations
CREATE STREAM
statement such asCREATE STREAM riderLocations (profileId VARCHAR, latitude DOUBLE, longitude DOUBLE) WITH (kafka_topic='locations', value_format='json');
Expected behavior
The stream should be created successfully.
Actual behaviour
The CLI shows the following error message
Could not register schema for topic.
There's nothing obvious in the server logs with the default logging configs.
Additional context
I think this has to do with the recently added support for JSON with Schema Registry. It's as if the
JSON
format is being interpreted asJSON_SR
and something is going wrong when attempting to register a schema. Need to debug further to understand what's going on.The text was updated successfully, but these errors were encountered: