avro icon indicating copy to clipboard operation
avro copied to clipboard

AVRO-3666 [Java] Use the new schema parser

Open opwvhk opened this issue 2 years ago • 1 comments

What is the purpose of the change

This change updates schema parsing so forward references are handles in a uniform way, regardless of the parser used (JSON, IDL, ...).

This change is the missing bit for AVRO-3666, re-enabling some disabled tests (and more changes to debug). This also improves the schema resolving visitor copied from the original IDL parser (it didn't handle circular references in logical types), and aliases pointing to the null namespace (this was lost when querying aliases).

Verifying this change

This change updates a lot of tests to use the new schema parser (or the internal JSON parser), but does not alter tests. As such, the change is covered by existing schema parsing tests.

Documentation

  • Does this pull request introduce a new feature? (~yes~ / no)
  • If yes, how is the feature documented? (not applicable / ~docs / JavaDocs / not documented~)

opwvhk avatar Dec 19 '23 11:12 opwvhk

I tried to review this, but don't know where to start. The schema parser is very fundamental and there are 150+ files to review. My biggest concern is about breaking public API's. We had this in the Avro 1.8 to 1.9 version because we had to remove codehaus Jackson from the public API, and it was very hard to get this downstream into other projects.

These are valid concerns, so I'll address them each.

Breaking API's:

  • Are not intended: all existing methods should be deprecated instead.
  • There's only one exception that I know of: Parser.parse(Iterable<File>) was added after the last release (#2375)

PR size:

  • Largely unavoidable, given how much we use the parser
  • Starting point is separating the parser and its tests from the rest
  • The parser requires extra scrutiny, the rest is of the category "it works, so it's good enough if it's readable"

opwvhk avatar Feb 14 '24 08:02 opwvhk

@opwvhk Could you resolve the merge conflicts?

Fokko avatar Apr 03 '24 13:04 Fokko

Thanks for working on this @opwvhk 🙌

Fokko avatar Apr 04 '24 09:04 Fokko

Hi Team,

Did 1.12.0 or 1.11.4 got released ? I see CVEs fixes related commons-compress 1.26.0 are already in place. Seems to be release is pending. If not released, what would be the ETA ? cc: @Fokko

g1rjeevan avatar Apr 10 '24 12:04 g1rjeevan

A release is near, see the public mailing list: https://lists.apache.org/thread/qg70g7d9j5odkf8fxnnm342mm2kj997l I would say this month since the release process always takes some time in open source.

Fokko avatar Apr 10 '24 13:04 Fokko

@Fokko Any update on the release ?

g1rjeevan avatar May 07 '24 04:05 g1rjeevan

@g1rjeevan I'm working on both 1.11.4 and 1.12.0 releases preparation. I need to merge one pending change. I hope to submit the release to vote next week.

jbonofre avatar May 07 '24 16:05 jbonofre