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

ref(scm): search endpoint abstraction round 2 #77079

Merged
merged 7 commits into from
Sep 11, 2024

Conversation

cathteng
Copy link
Member

@cathteng cathteng commented Sep 6, 2024

Fixed version of #76627

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Sep 6, 2024
try:
response = installation.search_issues(query=full_query, project_id=repo, iids=iids)
except ApiError as e:
return Response({"detail": str(e)}, status=400)

Check warning

Code scanning / CodeQL

Information exposure through an exception Medium

Stack trace information
flows to this location and may be exposed to an external user.
try:
response = installation.search_projects(query)
except ApiError as e:
return Response({"detail": str(e)}, status=400)

Check warning

Code scanning / CodeQL

Information exposure through an exception Medium

Stack trace information
flows to this location and may be exposed to an external user.
Copy link

codecov bot commented Sep 6, 2024

Codecov Report

Attention: Patch coverage is 98.29545% with 3 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...ntry/integrations/source_code_management/search.py 96.82% 1 Missing and 1 partial ⚠️
src/sentry/integrations/vsts/search.py 93.75% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #77079       +/-   ##
===========================================
+ Coverage   57.37%   78.14%   +20.76%     
===========================================
  Files        6927     6939       +12     
  Lines      307427   307970      +543     
  Branches    50326    50410       +84     
===========================================
+ Hits       176400   240675    +64275     
+ Misses     126188    60875    -65313     
- Partials     4839     6420     +1581     

if not query:
return Response([])

resp = installation.search_issues(query=query)
Copy link
Member Author

Choose a reason for hiding this comment

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

vsts doesn't query issues with repository, needed to account for that. there isn't a test for VSTS, may need to add that?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah makes sense. Please at least add barebone tests.

Copy link
Member Author

Choose a reason for hiding this comment

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

done!

@cathteng cathteng marked this pull request as ready for review September 9, 2024 20:17
@cathteng cathteng requested review from a team as code owners September 9, 2024 20:17
@cathteng cathteng force-pushed the cathy/scm/search-endpoint-abstraction branch from 58b6f5c to dc07360 Compare September 11, 2024 15:52
@cathteng cathteng requested a review from a team as a code owner September 11, 2024 15:52
@cathteng cathteng enabled auto-merge (squash) September 11, 2024 15:58
@cathteng cathteng merged commit b2a3af3 into master Sep 11, 2024
49 checks passed
@cathteng cathteng deleted the cathy/scm/search-endpoint-abstraction branch September 11, 2024 16:31
Copy link

sentry-io bot commented Sep 16, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ ApiError: According to Microsoft Entra, your Identity f4bc026f-f6fb-4a8f-be69-09f2653cc3b8 is currently Del... /extensions/vsts/search/{organization_id_or_slu... View Issue
  • ‼️ ApiTimeoutError: Timed out attempting to reach host: koblesystems.almsearch.visualstudio.com /extensions/vsts/search/{organization_id_or_slu... View Issue

Did you find this useful? React with a 👍 or 👎

@github-actions github-actions bot locked and limited conversation to collaborators Oct 2, 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.

2 participants