SOLR-18066: Fix hideIgnoreStackTrace from the solr.xml#4278
Open
utsav00 wants to merge 2 commits intoapache:mainfrom
Open
SOLR-18066: Fix hideIgnoreStackTrace from the solr.xml#4278utsav00 wants to merge 2 commits intoapache:mainfrom
utsav00 wants to merge 2 commits intoapache:mainfrom
Conversation
Contributor
|
+1 for me. Good catch, and thank you! I remember woking on the ticket to hide stack traces, I should probably have paid attention to that when wroking on JAX-RS resources. |
Author
|
Was happy to work on this, @igiguere! This is a dumb question but I am not able to find an option to rerun the workflow - doesn't seem to be failing due to the changes on this PR. Can you please help retrigger the workflow run? |
Contributor
|
I have retriggered the solr tests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://issues.apache.org/jira/browse/SOLR-18066
Description
Solr has a hideStackTrace setting in solr.xml that's meant to strip Java stack traces from HTTP error responses,
The setting was being respected for core-level endpoints but completely ignored for coreless endpoints like
logging/levelsthat aren't tied to any specific Solr index.Solution
The fix adds a two-tier fallback:
hideStackTracefrom it (existing)CoreContainerdirectly from the request contextTests
After building, fetch a coreless point -
Same endpoint after toggling
hideStackTracein the solr.xml in the build folderThe response after the fix and turning the respective config true -
{ "responseHeader": { "status": 500, "QTime": 159 }, "error": { "code": 500, "errorClass": "com.fasterxml.jackson.databind.exc.MismatchedInputException", "msg": "Cannot deserialize value of type `java.util.ArrayList<org.apache.solr.client.api.model.LogLevelChange>` from Object value (token `JsonToken.START_OBJECT`)\n at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1]" } }No
tracein the response bodyChecklist
Please review the following and check all that apply:
mainbranch../gradlew check.