Skip to content

Conversation

@zhaohehuhu
Copy link
Contributor

@zhaohehuhu zhaohehuhu commented Dec 22, 2025

Why I'm doing:

as title

What I'm doing:

as title

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 4.0
    • 3.5
    • 3.4
    • 3.3

Note

Aligns cross-FE profile fetching to return the plain-text profile inside the standard JSON envelope.

  • In ProfileActionV2, when querying other FEs, parse their JSON (RestBaseResultV2<String>) and return only the result (plain text); skip null results
  • Add GsonUtils/TypeToken usage to deserialize remote responses
  • Update ProfileActionV2Test to 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.

Signed-off-by: zhaohehuhu <[email protected]>
@zhaohehuhu zhaohehuhu requested a review from a team as a code owner December 22, 2025 07:19
@zhaohehuhu
Copy link
Contributor Author

@kevincai plz help review

Copy link
Contributor

Copilot AI left a 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 RestBaseResultV2 wrapper before re-wrapping it for the final response
  • Add necessary imports (TypeToken and GsonUtils) to support JSON deserialization

@alvin-celerdata
Copy link
Contributor

@cursor review

Signed-off-by: zhaohehuhu <[email protected]>
@alvin-celerdata
Copy link
Contributor

@cursor review

Copy link

@cursor cursor bot left a 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!

@zhaohehuhu zhaohehuhu requested a review from kevincai December 24, 2025 02:40
kevincai
kevincai previously approved these changes Dec 24, 2025
Signed-off-by: zhaohehuhu <[email protected]>
Signed-off-by: zhaohehuhu <[email protected]>
@alvin-celerdata
Copy link
Contributor

@cursor review

Signed-off-by: zhaohehuhu <[email protected]>
@zhaohehuhu zhaohehuhu requested a review from kevincai December 25, 2025 02:31
@alvin-celerdata
Copy link
Contributor

@cursor review

Signed-off-by: zhaohehuhu <[email protected]>
Signed-off-by: zhaohehuhu <[email protected]>
@sonarqubecloud
Copy link

@alvin-celerdata
Copy link
Contributor

@cursor review

@zhaohehuhu
Copy link
Contributor Author

@kevincai look like the CI was broken. Could you plz help rerun CI pipeline ?

@github-actions
Copy link

[Java-Extensions Incremental Coverage Report]

pass : 0 / 0 (0%)

@github-actions
Copy link

[FE Incremental Coverage Report]

pass : 7 / 8 (87.50%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/http/rest/v2/ProfileActionV2.java 7 8 87.50% [80]

@github-actions
Copy link

[BE Incremental Coverage Report]

pass : 0 / 0 (0%)

@alvin-celerdata
Copy link
Contributor

@cursor review

@alvin-celerdata alvin-celerdata merged commit 52b3a8a into StarRocks:main Dec 27, 2025
103 of 104 checks passed
@github-actions
Copy link

@Mergifyio backport branch-4.0

@github-actions github-actions bot removed the 4.0 label Dec 27, 2025
@mergify
Copy link
Contributor

mergify bot commented Dec 27, 2025

backport branch-4.0

✅ Backports have been created

Details

mergify bot pushed a commit that referenced this pull request Dec 27, 2025
wanpengfei-git pushed a commit that referenced this pull request Dec 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants