Skip to content
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

AVRO-3790 Provide namespace on UnknownSchemaError raise #2409

Conversation

piotaixr
Copy link
Contributor

What is the purpose of the change

If an UnknownSchemaError is raised for a nested type that should inherit its parent namespace, the default_namespace information is lost when rescuing this exception.
This prevents users of the library to use the raised exception to load the missing schema that may be defined in a separate file fore readability when handling large schema files.

Verifying this change

This is a simple addition of information when raising an exception on encountering an unknown schema reference. The existing unit test has been updated to make sure the correct information is added to the exception.

Documentation

  • Does this pull request introduce a new feature?: YES
  • Documentation for the raised exception seems to be missing from the project. I did not create it to mention the addition I made in it.

If an UnknownSchemaError is raised for a nested type that should
inherit its parent namespace, the default_namespace information
is lost when rescuing this exception.
This prevents users of the library to use the raised exception
to load the missing schema that may be defined in a separate
file fore readability when handling large schema files.
@piotaixr
Copy link
Contributor Author

piotaixr commented Aug 7, 2023

HI @martin-g, thanks for the approval!
When can we expect the PR to be merged?

@tjwp tjwp merged commit 4f2b015 into apache:master Aug 8, 2023
10 checks passed
@tjwp
Copy link
Contributor

tjwp commented Aug 8, 2023

I've merged and also cherry-picked to the 1.11 branch.

@rpiotaix-tc
Copy link

Hi @tjwp
Do you know when we can expect a release containing this change?
Thanks!

RanbirK pushed a commit to RanbirK/avro that referenced this pull request May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants