-
Notifications
You must be signed in to change notification settings - Fork 60
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
[Integration][SonarQube] Bug | 404 response when querying SonarQube issues #1105
Conversation
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.
looks great. left some comments
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.
left some comments and suggestions
integrations/sonarqube/client.py
Outdated
if self.is_onpremise: | ||
query_params = {"project": component_key} | ||
endpoint_path = Endpoints.ONPREM_ISSUES | ||
else: | ||
query_params = {"componentKeys": component_key} | ||
endpoint_path = Endpoints.SAAS_ISSUES | ||
query_params = {"componentKeys": component_key} |
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.
if self.is_onpremise: | |
query_params = {"project": component_key} | |
endpoint_path = Endpoints.ONPREM_ISSUES | |
else: | |
query_params = {"componentKeys": component_key} | |
endpoint_path = Endpoints.SAAS_ISSUES | |
query_params = {"componentKeys": component_key} | |
if self.is_onpremise: | |
query_params = {"components": component_key} | |
else: | |
query_params = {"componentKeys": component_key} |
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.
Only components since we are using only one API
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.
LGTM
Description
What - Fixed a bug where SonarQube instances lower than 10.2 report a 404 error when retrieving issues
Why - This is because the issues list API on SonarQube was introduced in 10.2 and also as an internal API
How - Checking for the integration version and choosing the right API based on the integration version
Type of change
Please leave one option from the following and delete the rest:
All tests should be run against the port production environment(using a testing org).
Core testing checklist
Integration testing checklist
examples
folder in the integration directory.Preflight checklist
Screenshots
API Documentation
SonarQube issues list API