Import Solution --skip-lower-version flag #743
-
In my production environment deployment pipeline, I haven't enabled the --skip-lower-version flag for the import solution task to allow for solution rollbacks. When I rerun the pipeline, the solution is successfully installed with a lower version number. However, manually installing a solution with an older version throws an error "The import solution must have a higher version than the existing solution it is upgrading." Apart from potentially going against best practices, could importing a solution with an older version cause any functional issues? Since --skip-lower-version is optional, I assumed allowing older versions to be installed wouldn't be an issue, but I'm concerned there might be functional reasons why Microsoft prevents this during manual installation. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 14 replies
-
@tono0682 Admittedly, because the UI has never allowed an equivalent operation, I've (rightly or wrongly) assumed that it's just not possible to import a solution version that is lower than the version already installed. In addition, according to the ImportSolutionRequest object, there's no equivalent option available there: https://learn.microsoft.com/en-us/dotnet/api/microsoft.crm.sdk.messages.importsolutionrequest?view=dataverse-sdk-latest. So I thought this option was only for internal use and/or not working as expected yet. But I realise it's available in the PAC CLI and exposed on the Import Solution PPBT Task and Power Platform Github Action. Interestingly, the default value of the parameter is false, which presumably means that if you don't specify a value for it in your workflow/pipeline (as I haven't been) and the solution you import is of a lower version than the one already installed in the target, then the lower version will be installed - effectively a 'rollback' of the solution (which I thought was never possible?!): Am I understanding this correctly? 'Solution rollbacks' are possible, and in fact the default behaviour if you attempt to import previous versions of solutions, using PAC CLI, PPBT or Github Actions? |
Beta Was this translation helpful? Give feedback.
-
Wow, just tested this using my Github Action workflows without explicitly setting the 'Skip Lower Version' parameter for 2 of my solutions, using the 2-stage (Import as Holding Solution + Apply Upgrade) upgrade process for each. And it actually rolls back the solution version! I suspect PPBT in ADO will do the same. Anyone know the Power Platform Pipelines behaviour in this regard? Another reason to automate deployments (if anyone needed more!) 😄 |
Beta Was this translation helpful? Give feedback.
-
Sorry folks for the surprise here, The change allows for an import of a lower version of a solution over a higher version,This is a modification to at the solution import behavior in general. When using "Upgrade" mode, either StageAndUpgrade, or Upgrade / Holding / Apply, just as it is with an upgrade it is a Destructive Operation. When using "Update" mode, it is NOT a Destructive Operation. Its a merge operation as normal. SDK/API's: |
Beta Was this translation helpful? Give feedback.
Sorry folks for the surprise here,
This is a case where Doc's have not yet caught up with reality.
The change allows for an import of a lower version of a solution over a higher version,
This is a modification to at the solution import behavior in general.
We have removed the check that blocked a lower version of a solution from being imported over an existing version via the API.
When using "Upgrade" mode, either StageAndUpgrade, or Upgrade / Holding / Apply, just as it is with an upgrade it is a Destructive Operation.
When using "Update" mode, it is NOT a Destructive Operation. Its a merge operation as normal.
SDK/API's:
Pac CLI has the --Skip-Lower-Version (and you should put that in i…