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

Custom ObjectMapper in application affects Kafka UI Dev service #29976

Closed
gitkeerthi opened this issue Dec 20, 2022 · 7 comments · Fixed by #29984 or #30135
Closed

Custom ObjectMapper in application affects Kafka UI Dev service #29976

gitkeerthi opened this issue Dec 20, 2022 · 7 comments · Fixed by #29984 or #30135
Assignees
Labels
area/kafka kind/bug Something isn't working
Milestone

Comments

@gitkeerthi
Copy link

Describe the bug

I have custom ObjectMapperCustomizer that I needed to convert all json payloads to use snake_case.

@Singleton
public class ObjectMapperCustomizer implements io.quarkus.jackson.ObjectMapperCustomizer {

    public void customize(ObjectMapper mapper) {
        mapper.setSerializationInclusion(NON_NULL);
        mapper.setPropertyNamingStrategy(SNAKE_CASE);
    }

}

This apparently affects the Kafka UI running as one of the dev services. How do I isolate kafka dev services from this?

Expected behavior

The Kafka UI dev service should function as expected

Actual behavior

Application's custom JsonMappers affects Kafka UI's payload and as a result renders the UI unusable

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@gitkeerthi gitkeerthi added the kind/bug Something isn't working label Dec 20, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Dec 20, 2022

/cc @alesj(kafka), @cescoffier(kafka), @ozangunalp(kafka)

@gitkeerthi
Copy link
Author

@ozangunalp
Copy link
Contributor

@gitkeerthi Thanks for opening the issue here. The Kafka UI server needs to create its own ObjectMapper instance.

@ozangunalp ozangunalp self-assigned this Dec 20, 2022
@gitkeerthi
Copy link
Author

@ozangunalp Is there a workaround you suggest?

ozangunalp added a commit to ozangunalp/quarkus that referenced this issue Dec 20, 2022
@ozangunalp
Copy link
Contributor

@gitkeerthi I can't think of any workarounds. But I think the fix can be backported.

@quarkus-bot quarkus-bot bot added this to the 2.16 - main milestone Dec 20, 2022
@gsmet gsmet modified the milestones: 2.16 - main, 2.15.1.Final Dec 21, 2022
gsmet pushed a commit that referenced this issue Dec 21, 2022
Fixes #29976

(cherry picked from commit 0b76f72)
@gsmet
Copy link
Member

gsmet commented Dec 21, 2022

The fix will be in 2.15.1.Final, the release is in progress and should hopefully hit Maven Central before the end of the day.

ozangunalp added a commit to ozangunalp/quarkus that referenced this issue Dec 22, 2022
@gitkeerthi
Copy link
Author

@ozangunalp Sorry to report that the issue still exists in 2.15.1.Final

ozangunalp added a commit to ozangunalp/quarkus that referenced this issue Jan 3, 2023
ozangunalp added a commit to ozangunalp/quarkus that referenced this issue Jan 3, 2023
@gsmet gsmet modified the milestones: 2.15.1.Final, 2.15.2.Final Jan 3, 2023
gsmet pushed a commit to gsmet/quarkus that referenced this issue Jan 3, 2023
gsmet pushed a commit to gsmet/quarkus that referenced this issue Jan 4, 2023
ebullient pushed a commit to maxandersen/quarkus that referenced this issue Jan 24, 2023
ebullient pushed a commit to maxandersen/quarkus that referenced this issue Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kafka kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants