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

Add specific error message when organization is missing for SonarCloud #1549

Merged
merged 5 commits into from
Mar 31, 2023

Conversation

costin-zaharia-sonarsource
Copy link
Member

Fixes #1149

Copy link
Contributor

@sebastien-marichal sebastien-marichal left a comment

Choose a reason for hiding this comment

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

I am a bit surprised by the new parameter in SonarWebServer.IsServerLicenseValid 🤔

@@ -41,7 +41,7 @@ public SonarQubeWebServer(IDownloader downloader, Version serverVersion, ILogger
}
}

public override async Task<bool> IsServerLicenseValid()
public override async Task<bool> IsServerLicenseValid(string serverUrl)
Copy link
Contributor

Choose a reason for hiding this comment

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

It is bizarre to have a parameter here only to be able to log as it could be different from the one used to make the request.
I'd rather have the IDownloader.GetBaseUri back and use it to log. That way, we ensure the right serverUrl from the HttpClient.
WDYT?

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 agree. This simplifies the commit a bit.

@sonarcloud
Copy link

sonarcloud bot commented Mar 31, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@sebastien-marichal sebastien-marichal left a comment

Choose a reason for hiding this comment

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

LGTM!
Nice coverage! 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide more user friendly error when SQ is down or not running
2 participants