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

Migrate Azure Resource plugin #1856

Open
wants to merge 69 commits into
base: main
Choose a base branch
from

Conversation

kajahanne
Copy link

@kajahanne kajahanne commented Nov 6, 2024

Hey, I just made a Pull Request!

I raised this pull request to move the Azure Resources plugin from repos https://github.com/vippsas/backstage-azure-resources-backend and https://github.com/vippsas/backstage-azure-resource-frontend to the backstage/community-plugins repo so it is easy to manage, collaborate & improve with the Backstage community and standards.
This move also includes handing over ownership of this plugin to @deepan10.

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)
  • All your commits have a Signed-off-by line in the message. (more info)

@backstage-goalie
Copy link
Contributor

Thanks for the contribution!
All commits need to be DCO signed before they are reviewed. Please refer to the the DCO section in CONTRIBUTING.md or the DCO status for more info.

backstage-service and others added 9 commits November 6, 2024 14:06
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
…ackstage#1826)

Signed-off-by: Nowacki, Kacper <kacper.nowacki@dynatrace.com>
Co-authored-by: Nick Boldt <nboldt@redhat.com>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
Signed-off-by: Kashish Mittal <kmittal@redhat.com>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
…ckstage#1850)

Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
…namic plugin build step (backstage#1849)

Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
…amic plugin build step (backstage#1848)

Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
@deepan10
Copy link
Member

deepan10 commented Nov 7, 2024

Hello @kajahanne

You have to move both frontend & backend plugin in to /workspaces/azure-resources/plugins/ directory with the default version 0.0.0 and create a changeset.

Here is reference PR #711

kajahanne and others added 7 commits November 11, 2024 10:52
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
04kash and others added 18 commits November 11, 2024 13:22
Signed-off-by: Kashish Mittal <kmittal@redhat.com>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
…ckstage#1850)

Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
…namic plugin build step (backstage#1849)

Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
…amic plugin build step (backstage#1848)

Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
…namic plugin build step (backstage#1849)

Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
Signed-off-by: Nick Boldt <nboldt@redhat.com>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
…namic plugin build step (backstage#1849)

Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
Signed-off-by: Kaja Hannestad <kaja.hannestad@vipps.no>
@awanlin
Copy link
Contributor

awanlin commented Nov 13, 2024

Hi @deepan10, can you give this a review please? Once you have approved I'll give it another look over.

Hi @kajahanne, as @deepan10 will be helping own this plugin I'd like them to review it first, just wanting to keep you in the loop as to how the review process will work. 👍

@deepan10
Copy link
Member

Hello @kajahanne ,

Good to see the plugin (Frontend + Backend). It is good to migrate the backend plugin to align with the New backend system https://backstage.io/docs/backend-system/architecture/index

Also, Can you migrate packages/app and packages/backend so that it gets easier running the plugins locally?

ClientSecretCredential,
DefaultAzureCredential,
} from '@azure/identity';
import { azureResourceConfig } from '../config';
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
import { azureResourceConfig } from '../config';
import { AzureResourceConfig } from '../config';

export async function createRouter(
options: RouterOptions,
): Promise<express.Router> {
const azureConfig = azureResourceConfig.fromConfig(options.config);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const azureConfig = azureResourceConfig.fromConfig(options.config);
const azureConfig = AzureResourceConfig.fromConfig(options.config);

Comment on lines +54 to +56
clientId: ab77a497-102e-4c4d-9853-3aca7e733245 # the app registrations clientId
clientSecret: ~AcbyiAM2YUMQwUSqhzg # a secret created for the app registration
tenantId: f02ae3d3-be5c-4b9d-9d6e-8192055d4083 # your Azure tenant id
Copy link
Member

Choose a reason for hiding this comment

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

Its good to mask it / use environmental variables

Suggested change
clientId: ab77a497-102e-4c4d-9853-3aca7e733245 # the app registrations clientId
clientSecret: ~AcbyiAM2YUMQwUSqhzg # a secret created for the app registration
tenantId: f02ae3d3-be5c-4b9d-9d6e-8192055d4083 # your Azure tenant id
clientId: ${AZURE_SP_ID} # the app registrations clientId
clientSecret: ${AZURE_SP_SECRET} # a secret created for the app registration
tenantId: ${AZURE_TENANT_ID} # your Azure tenant id

"devDependencies": {
"@backstage/cli": "^0.28.0",
"@backstage/e2e-test-utils": "^0.1.1",
"@backstage/repo-tools": "^0.8.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"@backstage/repo-tools": "^0.8.0",
"@backstage/repo-tools": "^0.10.0",

Can you make this change so that the generated api-reports are named as report.api.md ?

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.

8 participants