dyn365-ce-vsts-tasks icon indicating copy to clipboard operation
dyn365-ce-vsts-tasks copied to clipboard

MSCRMImportData reports Import Failure as Task succeeding

Open jshield-AFF opened this issue 3 years ago • 3 comments

2021-05-06T04:51:05.1040064Z ##[section]Starting: MSCRMImportCMData 2021-05-06T04:51:05.1413971Z ============================================================================== 2021-05-06T04:51:05.1414421Z Task : Import Config Migration Data 2021-05-06T04:51:05.1414801Z Description : Import data exported using Configuration Migration Tool into a CRM instance 2021-05-06T04:51:05.1415132Z Version : 12.0.4 2021-05-06T04:51:05.1415404Z Author : Wael Hamze 2021-05-06T04:51:05.1415922Z Help : More information on Configuration Migration Tools can be found [here](https://docs.microsoft.com/en-us/power-platform/admin/manage-configuration-data) 2021-05-06T04:51:05.1416477Z ============================================================================== 2021-05-06T04:51:07.5649554Z Downloading Microsoft.Xrm.Tooling.ConfigurationMigration 1.0.0.53 to: C:\hostedtoolcache\windows\MSCRMBuildTools\12.0.37 2021-05-06T04:51:13.9912912Z Downloading Microsoft.Xrm.Tooling.CrmConnector.PowerShell 3.3.0.899 to: C:\hostedtoolcache\windows\MSCRMBuildTools\12.0.37 2021-05-06T04:51:18.8301767Z Microsoft.Xrm.Tooling.CrmConnector.PowerShell 3.3.0.899 already cached in C:\hostedtoolcache\windows\MSCRMBuildTools\12.0.37\Microsoft.Xrm.Tooling.CrmConnector.PowerShell.3.3.0.899 2021-05-06T04:51:18.8390902Z C:\hostedtoolcache\windows\MSCRMBuildTools\12.0.37\Microsoft.Xrm.Tooling.CrmConnector.PowerShell.3.3.0.899 2021-05-06T04:51:25.6653629Z Microsoft.Xrm.Tooling.ConfigurationMigration.Powershell Information: 8 : Got CrmWebsvcAction Object from the Pipeline and is in Ready State 2021-05-06T04:51:25.7030494Z Microsoft.Xrm.Tooling.ConfigurationMigration.Powershell Warning: 4 : UserMap Specified but not found at D:\a\1\s\0. Skipping. 2021-05-06T04:51:26.0138036Z DataMigrationUtility.Import Information: 8 : ********************************************************* 2021-05-06T04:51:26.0170498Z DataMigrationUtility.Import Information: 8 : ** DATA IMPORT PARAMETERS ** 2021-05-06T04:51:26.0238321Z DataMigrationUtility.Import Information: 8 : OverrideDateMode: 2021-05-06T04:51:26.0242869Z DataMigrationUtility.Import Information: 8 : OverrideDataTimestamp: 2021-05-06T04:51:26.0259695Z DataMigrationUtility.Import Information: 8 : ********************************************************* 2021-05-06T04:51:26.0282124Z DataMigrationUtility.Import Information: 8 : ********************************************************* 2021-05-06T04:51:26.0350092Z DataMigrationUtility.Import Information: 8 : ** BEGIN IMPORT PROCESS ** 2021-05-06T04:51:26.0364617Z DataMigrationUtility.Import Information: 8 : ** Log Start: 05/06/2021 04:51:26 2021-05-06T04:51:26.0518726Z DataMigrationUtility.Import Information: 8 : Parsing import data file 2021-05-06T04:51:26.1760179Z DataMigrationUtility.Import Information: 8 : Parse Complete 2021-05-06T04:51:26.1786975Z Microsoft.Xrm.Tooling.ConfigurationMigration.Powershell Information: 8 : Parse Complete--Complete 2021-05-06T04:51:26.1828082Z DataMigrationUtility.Import Information: 8 : Beginning Import To CRM.. Importing 11 entities - 851 records 2021-05-06T04:51:26.1925451Z DataMigrationUtility.Import Information: 8 : Running Schema Validation 2021-05-06T04:51:26.1942143Z DataMigrationUtility.Import Information: 8 : Validating 11 Entities 2021-05-06T04:51:28.6705007Z DataMigrationUtility.Import Error: 2 : Missing Entities: <REDACTED> 2021-05-06T04:51:28.6719977Z DataMigrationUtility.Import Information: 8 : Schema Validation failed for Missing fields on Entities, See log for missing fields 2021-05-06T04:51:28.6765702Z Microsoft.Xrm.Tooling.ConfigurationMigration.Powershell Information: 8 : Schema Validation failed for Missing fields on Entities, See log for missing fields--Failed 2021-05-06T04:51:28.6775881Z DataMigrationUtility.Import Information: 8 : Import Process completed 2021-05-06T04:51:28.6788618Z Microsoft.Xrm.Tooling.ConfigurationMigration.Powershell Information: 8 : Import Process completed--Failed 2021-05-06T04:51:28.6797136Z DataMigrationUtility.Import Information: 8 : ********************************************************* 2021-05-06T04:51:28.6840392Z DataMigrationUtility.Import Information: 8 : ** EXIT IMPORT PROCESS FAIL ** 2021-05-06T04:51:28.6843118Z DataMigrationUtility.Import Information: 8 : ********************************************************* 2021-05-06T04:51:28.8553834Z ##[error]Schema Validation failed for Missing fields on Entities, See log for missing fields 2021-05-06T04:51:28.8707991Z ##[error]Import Process completed 2021-05-06T04:51:29.0963107Z ##[section]Finishing: MSCRMImportCMData

As you can see it's reporting a schema validation failure, but the azure pipeline task returns success and the pipeline continues on.

Is this the intended behaviour by default or is it something that is specified in the schema?

is there a way to ensure that a failure is returned to the pipeline? I thought about adding a step after to parse the log file and detect a failure but it feels like I'm going about it the wrong way.

jshield-AFF avatar May 11 '21 04:05 jshield-AFF

I've noticed the same, and now I've even noticed that while there are DataMigrationUtility.Import Error entries but the job still exists as EXIT IMPORT PROCESS COMPLETE

don-matese avatar Feb 11 '22 10:02 don-matese

@jshield-DAWR @don-matese have you tried with the latest versions of the PS Module or task? If this is still an issue we can discuss a potential solution. I can't think of anything else at the moment other than parsing the log file which is not ideal...

WaelHamze avatar Apr 01 '22 17:04 WaelHamze

@WaelHamze I have the latest version and it gives errors without stopping the pipeline. For me, it doesnt really have to stop exactly when the error is thrown but a check after the import would be fine.

@jshield-DAWR @don-matese did you find a way to get a workaround for this issue?

efei001 avatar Jun 02 '22 08:06 efei001