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

feat(custom-views): add custom views get endpoint #71942

Merged
merged 10 commits into from
Jun 14, 2024

Conversation

MichaelSun48
Copy link
Member

@MichaelSun48 MichaelSun48 commented Jun 3, 2024

This endpoint creates the GET organizations/<org_id_or_slug>/group-search-views/ Endpoint along with some tests. This endpoint will be responsible for fetching a user's custom views within an organization.

⚠️ This PR is dependent on #71731 being merged run in production, and this branch will need to be rebased upon that happening

Copy link

codecov bot commented Jun 12, 2024

Codecov Report

Attention: Patch coverage is 96.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 78.07%. Comparing base (8d255a2) to head (94d7a72).
Report is 61 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #71942      +/-   ##
==========================================
+ Coverage   78.05%   78.07%   +0.01%     
==========================================
  Files        6597     6599       +2     
  Lines      294016   294117     +101     
  Branches    50716    50728      +12     
==========================================
+ Hits       229508   229620     +112     
+ Misses      58246    58233      -13     
- Partials     6262     6264       +2     
Files Coverage Δ
...c/sentry/api/serializers/models/groupsearchview.py 100.00% <100.00%> (ø)
src/sentry/api/urls.py 100.00% <ø> (ø)
src/sentry/issues/endpoints/__init__.py 100.00% <100.00%> (ø)
src/sentry/models/savedsearch.py 100.00% <100.00%> (ø)
...ssues/endpoints/organization_group_search_views.py 93.10% <93.10%> (ø)

... and 52 files with indirect coverage changes

id: str
name: str
query: str
querySort: SORT_LITERALS
Copy link
Member

Choose a reason for hiding this comment

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

Can this not be typed as SortOptions?

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried for like an hour to get this to work before just giving up. For some reason, mypy refuses to enforce the type if I set it to SortOptions - I setquerySort of a view instance to "awioef" and mypy thought it was fine.

src/sentry/api/serializers/models/groupsearchview.py Outdated Show resolved Hide resolved
@MichaelSun48 MichaelSun48 merged commit f98a882 into master Jun 14, 2024
49 checks passed
@MichaelSun48 MichaelSun48 deleted the msun/addCustomViewsGETEndpoint branch June 14, 2024 20:35
@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 2024
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.

Custom Views: Create GET Endpoint
4 participants