backstage / community-plugins

Community plugins for Backstage
Apache License 2.0
148 stars 157 forks source link

πŸ”Œ Plugin: Consolidate Azure DevOps Scaffolder Actions #1393

Open awanlin opened 2 days ago

awanlin commented 2 days ago

πŸ”– Summary

Currently there are two packages that seems to be moderately unmaintained - they both look to have changes merged in the last month - that the Community is using for Azure DevOps Scaffolder Actions. Should these be consolidated into a single plugin/package in the Community Plugins repo in the existing Azure DevOps workspace?

🌐 Project website (if applicable)

✌️ Context

Discord Thread: https://discord.com/channels/687207715902193673/1154845617756065932

Request to move one of the packages: https://github.com/Parfuemerie-Douglas/scaffolder-backend-module-azure-pipelines/issues/30

PR to move one to here: https://github.com/backstage/community-plugins/pull/1358

πŸ‘€ Have you spent some time to check if this plugin request has been raised before?

✍️ Are you willing to maintain the plugin?

🏒 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

awanlin commented 2 days ago

As the owner of the current Azure DevOps workspace in this repo I'm open to helping maintain these if they are moved but that would mostly be helping with reviews and version bumping things. I would expect the general community to contribute new features, fix bug, or do any other migration work.

awanlin commented 2 days ago

@antoniobergas and @Phiph - would like your feedback on this as you have a better idea of the current state of things. Ideally I'd like to have all the actions in one plugin/package this just makes things a lot easier to take care of.

antoniobergas commented 2 days ago

Hi @awanlin, thanks a lot for starting to move this topic. Recently, I had to work with repos and make changes via PR using the scaffolder (essentially the Azure DevOps repos actions package).

To make it work (at least in our internal instance), I needed to change the Git implementation because the auth was not working properly for us; some extra headers were needed, and I think the Git implementation from Backstage packages was deprecated. Not sure if this is a specific case or something that can happen to more people.

Also, I think one of the packages is using fetch and the other azure-devops-node-api. I would suggest unifying them and using azure-devops-node-api in both.

Regarding the authorization, I recently got it working with the new backend system by creating a customExtension. I’m not 100% sure if the injection of the integrations dependency is correct, but it works!

Hope this info helps with the migration!

Phiph commented 1 day ago

Thanks for starting this conversation, @awanlin! I'd be happy to help maintain the Azure DevOps actions in the community, as I use them daily.

Like Antonio, I map the actions using the createBackendModule function. Both packages work well with the registered Service Principal and the user tokens from the scaffolder.

However, I had to uninstall the azure-pipelines package due to some dependency issues between the plugin packages and the backend.

@antoniobergas For this first action the PR I've submitted should work for both our needs. I checked your code and noticed you're using the DefaultAzureDevOpsCredentialsProvider, which is the same approach proposed in the PR.

We should be able to unify most of the actions to use azure-devops-node-api thanks to the v13 release that includes PipelinesInterfaces. For the permitAzurePipeline action, we might need to use fetch, as the pipelinepermissions API isn't in the package yet.

On a separate note, do you think that dotnet actions should be added in this azure workspace?