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
211 stars 38 forks source link

pac paportal upload deploymentProfile duplicating values rather than overriding #185

Closed flyfishMT closed 2 years ago

flyfishMT commented 2 years ago

This may be user error, but from all the documentation I have read, the deployment profile values are supposed to OVERRIDE the original value. What I see, is it deploys them both, and whatever uses the value doesn't always choose the deployment profile value. I would expect only the value in the deployment profile to be used. Should I delete the original value from the sitesettings.yml file? I didn't see any documentation say to do that.

/portal/deployment-profiles/dev.deployment.yml

adx_sitesetting:
- adx_name: Authentication/OpenIdConnect/AAD-B2C_1/Caption
  adx_sitesettingid: e91069f0-92a4-ec11-983f-000d3a58b83c
  adx_value: Azure AD B2C DEV

/portal/sitesetting.yml:

...
- adx_name: Authentication/OpenIdConnect/AAD-B2C_1/Caption
  adx_sitesettingid: e91069f0-92a4-ec11-983f-000d3a58b83c
  adx_value: Azure AD B2C
...

Command: pac paportal upload --path "./portal" -dp dev

Values in Portal Management App:

image

Ennvironment: WSL2, bash, Ubuntu 20.04.4 LTS Microsoft PowerPlatform CLI Version: 1.14.2+g7205df7

ameyaapte1 commented 2 years ago

Hello! I rechecked the deployment profile functionality on the latest pac version, it seems to work fine, it is not creating duplicate records and instead updating the existing records, can you please check the website ids of the records you have pasted in a screenshot, it's possible that the two records are for two different sites or the two records have different ids. The deployment profiles work based on the id of the records (in case of site settings it is adx_sitesettingid)

flyfishMT commented 2 years ago

Thanks for the response. I did miss that it was duplicated in sitesetting.yml. Once deleted, it works as expected, my apologies. I do see this guid/variable still referenced in /.portalconfig/.crm.dynamics.com-manifest.yml but doesn't appear to be used. Thanks again.