Skip to content

feat(explore): Update get explore queries to return starred position and add sort by most starred option#89034

Merged
edwardgou-sentry merged 5 commits into
masterfrom
egou/feat/explore-starred-position-and-order
Apr 9, 2025
Merged

feat(explore): Update get explore queries to return starred position and add sort by most starred option#89034
edwardgou-sentry merged 5 commits into
masterfrom
egou/feat/explore-starred-position-and-order

Conversation

@edwardgou-sentry

@edwardgou-sentry edwardgou-sentry commented Apr 8, 2025

Copy link
Copy Markdown
Contributor
  • Updates the GET explore saved queries endpoint to also return the starred position of each query (in the serializer).
  • Updates the endpoint to return queries in order of their starred position when starred_queries is true.
  • Adds a mostStarred sort by option that returns queries in order of most starred.
  • Updates endpoint sort by query param to be a list, to allow secondary sort selection by the user.

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 8, 2025
@edwardgou-sentry edwardgou-sentry requested review from a team April 8, 2025 15:49
@edwardgou-sentry edwardgou-sentry marked this pull request as ready for review April 8, 2025 15:49
@edwardgou-sentry

Copy link
Copy Markdown
Contributor Author

moving this back to draft, there's some additional functionality i need to add to address some further feedback

@edwardgou-sentry edwardgou-sentry marked this pull request as draft April 8, 2025 18:31
@edwardgou-sentry edwardgou-sentry marked this pull request as ready for review April 8, 2025 19:20
@edwardgou-sentry

Copy link
Copy Markdown
Contributor Author

Reopened for review. Updated the endpoint to accept sortBy as a list, so that users can select a secondary sort option.

@narsaynorath narsaynorath left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, just some small comments

Comment thread src/sentry/api/serializers/models/exploresavedquery.py Outdated
Comment thread tests/sentry/explore/endpoints/test_explore_saved_queries.py Outdated
@edwardgou-sentry edwardgou-sentry merged commit fb539b9 into master Apr 9, 2025
@edwardgou-sentry edwardgou-sentry deleted the egou/feat/explore-starred-position-and-order branch April 9, 2025 14:35
@codecov

codecov Bot commented Apr 9, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #89034       +/-   ##
===========================================
+ Coverage   32.96%   87.71%   +54.74%     
===========================================
  Files        8524    10091     +1567     
  Lines      476100   571234    +95134     
  Branches    22432    22432               
===========================================
+ Hits       156946   501050   +344104     
+ Misses     318711    69741   -248970     
  Partials      443      443               

Christinarlong pushed a commit that referenced this pull request Apr 10, 2025
…and add sort by most starred option (#89034)

- Updates the `GET` explore saved queries endpoint to also return the
starred position of each query (in the serializer).
- Updates the endpoint to return queries in order of their starred
position when `starred_queries` is true.
- Adds a `mostStarred` sort by option that returns queries in order of
most starred.
- Updates endpoint sort by query param to be a list, to allow secondary
sort selection by the user.
andrewshie-sentry pushed a commit that referenced this pull request Apr 22, 2025
…and add sort by most starred option (#89034)

- Updates the `GET` explore saved queries endpoint to also return the
starred position of each query (in the serializer).
- Updates the endpoint to return queries in order of their starred
position when `starred_queries` is true.
- Adds a `mostStarred` sort by option that returns queries in order of
most starred.
- Updates endpoint sort by query param to be a list, to allow secondary
sort selection by the user.
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants