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

isOpenApiStr logger leaks to Gradle #785

Open
koperagen opened this issue Jul 16, 2024 · 2 comments · May be fixed by #793
Open

isOpenApiStr logger leaks to Gradle #785

koperagen opened this issue Jul 16, 2024 · 2 comments · May be fixed by #793
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed, feel free to help :) OpenAPI Changes related to OpenAPI, JSON (schema), etc.
Milestone

Comments

@koperagen
Copy link
Collaborator

koperagen commented Jul 16, 2024

https://www.kaggle.com/datasets/ruchi798/data-science-job-salaries
Try to generate a schema:

schema {
    sourceSet = "test"
    visibility = org.jetbrains.dataframe.gradle.DataSchemaVisibility.IMPLICIT_PUBLIC
    data = file("src/test/resources/ds_salaries.csv")
    name = "org.jetbrains.kotlinx.dataframe.testSets.DsSalaries"
}

image

It appears as an error, while code generation was in fact successful. Looks bad, i'd revisit why this needs logging and remove if possible

logger.debug(e) { "Attempt to read input as YAML/JSON OpenAPI specification failed." }

logger.debug(e) { "Attempt to read input as YAML/JSON OpenAPI specification failed." }
false
@koperagen koperagen added the bug Something isn't working label Jul 16, 2024
@zaleslaw zaleslaw added this to the 0.14.0 milestone Jul 19, 2024
@Jolanrensen
Copy link
Collaborator

Jolanrensen commented Jul 25, 2024

Unfortunately, the logger.debug(e) line you point to is not the actual place the logging occurs. It's in the swagger-parser library, here. I haven't found a way yet to turn off the sl4j warning logs of io.swagger.v3.parser.

Edit: and another one here

@Jolanrensen Jolanrensen added the OpenAPI Changes related to OpenAPI, JSON (schema), etc. label Jul 25, 2024
@Jolanrensen Jolanrensen self-assigned this Jul 25, 2024
@Jolanrensen Jolanrensen linked a pull request Jul 25, 2024 that will close this issue
@Jolanrensen
Copy link
Collaborator

Jolanrensen commented Jul 26, 2024

Well... That was a long journey. For some reason, the logger of io.swagger.v3.parser.OpenAPIV3Parser gets the name "i.swagger.v3.parser.OpenAPIV3Parser". So, to disable it, you need that exact name.
The logger of io.swagger.v3.parser.util.DeserializationUtils becomes "i.s.v.p.util.DeserializationUtils" for some reason... That explains why I couldn't disable it.

Still, disabling the error is hard. I am able to disable it from normal running code, but it seems like Gradle somewhere is picking it up and piping it to stderr :/

Any ideas?

@Jolanrensen Jolanrensen added the help wanted Extra attention is needed, feel free to help :) label Jul 26, 2024
@Jolanrensen Jolanrensen modified the milestones: 0.14.0, 0.15.0 Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed, feel free to help :) OpenAPI Changes related to OpenAPI, JSON (schema), etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants