-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Add support for Jackson's JsonPOJOBuilder #3688
Conversation
Thanks for the contribution! I took the liebrty of adding thr |
@misl when you are done working on this, please squash your commits into a single one - thanks! |
Also, I think that the PR needs to be rebased on |
Rebase was performed locally and is building right now. But what is expect from "update the native image CI configuration"? |
Because you have added a new integration test module, you need to add something like this |
Thanks, added it locally. Will soon commit and push (as local build completed successfully) |
Sorry, but I need some help on this one. I have no clue what the vertx integration test compilation errors has to do with my changes. |
I saw the same thing earlier in a different PR - but I think it has been fixed on master since so it's probably worth rebasing again |
Sorry for this, but it needs another rebase - there have been a lot of CI changes the last 2 days |
Help, I need help again. Is this another error due to CI changes. Sorry to say so, but I am starting to feel like I am wasting time on this. |
I'm not on my machine now so I'll take a look in a few hours. I understand the feeling, but I can assure you that you have experienced particular bad luck having your PR arrive in the middle of large CI changes. Sorry again for the inconvenience |
Let's hope this is not an bad omen ;-) BTW regarding CI. In my opinion things are scattered all over (overstatement) the repository. Especially for extensions. I needed to make changes in various locations:
Like this there is less chance of merge conflicts. Newbies like me need less knowledge about the project structure. If (ever) extensions get separated from core Quarkus it would be a lot less work since all extension related stuff is in a single place. And possible improves development speed (less hopping around). Sorry, this is just me always trying to improve on (working) things and bringing it rather blunt. |
I've restarted the failing test multiple times - same result each time. |
Looking at the log I see no indication that the errors are caused by the Jackson extension. Looks more like the DynamoDB:
I will attempt another rebase |
Finally, all tests passed :-) |
👍 I'll check it out, but as I (think I) mentioned in a previous comment, the PR needs to be squashed to a single commit :) |
Much better, thanks! |
@geoand, do you intend to review this? |
@FroMage yup, absolutely |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really good overall, great job!
I added a few comments, most of which are minor
extensions/jackson/deployment/src/main/java/io/quarkus/jackson/deployment/JacksonProcessor.java
Outdated
Show resolved
Hide resolved
...odel/src/main/java/io/quarkus/reproducer/jacksonbuilder/model/InheritedModelWithBuilder.java
Outdated
Show resolved
Hide resolved
extensions/jackson/deployment/src/main/java/io/quarkus/jackson/deployment/JacksonProcessor.java
Outdated
Show resolved
Hide resolved
extensions/jackson/deployment/src/main/java/io/quarkus/jackson/deployment/JacksonProcessor.java
Outdated
Show resolved
Hide resolved
.../src/test/java/io/quarkus/reproducer/jacksonbuilder/model/InheritedModelWithBuilderTest.java
Show resolved
Hide resolved
integration-tests/jackson/service/src/main/docker/Dockerfile.jvm
Outdated
Show resolved
Hide resolved
Once done with the changes, please squash to a single commit. Thanks! |
How to proceed from here? Do you prefer to review the individual commits or should I first squash (+ rebase) again? You already answered that. I will squash it now. |
Go ahead please with squash and rebase - the PR is not too large to require review per commit I would say |
Just a few last minor points I raised. Once they are addressed, I'll approve |
extensions/jackson/deployment/src/main/java/io/quarkus/jackson/deployment/JacksonProcessor.java
Outdated
Show resolved
Hide resolved
- Use @JsonDeserialize (instead of @JsonPOJOBuilder) to add reflective classes. - Both model and builder are added - Added safeguard for @JsonDeserialize without builder - Transformed reproducer project into integration tests for jackson extension. - Added support for models and model builders with inheritance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for this!
IndexView index = combinedIndexBuildItem.getIndex(); | ||
|
||
// TODO: Here we only check for @JsonDeserialize to detect both Model and Builder | ||
// classes to support @JsonPojoBuilder. The @JsonDeserialize annotiona can |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a typo in annotationa
. Also the sentence could possible be expressed in a more clear manner, but it's definitely not something to hold up the PR for :)
Fixes #3652 |
For some reason this PR has increased the build time of the kubernetes client native by around 40 minutes. |
I'll check it out |
Although I need to dig through it, my guess is that now the entire Kubernetes Client model is being registered for reflection, as opposed to being "weakly" registered. |
I tweaked the Kubernetes extension in this PR. |
Added support to Jackson extension for immutable POJO models using @JsonPOJOBuilder.