-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[BugFix] Fix query profile API to return a unified JSON format #67077
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
Conversation
Signed-off-by: zhaohehuhu <[email protected]>
|
@kevincai plz help review |
fe/fe-core/src/main/java/com/starrocks/http/rest/v2/ProfileActionV2.java
Show resolved
Hide resolved
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.
Pull request overview
This PR fixes a bug where the query profile API was returning a double-wrapped JSON response when fetching profiles from other frontend nodes. The fix ensures a unified JSON format is returned regardless of whether the profile is found locally or on a remote frontend.
Key Changes:
- Deserialize JSON responses from other frontends to extract the profile string from the
RestBaseResultV2wrapper before re-wrapping it for the final response - Add necessary imports (
TypeTokenandGsonUtils) to support JSON deserialization
fe/fe-core/src/main/java/com/starrocks/http/rest/v2/ProfileActionV2.java
Show resolved
Hide resolved
|
@cursor review |
fe/fe-core/src/main/java/com/starrocks/http/rest/v2/ProfileActionV2.java
Show resolved
Hide resolved
Signed-off-by: zhaohehuhu <[email protected]>
|
@cursor review |
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.
✅ Bugbot reviewed your changes and found no bugs!
Signed-off-by: zhaohehuhu <[email protected]>
Signed-off-by: zhaohehuhu <[email protected]>
|
@cursor review |
fe/fe-core/src/main/java/com/starrocks/http/rest/v2/ProfileActionV2.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/com/starrocks/http/rest/v2/ProfileActionV2.java
Show resolved
Hide resolved
Signed-off-by: zhaohehuhu <[email protected]>
|
@cursor review |
Signed-off-by: zhaohehuhu <[email protected]>
Signed-off-by: zhaohehuhu <[email protected]>
|
|
@cursor review |
|
@kevincai look like the CI was broken. Could you plz help rerun CI pipeline ? |
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]✅ pass : 7 / 8 (87.50%) file detail
|
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
|
@cursor review |
|
@Mergifyio backport branch-4.0 |
✅ Backports have been createdDetails
|
Signed-off-by: zhaohehuhu <[email protected]> (cherry picked from commit 52b3a8a)
…ort #67077) (#67280) Signed-off-by: zhaohehuhu <[email protected]> Co-authored-by: He Zhao <[email protected]>



Why I'm doing:
as title
What I'm doing:
as title
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check:
Note
Aligns cross-FE profile fetching to return the plain-text profile inside the standard JSON envelope.
ProfileActionV2, when querying other FEs, parse their JSON (RestBaseResultV2<String>) and return only theresult(plain text); skip null resultsGsonUtils/TypeTokenusage to deserialize remote responsesProfileActionV2Testto assert JSON envelope (status=OK) and that the embedded profile is plain text (not JSON)Written by Cursor Bugbot for commit a58535a. This will update automatically on new commits. Configure here.