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://marketplace.visualstudio.com/items?itemName=nkdagility.vsts-sync-migration
MIT License
475 stars 322 forks source link

[Bug]: Pipelines migration: AzureDevOpsPipelineProcessor System.ArgumentNullException: Value cannot be null. Parameter name: source #2026

Closed nasterixk closed 1 month ago

nasterixk commented 2 months ago

Version

Source Version

Azure DevOps Service

Target Version

Azure DevOps Service

Relevant configuration

{
  "ChangeSetMappingFile": null,
  "Source": {
    "$type": "TfsTeamProjectConfig",
    "Collection": "https://dev.azure.com/XXXXXX",
    "Project": "XXXXXXXX",
    "ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
    "AllowCrossProjectLinking": false,
    "AuthenticationMode": "AccessToken",
    "PersonalAccessToken": "XXXXXXXX",
    "LanguageMaps": {
      "AreaPath": "Area",
      "IterationPath": "Iteration"
    },
    "CollectionName": "https://dev.azure.com/XXXXXXXX"
  },
  "Target": {
    "$type": "TfsTeamProjectConfig",
    "Collection": "https://dev.azure.com/XXXXXXXX",
    "Project": "XXXXXXXX",
    "ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
    "AllowCrossProjectLinking": false,
    "AuthenticationMode": "AccessToken",
    "PersonalAccessToken": "XXXXXXXX",
    "LanguageMaps": {
      "AreaPath": "Area",
      "IterationPath": "Iteration"
    },
    "CollectionName": "https://dev.azure.com/XXXXXXXX"
  },
  "FieldMaps": [],
  "GitRepoMapping": null,
  "LogLevel": "Debug",
  "CommonEnrichersConfig": [],
  "Processors": [
    {
      "$type": "AzureDevOpsPipelineProcessorOptions",
      "Enabled": true,
      "MigrateBuildPipelines": true,
      "MigrateReleasePipelines": false,
      "MigrateTaskGroups": false,
      "MigrateVariableGroups": false,
      "MigrateServiceConnections": false,
      "BuildPipelines": null,
      "ReleasePipelines": null,
      "RepositoryNameMaps": {},
      "ProcessorEnrichers": null,
      "SourceName": "AzureDevOpsEndpointSource",
      "TargetName": "AzureDevOpsEndpointTarget",
    }
  ],
  "Version": "15.0",
  "workaroundForQuerySOAPBugEnabled": false,
  "Endpoints": {
    "AzureDevOpsEndpoints": [
        {
          "name": "AzureDevOpsEndpointSource",
          "$type": "AzureDevOpsEndpointOptions",
          "Organisation": "https://dev.azure.com/XXXXXXXX",
          "Project": "XXXXXXXX",
          "AuthenticationMode": "AccessToken",
          "AccessToken": "XXXXXXXX",
          "EndpointEnrichers": null          
        },
        {
          "Name": "AzureDevOpsEndpointTarget",
          "$type": "AzureDevOpsEndpointOptions",
          "Organisation": "https://dev.azure.com/XXXXXXXX",
          "Project": "XXXXXXXX",
          "AuthenticationMode": "AccessToken",
          "AccessToken": "XXXXXXXX",
          "EndpointEnrichers": null
        }
    ]
  }
}

Relevant log output

[00:32:34 FTL] [v15.0.4] Error while running AzureDevOpsPipelineProcessor
System.ArgumentNullException: Value cannot be null.
Parameter name: source
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
   at MigrationTools.Processors.AzureDevOpsPipelineProcessor.<>c__DisplayClass12_1.<FilterOutIncompatibleBuildDefinitions>b__3(Step t) in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.Rest\Processors\AzureDevOpsPipelineProcessor.cs:line 172
   at System.Linq.Enumerable.All[TSource](IEnumerable`1 source, Func`2 predicate)
   at MigrationTools.Processors.AzureDevOpsPipelineProcessor.<>c__DisplayClass12_0.<FilterOutIncompatibleBuildDefinitions>b__0(BuildDefinition g) in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.Rest\Processors\AzureDevOpsPipelineProcessor.cs:line 170
   at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at MigrationTools.Processors.AzureDevOpsPipelineProcessor.<CreateBuildPipelinesAsync>d__17.MoveNext() in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.Rest\Processors\AzureDevOpsPipelineProcessor.cs:line 299
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MigrationTools.Processors.AzureDevOpsPipelineProcessor.<MigratePipelinesAsync>d__9.MoveNext() in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.Rest\Processors\AzureDevOpsPipelineProcessor.cs:line 95
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MigrationTools.Processors.AzureDevOpsPipelineProcessor.InternalExecute() in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.Rest\Processors\AzureDevOpsPipelineProcessor.cs:line 49
   at MigrationTools.Processors.Processor.Execute() in D:\a\1\s\src\MigrationTools\Processors\Processor.cs:line 106
[00:32:34 INF] [v15.0.4] AzureDevOpsPipelineProcessor completed in 00:03:28.8623093 
[00:32:34 ERR] [v15.0.4] AzureDevOpsPipelineProcessor The Processor MigrationEngine entered the failed state...stopping run

What happened?

I was trying to migrate the build pipelines and have been receiving the error saying value can't be null and parameter name seems to be source. Please let me know if I'm missing in the config

Debug in Visual Studio

nasterixk commented 2 months ago

Same config file is working when I try to migrate individual build pipelines but throwing this error when try to migrate all

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days