Skip to content

Overwrite Unmanaged Customizations (force-overwrite) not working #1313

@ericregnier

Description

@ericregnier

Describe the bug
I have a yaml pipeline using the latest Power Platform Build Tools where I'm import a solution. My import solution task looks like this:

- task: PowerPlatformImportSolution@2
  displayName: "Import ${{parameters.SolutionInputFile}}"
  inputs:
    authenticationType: "PowerPlatformSPN"
    PowerPlatformSPN: ${{parameters.ServiceConnectionPP}}
    Environment: ${{parameters.Environment}}
    SolutionInputFile: "${{parameters.SolutionInputFile}}"
    ${{ if eq(parameters.DeploymentSettingsFile, '') }}:
      UseDeploymentSettingsFile: false
    ${{ if ne(parameters.DeploymentSettingsFile, '') }}:
      UseDeploymentSettingsFile: true
    DeploymentSettingsFile: "${{parameters.DeploymentSettingsFile}}"
    AsyncOperation: true
    MaxAsyncWaitTime: '60'
    StageAndUpgrade: ${{parameters.ApplySolutionUpgrade}}
    OverwriteUnmanagedCustomizations: true
    ActivatePlugins: true

Even though OverwriteUnmanagedCustomizations is set to true, my unmanaged customization in the target env are not being overwritten.

To Reproduce
Steps to reproduce the behavior:

  1. Have a yaml pipeline contain task PowerPlatformImportSolution@2
  2. Ensure OverwriteUnmanagedCustomizations is set to true as per my example above.
  3. Ensure publish all customizations is performed after (new tasks or within the task).
  4. Apply some unmanaged changes in the target env. E.g. changes to a security role.
  5. Ensure the solution being imported contains the component that you applied changes to in step # 3.
  6. See results

Actual Results
Unmanage changes still present in the target env after pipelines executes successfully without any errors. Raw logs of the import steps:

[
 'Calling pac cli inputs: solution import --path D:\\a\\1\\SolutionCI\\Solutions\\assetmanagement_managed.zip --async true --force-overwrite true --publish-changes false --skip-dependency-check false --convert-to-managed false --max-async-wait-time 60 --activate-plugins true --skip-lower-version false --stage-and-upgrade True --settings-file D:\\a\\1\\self\\Solutions\\assetmanagement\\DeploymentSettings\\deploymentSettings_tst.json'
]

Expected behavior
The unmanaged layer (changes) made in repro steps # 3 above are removed completely.

Additional context

  • Version: Power Platform Build Tools (2.0.97)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions