nkdAgility / azure-devops-migration-tools

Azure DevOps Migration Tools allow you to migrate Teams, Backlogs, Tasks, Test Cases, and Plans & Suits from one Project to another in Azure DevOps / TFS both within the same Organisation, and between Organisations.
https://nkdagility.com/learn/azure-devops-migration-tools/
MIT License
493 stars 328 forks source link

[Bug]: Git is not supported on this server #1577

Closed sid-at-ramboll closed 10 months ago

sid-at-ramboll commented 1 year ago

Version

Source Version

Team Foundation Server 2013

Target Version

Azure DevOps Service

Relevant configuration

No response

Relevant log output

[22:47:59 FTL] Error while running WorkItemMigration
System.NotSupportedException: Git is not supported on this server
   at Microsoft.TeamFoundation.Git.Client.WebServiceLayer.CheckWebServiceLevel()
   at Microsoft.TeamFoundation.Git.Client.WebServiceLayer.QueryRepositories(String projectNameOrId)
   at MigrationTools.Enrichers.TfsGitRepositoryEnricher..ctor(IServiceProvider services, ILogger`1 logger) in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.ObjectModel\Enrichers\TfsGitRepositoryEnricher.cs:line 39
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(Type serviceType)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at VstsSyncMigrator.Engine.WorkItemMigrationContext.InternalExecute() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 144
   at MigrationTools._EngineV1.Processors.MigrationProcessorBase.Execute() in D:\a\1\s\src\MigrationTools\_EngineV1\Processors\MigrationProcessorBase.cs:line 47
[22:47:59 ERR] WorkItemMigration The Processor MigrationEngine entered the failed state...stopping run
[22:47:59 INF] Application is shutting down...
[22:47:59 DBG] Hosting stopping
[22:47:59 DBG] Exiting with return code: 0
[22:47:59 INF] Application Ending
[22:47:59 INF] The application ran in 00:00:03.4396110 and finished at 06/28/2023 22:47:59
[22:47:59 DBG] Hosting stopped

What happened?

Source - TFS 2012 Version 11.0.60610.1 Destination - Azure DevOps Service

Git is present in the server where this script ran and also is present in the TFS server. Still facing this error.

migration.log

Debug in Visual Studio

sid-at-ramboll commented 1 year ago

Below is the config file,

{ "ChangeSetMappingFile": null, "Source": { "$type": "TfsTeamProjectConfig", "Collection": "http://ramhydapp02d:8080/tfs/DDC/", "Project": "CesiumDag", "ReflectedWorkItemIDFieldName": "TfsMigrationTool.ReflectedWorkItemId", "AllowCrossProjectLinking": false, "AuthenticationMode": "Prompt", "PersonalAccessToken": "", "PersonalAccessTokenVariableName": "", "LanguageMaps": { "AreaPath": "Area", "IterationPath": "Iteration" } }, "Target": { "$type": "TfsTeamProjectConfig", "Collection": "https://dev.azure.com/Ri-Rambase/", "Project": "CesiumDag", "ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId", "AllowCrossProjectLinking": false, "AuthenticationMode": "Prompt", "PersonalAccessToken": "", "PersonalAccessTokenVariableName": "", "LanguageMaps": { "AreaPath": "Area", "IterationPath": "Iteration" } }, "FieldMaps": [ { "$type": "MultiValueConditionalMapConfig", "WorkItemTypeName": "", "sourceFieldsAndValues": { "Field1": "Value1", "Field2": "Value2" }, "targetFieldsAndValues": { "Field1": "Value1", "Field2": "Value2" } }, { "$type": "FieldSkipMapConfig", "WorkItemTypeName": "", "targetField": "TfsMigrationTool.ReflectedWorkItemId" }, { "$type": "FieldValueMapConfig", "WorkItemTypeName": "", "sourceField": "System.State", "targetField": "System.State", "defaultValue": "New", "valueMapping": { "Approved": "New", "New": "New", "Committed": "Active", "In Progress": "Active", "To Do": "New", "Done": "Closed", "Removed": "Removed" } }, { "$type": "FieldtoFieldMapConfig", "WorkItemTypeName": "", "sourceField": "Microsoft.VSTS.Common.BacklogPriority", "targetField": "Microsoft.VSTS.Common.StackRank", "defaultValue": null }, { "$type": "FieldtoFieldMultiMapConfig", "WorkItemTypeName": "", "SourceToTargetMappings": { "SourceField1": "TargetField1", "SourceField2": "TargetField2" } }, { "$type": "FieldtoTagMapConfig", "WorkItemTypeName": "", "sourceField": "System.State", "formatExpression": "ScrumState:{0}" }, { "$type": "FieldMergeMapConfig", "WorkItemTypeName": "", "sourceFields": [ "System.Description", "Microsoft.VSTS.Common.AcceptanceCriteria" ], "targetField": "System.Description", "formatExpression": "{0}

Acceptance Criteria

{1}" }, { "$type": "RegexFieldMapConfig", "WorkItemTypeName": "", "sourceField": "COMPANY.PRODUCT.Release", "targetField": "COMPANY.DEVISION.MinorReleaseVersion", "pattern": "PRODUCT \d{4}.(\d{1})", "replacement": "$1" }, { "$type": "FieldValuetoTagMapConfig", "WorkItemTypeName": "", "sourceField": "Microsoft.VSTS.CMMI.Blocked", "pattern": "Yes", "formatExpression": "{0}" }, { "$type": "TreeToTagMapConfig", "WorkItemTypeName": "", "toSkip": 3, "timeTravel": 1 } ], "GitRepoMapping": null, "LogLevel": "Verbose", "CommonEnrichersConfig": null, "Processors": [ { "$type": "WorkItemMigrationConfig", "Enabled": true, "ReplayRevisions": true, "PrefixProjectToNodes": false, "UpdateCreatedDate": true, "UpdateCreatedBy": true, "WIQLQueryBit": "AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request')", "WIQLOrderBit": "[System.ChangedDate] desc", "LinkMigration": true, "AttachmentMigration": true, "AttachmentWorkingPath": "c:\temp\WorkItemAttachmentWorkingFolder\", "FixHtmlAttachmentLinks": false, "SkipToFinalRevisedWorkItemType": true, "WorkItemCreateRetryLimit": 5, "FilterWorkItemsThatAlreadyExistInTarget": true, "PauseAfterEachWorkItem": false, "AttachmentMaxSize": 480000000, "AttachRevisionHistory": false, "LinkMigrationSaveEachAsAdded": false, "GenerateMigrationComment": true, "WorkItemIDs": null, "MaxRevisions": 0, "UseCommonNodeStructureEnricherConfig": false, "StopMigrationOnMissingAreaIterationNodes": true, "NodeBasePaths": [ "Product\Area\Path1", "Product\Area\Path2" ], "AreaMaps": {}, "IterationMaps": {}, "MaxGracefulFailures": 0, "SkipRevisionWithInvalidIterationPath": false, "SkipRevisionWithInvalidAreaPath": false } ], "Version": "13.0", "workaroundForQuerySOAPBugEnabled": false, "WorkItemTypeDefinition": { "sourceWorkItemTypeName": "targetWorkItemTypeName" }, "Endpoints": { "InMemoryWorkItemEndpoints": [ { "Name": "Source", "EndpointEnrichers": null }, { "Name": "Target", "EndpointEnrichers": null } ] } }

MrHinsh commented 1 year ago

We will need to add a flag for enabling or disabling Git integration!

sid-at-ramboll commented 1 year ago

We are trying to migrate from TFS 2012. Will the tool work for our case?

MrHinsh commented 1 year ago

With the flag, yes.

Why don't you move the whole Collection at once with Microsofts migration tools?

sid-at-ramboll commented 1 year ago

I guess that MS tool will work if you are migrating from TFS 2018. Our current plan is to upgrade the TFS 2012 to 2018 and then use your nkdAgility tool to migrate to Azure DevOps services. Meanwhile, if you have finished adding the flag, then we will use your tool to migrate directly to Azure DevOps services from TFS 2012.

MrHinsh commented 1 year ago

I have not even looked at the flag and I am unlikely to have time soon.

I always recommend the MSFT import tool as the first choose.

sid-at-ramboll commented 1 year ago

No issues Martin. I understand, please implement at your own pace.