backstage icon indicating copy to clipboard operation
backstage copied to clipboard

Sonarqube plugin has hardcoded baseUrl

Open vbyjsue opened this issue 4 years ago • 2 comments

Expected Behavior

Using the sonarqube plugin, the reported items have a link which should lead to my hosted sonarqube defined in app.config.yaml

sonarQube:
  baseUrl: https://sonarqube.mydomain.se

Actual Behavior

All links have https://sonarcloud.io as baseUrl

Steps to Reproduce

Add any baseUrl to sonarQube config in app.config.yaml

Context

Make use of value in config instead of setting hard value in https://github.com/backstage/backstage/blob/master/plugins/sonarqube/src/api/SonarQubeClient.ts

constructor({
    discoveryApi,
    identityApi,
    baseUrl = 'https://sonarcloud.io/',
  }:

Your Environment

using "@backstage/plugin-sonarqube": "^0.3.3"

vbyjsue avatar Apr 12 '22 12:04 vbyjsue

As far as I can tell the plugin already uses the baseUrl in config by default: https://github.com/backstage/backstage/blob/33506401471986c44b4a347639a7417f77d60191/plugins/sonarqube/src/plugin.ts#L40

Perhaps double check that config is being set correctly? Or if you have added an override for the SonarQubeApi you may need to tweak the factory.

Rugvip avatar Apr 14 '22 10:04 Rugvip

Sorry, I jumped to conclusions. Working as expected.

vbyjsue avatar Apr 19 '22 09:04 vbyjsue