Skip to content

[BE] Fix Avro SR for non-TopicNameStrategy subjects #3235

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

Merged
merged 4 commits into from
Jan 17, 2023

Conversation

iliax
Copy link
Contributor

@iliax iliax commented Jan 13, 2023

SchemaRegistrySerde checkSchemaExistenceForDeserialize property added

  • Breaking change? (if so, please describe the impact and migration path for existing application instances)

What changes did you make? (Give an overview)

Is there anything you'd like reviewers to focus on?

How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)

  • No need to
  • Manually (please, describe, if necessary)
  • Unit checks
  • Integration checks
  • Covered by existing automation

Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (e.g. ENVIRONMENT VARIABLES)
  • My changes generate no new warnings (e.g. Sonar is happy)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

Check out Contributing and Code of Conduct

A picture of a cute animal (not mandatory but encouraged)

@iliax iliax requested a review from a team as a code owner January 13, 2023 16:52
@iliax iliax requested a review from Haarolean January 13, 2023 16:52
@iliax iliax linked an issue Jan 13, 2023 that may be closed by this pull request
@github-actions github-actions bot added the status/triage Issues pending maintainers triage label Jan 13, 2023
@Ronserruya
Copy link

Hey @iliax , I opened the related issue #3224
I thought about sending a PR but I see you are already on it and can probably fix it better, in the meantime, I fixed both of the problems I talked about locally.

  1. Fix for not being to deserialize if the topic doesn't match:
    Change canDeserialize to always return true;
  2. Fix for the avro to json printing the record namespace and union types:
    Added this line: encoder.setIncludeNamespace(false); in the avroRecordToJson method

Here's my working .jar if you want to test it

@iliax
Copy link
Contributor Author

iliax commented Jan 15, 2023

@Ronserruya Thank you for reporting, I created PR to change behavior in glue SR, we will merge it soon.

As for json encoding - unfortunately we can't fix it the way you provided because deserialize, serialize logic and sample messages generation should be in sync. Default JsonDecoder won't be able to serialize json representation withot namesepace info. Please create separate issue for that, we will thing how we can deal with it separately.

@Haarolean Haarolean added type/bug Something isn't working scope/backend and removed status/triage Issues pending maintainers triage labels Jan 17, 2023
@Haarolean Haarolean changed the title ISSUE-3222: Avro SR serde not working for non-TopicNameStrategy subjects [BE] Fix Avro SR for non-TopicNameStrategy subjects Jan 17, 2023
@iliax iliax merged commit 5d31189 into master Jan 17, 2023
@iliax iliax deleted the ISSUE-3222_sr_serde_disabled_schema_existence_check branch January 17, 2023 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope/backend type/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AWS Glue serde not available for non-name strategy Topic Messages: Preview AVRO broken in v0.5.0+
3 participants