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

Endpoint Logger is not allowing to change default log level #10727

Open
tchiotludo opened this issue Apr 16, 2024 · 2 comments
Open

Endpoint Logger is not allowing to change default log level #10727

tchiotludo opened this issue Apr 16, 2024 · 2 comments
Labels

Comments

@tchiotludo
Copy link
Contributor

tchiotludo commented Apr 16, 2024

Expected Behavior

the Logger endpoint don't allow any more the POST to change the log level

$ curl http://localhost:8080/loggers/io.micronaut.http

{"message":"Internal server error: Failed to convert argument [configuredLevel] for value [null] due to: Cannot construct instance of `io.micronaut.core.convert.value.ConvertibleValues` (no Creators, like default constructor, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information\n at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1]","_links":{"self":{"href":"/loggers/io.micronaut.security"}}

We are using the jackson implementation, not the micronaut one

Version

4.3.4

@graemerocher graemerocher added the type: bug Something isn't working label Apr 16, 2024
@graemerocher graemerocher added this to the 4.4.2 milestone Apr 16, 2024
@sdelamo sdelamo removed this from the 4.4.2 milestone Apr 17, 2024
@yawkat
Copy link
Member

yawkat commented Apr 23, 2024

I don't understand this bug report. We have passing tests for the management endpoint with jackson. Also your curl command is a GET, not a POST. And the error sounds like there's no deserializer for ConvertibleValues, but we have one for jackson and that is tested too.

@tchiotludo
Copy link
Contributor Author

oups sorry for bad examples, here is the correct one:

curl -i -X POST -H "Content-Type: application/json"   -d '{ "configuredLevel": "TRACE" }'   http://localhost:8081/loggers/io.kestra
HTTP/1.1 422 Internal server error
content-type: application/json
date: Tue, 23 Apr 2024 07:32:58 GMT
content-length: 509
{"message":"Internal server error: Failed to convert argument [configuredLevel] for value [null] due to: Cannot construct instance of `io.micronaut.core.convert.value.ConvertibleValues` (no Creators, like default constructor, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information\n at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1]","_links":{"self":{"href":"/loggers/io.kestra"}}}kestra@prd-kestra-standalone-6f8b767486-lkzlw:/app$

We have the bug on Kestra, just starting the application and reaching the endpoint failed

$ docker run --rm --name test kestra/kestra:latest  server local

$ docker exec -it test bash

kestra@8f55313c9efa:/app$ curl -i -X POST -H "Content-Type: application/json"   -d '{ "configuredLevel": "TRACE" }'   http://localhost:44369/loggers/io.kestra
HTTP/1.1 422 Internal server error
content-type: application/json
date: Tue, 23 Apr 2024 07:39:22 GMT
content-length: 509

{"message":"Internal server error: Failed to convert argument [configuredLevel] for value [null] due to: Cannot construct instance of `io.micronaut.core.convert.value.ConvertibleValues` (no Creators, like default constructor, exist): abstract typeseither need to be mapped to concrete types, have custom deserializer, or contain additional type information\n at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1]","_links":{"self":{"href":"/loggers/io.kestra"}}}kestra@8f55313c9efa:/app$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

4 participants