Details
-
Type:
Improvement
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 9.5
-
Component/s: None
-
Labels:
-
Edition:Community
-
Production Notes:None
Description
WHY
Azure DevOps connection may fail for several reasons.
We are authenticating against ADO when defining Global DevOps Platform settings, and also when providing a PAT for Project Import.
We should improve the logs of these operations to provide a better insight on what's happening when the connection does not work.
WHAT
The user must be able to determine if there is a problem coming from
- The target URL
- The token/permissions
- The security (SSL certificate) (out of scope for this ticket)
- The use of something not supported (ex: TFVC version control protocol) (out of scope for this ticket)
Ideally, the logs should explicit:
- If an SSL error happened (out of scope for this ticket)
- This can be the case if the JRE/JDK running SonarQube doesn't have the CA certificate used by the Azure DevOps server loaded
- If the token has expired
- If the token does not have the right permission
- If the URL is invalid
- If the target SCM is something else than Git (ex: TFVC, which we don't support) (out of scope for this ticket)
- If the target PR to decorate does not exist
- If the target branch to analyse does not exist (out of scope for this ticket)
SonarQube should log
- every PR decoration failed attempts with
- Target server URL
- Target collection/organisation
- Current token permission (if possible) (out of scope for this ticket)
- Presence of any SSL certificate or proxy (out of scope for this ticket)
- PR reference number
- all connection failed attempts with
- target server URL
- target collection/organization
- presence of any SSL certificate or proxy (out of scope for this ticket)
- any error messages related