community-plugins icon indicating copy to clipboard operation
community-plugins copied to clipboard

🐛 Sonarqube: No information to display, however, the settings are correct

Open padupe opened this issue 5 months ago • 2 comments

Plugin Name

sonarqube

📜 Description

The settings are in accordance with the Backend and Frontend plugin documentation.

However, I receive the message on the frontend: No information to display

👍 Expected behavior

Sonarqube information is expected to be rendered as expected.

👎 Actual Behavior with Screenshots

Captura de Tela 2024-09-26 às 10 07 10 Captura de Tela 2024-09-26 às 09 53 19

👟 Reproduction steps

  1. Config at app-config.yaml:
sonarqube:
  baseUrl: https://sonarcloud.acme.com
  apiKey: ${SONARQUBE_TOKEN}
  1. Config at catalog-info.yaml:
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  name: gac-front-end
  description: Frontend GAC
  annotations:
    sonarqube.org/project-key: AP02126_GAC_FRONT_END
    github.com/project-slug: acme/gac-front-end
spec:
  type: service
  owner: group:squad-gac
  lifecycle: production
  1. Backend config
// packages/backend/src/index.ts
import { createBackend } from '@backstage/backend-defaults'

[...]

// New Backend System
const backend = createBackend()

[...] // Other plugins

backend.add(import('@backstage-community/plugin-sonarqube-backend'))

backend.start()
  1. EntityPage.tsx
// packages/app/src/components/EntityPage
import React from 'react';
import { EntitySonarQubeCard } from '@backstage-community/plugin-sonarqube';

[...]

const overviewCard = (
    <Grid container spacing={3} alignItems="stretch">
        {entityWarningContent}
        <Grid item md={6}>
           <EntityAboutCard variant="gridItem" />
        </Grid>
        <Grid item md={6}>
            <EntitySonarQubeCard variant="gridItem" />
        </Grid>

    [...]

     </Grid>
)

📃 Provide the context for the Bug.

I suspect it may be something related to CORS, but before the plugin was "migrated" to "community-plugins" it worked perfectly in a local environment.

👀 Have you spent some time to check if this bug has been raised before?

  • [X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

No, but I'm happy to collaborate on a PR with someone else

padupe avatar Sep 26 '24 13:09 padupe