microsoft / coe-starter-kit

Other
767 stars 227 forks source link

[ALM Accelerator - BUG]: "Power Platform Unpack Solution" Job Step in export_solution_to_git failing in September release #3613

Closed concoursdude closed 2 years ago

concoursdude commented 2 years ago

Describe the issue

Just used the ALM CLI script to install ALM in my tenant after having a lot of trouble with packing/unpacking issues (among other things) with a manual install. Script seemed to work pretty well (had to fix some connection issues, set my global git login, etc. to get everything to work properly) but now I'm seeing a failure on the export_solution_to_git job step when attempting to commit. This is very similar to issues I was seeing in the August hotfix release, only I was seeing this error on the pack step when deploying instead. @mikefactorial has been assisting. image

Expected Behavior

Unpack the solution in source control after exporting managed/unmanaged solution zips.

What component are you experiencing the issue with?

ALM Accelerator Pipelines

What solution version are you using?

1.0.20220831.2

Steps To Reproduce

  1. Install ALM accelerator via CLI.
  2. Use defaults where applicable during json generation.
  3. Attempt to commit via ALM canvas app.
  4. Inspect export_solution_to_git pipeline during run, watch for failure on Power Platform Unpack Solution step

Anything else?

No response

mikefactorial commented 2 years ago

@concoursdude thanks for the update. Now that we moved from using a build of https://github.com/microsoft/PowerApps-Language-Tooling/ directly in our pipelines, to using the native Power Platform Build Tools task for canvas unpack you may have better luck posting this to https://github.com/microsoft/powerplatform-build-tools/issues since this isn't an ALM Accelerator specific issue.

concoursdude commented 2 years ago

@concoursdude thanks for the update. Now that we moved from using a build of https://github.com/microsoft/PowerApps-Language-Tooling/ directly in our pipelines, to using the native Power Platform Build Tools task for canvas unpack you may have better luck posting this to https://github.com/microsoft/powerplatform-build-tools/issues since this isn't an ALM Accelerator specific issue.

Thanks @mikefactorial. Happy to post over there but I'm weary that they will send this back over the fence and blame your implementation. Is this a known issue with the build tools or was it just assumed that the transition to the Power Platform Build Tools tasks would resolve the pack/unpack issues in these jobs? Did this issue never crop up in your teams' testing before pushing the September release?

mikefactorial commented 2 years ago

@concoursdude this is fair feedback, but there's nothing specific about our implementation of that specific step in the process and is almost certainly either a bug in the canvas unpack process or an anomoly in your canvas app (e.g. it's on a newer or older version than the unpack is expecting, or there's something specific that's not being handled in your app). If you'd like to validate this and be more specific in your request to the Power Platform Build tools team. You could create your own repro of the issue using just the build tools and not the accelerator. e.g.

pool:
  name: Azure Pipelines
steps:
- task: microsoft-IsvExpTools.PowerPlatform-BuildTools.tool-installer.PowerPlatformToolInstaller@2
  displayName: 'Power Platform Tool Installer '

- task: microsoft-IsvExpTools.PowerPlatform-BuildTools.export-solution.PowerPlatformExportSolution@2
  displayName: 'Power Platform Export Solution '
  inputs:
    authenticationType: PowerPlatformSPN
    PowerPlatformSPN: 'https://yourorg.crm.dynamics.com/'
    SolutionName: MySolution
    SolutionOutputFile: MyRepoDirectory\MySolution.zip

- task: microsoft-IsvExpTools.PowerPlatform-BuildTools.unpack-solution.PowerPlatformUnpackSolution@2
  displayName: 'Power Platform Unpack Solution '
  inputs:
    SolutionInputFile: MyRepoDirectory\MySolution.zip
    SolutionTargetFolder: MyRepoDirectory\Unpacked
mikefactorial commented 2 years ago

To answer your last question. We did extensive testing with a variety of solutions containing Canvas Apps including all of the CoE Starter Kit solutions in the current release and didn't run into any errors so it's possible if you are experiencing this with Solutions in your environment and are able to reproduce it with only the Power Platform build tasks that it's either an issue with the tooling or an issue with your specific environment. In case of the latter may require a support ticket.

concoursdude commented 2 years ago

@mikefactorial This is helpful. I will see what I can do with the advice you've given me here and hopefully I can get an assist from the build tools folks. Thanks for the response, much appreciated!

concoursdude commented 2 years ago

@mikefactorial Just FYI, unpacking the same solution file using your repro above is successful.

mikefactorial commented 2 years ago

@concoursdude there's a specific flag for unpacking canvas apps that I didn't include above since I just threw it together quickly. Try the following instead

- task: microsoft-IsvExpTools.PowerPlatform-BuildTools.unpack-solution.PowerPlatformUnpackSolution@2
  displayName: 'Power Platform Unpack Solution '
  inputs:
    SolutionInputFile: MyRepoDirectory\MySolution.zip
    SolutionTargetFolder: MyRepoDirectory\Unpacked
    ProcessCanvasApps: true
concoursdude commented 2 years ago

@concoursdude there's a specific flag for unpacking canvas apps that I didn't include above since I just threw it together quickly. Try the following instead

- task: microsoft-IsvExpTools.PowerPlatform-BuildTools.unpack-solution.PowerPlatformUnpackSolution@2
  displayName: 'Power Platform Unpack Solution '
  inputs:
    SolutionInputFile: MyRepoDirectory\MySolution.zip
    SolutionTargetFolder: MyRepoDirectory\Unpacked
    ProcessCanvasApps: true

Good catch. That caused it to fail. Hopefully this will be helpful for the build tools team.

mikefactorial commented 2 years ago

Closing this out as the issue is resolved in 1.9.4 release of build tools

devkeydet commented 2 years ago

1.19.4 of pac, 2.0.8 of build tools

CoEStarterKitBot commented 2 years ago

@concoursdude This has been fixed in the latest release. Please install the latest version of the toolkit following the instructions for installing updates. Note that if you do not remove the unmanaged layers as described there you will not receive updates from us.