microsoft / powerplatform-vscode

The Power Platform VSCode extension makes it easy to manage Power Platform environments and allows the developer to create, build and deploy Power Platform solutions, packages and portals.
MIT License
210 stars 38 forks source link

Command library canvas app (.msapp) filename is different for every solution export #386

Open filcole opened 1 year ago

filcole commented 1 year ago

When exporting a solution containing a command library canvas app the app name is different on each export. This creates noisy diffs and bloats source control.

To reproduce:

  1. Publish all via pac solution publish --async
  2. Export solution with pac solution export --name $soln --path $zipfname --async
  3. Unpack solution `pac solution unpack --zipfile "$zipfname" --folder "$solutionfolder" --packagetype $packageType --errorlevel Warning --allowDelete true --processCanvasApps
  4. Repeat steps 2 and 3

Note it does not matter if Unmanaged or Both packageTypes, or if --processCanvasApps is omitted (and a later pac canvas unpack is used)

image

Support Request: I've logged as support request 2212170050000218 for our client scenario.

Example demo solutions containing a single app, table and command bar button attached. Solutions.zip

filcole commented 1 year ago

There's a temporary fix/hack/workaround here: https://github.com/filcole/SolutionFixComponentLibraryFilename that sets the filenames consistently based on the id in filename of the *.meta.xml file.

Note this does not occur for traditional canvas apps, or custom pages, or component libraries created directly within a solutino in the maker portal. It only occurs for component libraries created automatically when adding the first command bar PowerFx function to an app.

filcole commented 1 year ago

Discovered this only happens when the command library logical name is too long. I tried to rename the component library, e.g. image but this does not work, since the logicalname is used. image

kkanakas commented 1 year ago

@filcole, appreciate raising the issue, @davidjenni and @paulbreuler can we confirm this is indeed the issue that Phil has raised.

paulbreuler commented 1 year ago

I am able to reproduce this behavior and will start investigating.

petrochuk commented 1 year ago

@filcole are you still seeing this issue?

filcole commented 1 year ago

Hi @petrochuk, Yes. I'm still seeing this. Can be reproduced by unpacking the solution attached to this github issue (see initial description). The temporary workaround here: https://github.com/filcole/SolutionFixComponentLibraryFilename is still fixing the issue for me.

petrochuk commented 1 year ago

I can repo it too but this is not PAC CLI issue. This is Dataverse solution export issue.

filcole commented 1 year ago

Hi @petrochuk, I spoke with MS support yesterday. This issue has been accepted by the product team and a fix will be created (no timeline). SR 2212170050000218

petrochuk commented 1 year ago

Speaking of msapp files. We are adding

pac canvas

download    Download canvas app as .msapp file
list        List canvas apps