microsoft / coe-starter-kit

Other
739 stars 216 forks source link

[ALM Accelerator - BUG]: Export-solution-to-Git Merge Pull Request error #2437

Closed Vaddeani closed 2 years ago

Vaddeani commented 2 years ago

Describe the issue

When I am trying to deploy solution from AA4PP App I am getting an error in export-to-git-branch Pipeline is not valid. The service connection does not exist or has not been authorized for use. getting an error as there was a resource authorization issue.

MicrosoftTeams-image

Expected Behavior

Pull request should be performed successfully.

What component are you experiencing the issue with?

ALM Accelerator Pipelines

What solution version are you using?

1.0.20220406.1

Steps To Reproduce

  1. click on deploy solution button AA4PP App
  2. Click on processing icon, which navigates to Azure Devops where I am able to see an error.

Anything else?

No response

AB#1234

mikefactorial commented 2 years ago

@Vaddeani I'm confused about the steps to reproduce and attached error message. The export pipeline should only run when you Commit the solution. It appears there is something wrong with your setup. Did you install using the coe-cli (https://docs.microsoft.com/en-us/power-platform/guidance/coe/cli/alm/overview) or did you follow the steps in (https://docs.microsoft.com/en-us/power-platform/guidance/coe/setup-almacceleratorpowerplatform)? If the latter I would double check that you followed these steps correctly https://docs.microsoft.com/en-us/power-platform/guidance/coe/setup-almacceleratorpowerplatform#create-export-pipeline-variables-optional and https://docs.microsoft.com/en-us/power-platform/guidance/coe/setup-almacceleratorpowerplatform#create-the-solution-build-and-deployment-pipelines.

A pull request should never trigger the export pipeline.

Vaddeani commented 2 years ago

Hi Mike, Thanks for the Response. We have installed the ALM accelerator using manual setup process provided by Microsoft, not the coe-cli When I try to click the Deploy Solution button from AA4PP APP, I am getting an error as below, The pipeline is not valid. Job export_solution_to_git: Step PowerPlatformPublishCustomizations input PowerPlatformSPN references service connection $(ServiceConnection) which could not be found. The service connection does not exist or has not been authorized for use. For authorization details, refer to https://aka.ms/yamlauthz. Job export_solution_to_git: Step PowerPlatformExportSolution1 input PowerPlatformSPN references service connection $(ServiceConnection) which could not be found. The service connection does not exist or has not been authorized for use. For authorization details, refer to https://aka.ms/yamlauthz."

According to the process, when I click on deploy solution AA4PP app it should trigger the deploy-validation-(Solution Name) pipeline, Instead it triggers export-solution-git pipeline not sure how?. As per the above error it is showing that pipeline is not valid and service connection doesn't exist, but I have configured the connections properly according to the document. Please let me know if I am missing any configurations. Also we observe that the pipeline trigger it shows some settings need attention always. Please Clarify.

pipe e

Thanks, Anil kumar

mikefactorial commented 2 years ago

@Vaddeani thanks for the details. It sounds like you may have accidentally associated the export pipeline with the branch policy instead of the deploy-validation-**** pipeline. https://docs.microsoft.com/en-us/power-platform/guidance/coe/setup-almacceleratorpowerplatform#setting-branch-policies-for-pull-request-validation

The screenshot there is misleading as it shows the prod pipeline instead of the validation pipeline. Will need to update that screenshot

mikefactorial commented 2 years ago

@Vaddeani closing this out as there's been no response for several weeks. Feel free to reopen if you are still having issues or let us know if this issue is resolved

varmadvss commented 3 months ago

Hi , I am facing the similar issue. 1) When i run the pipeline I am getting the below error. Which is not able to replace the variable Like (Service Connection,Agent Pool, VM.. etc)

After few hours it is working fine. We are working wit ALM from last 1 month. Sometims it will work, all a suddent it will start failing.

Service connection is taking as Environment URL

Error 👍 The pipeline is not valid. Job import_unmanaged_solution: Step buildConnectionVariables input PowerPlatformSPN references service connection which could not be found. The service connection{Environment URL} does not exist, has been disabled or has not been authorized for use. For authorization details, refer to https://aka.ms/yamlauthz. Job import_unmanaged_solution: Step PowerPlatformChecker input PowerPlatformSPN references service connection {Environment URL}which could not be found. The service connection does not exist, has been disabled or has not been authorized for use. For authorization details, refer to https://aka.ms/yamlauthz.