nkdAgility / azure-devops-migration-tools

Azure DevOps Migration Tools allow you to migrate Teams, Backlogs, Work Items, 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/
GNU Affero General Public License v3.0
500 stars 332 forks source link

Failed on call to get list of [Service Connections]. #992

Closed joshuarichards512 closed 2 years ago

joshuarichards512 commented 3 years ago

This is for issues: For questions on usage please use https://stackoverflow.com/questions/tagged/azure-devops-migration-tools and tag with azure-devops-migration-tools

Describe your issue:

AzureDevOpsPipelineProcessor fails calling /_apis/serviceendpoint/endpoints/? I am able to call the endpoint via cURL with the provided token and a valid return is produced The same issue is happening with VariableGroup and TaskGroup. configuration.txt migration.txt

Source Details

Target Details

I have completed the following:

Many issues are due to edge cases and will need debugging in Visual Studio; we cant do that for you on your environment.

joshuarichards512 commented 3 years ago

Anything I can do to help with the troubleshooting?

joshuarichards512 commented 3 years ago

Not the results I was hoping to see:

Url: GET https://[tfs].com/tfs/[collection]/[project]/_apis/serviceendpoint/endpoints/? Response Code:NotFound Page not found.

I am able to browse to the URL in a browser and the API results are returned. I have ensured the token has the proper scopes / have tried using "Prompt"

hajtomoto commented 3 years ago

The issue here might be the hardcoded version api-verision that PipelineProcessor is using. It is in source code src/MigrationTools.Clients.AzureDevops.Rest/Endpoints/AzureDevOpsEndpoint.cs line 130: builder.Query = "api-version=5.1";

In our case (we had DevOps Server 2019.0.1) we needed to use "api-version=5.0-preview" to make it to work. So run the tool from Visual Studio and overwrite this line. Good sugestion for developers would be to give option to select "api-version" during execution instead of hardcoding it.

github-actions[bot] commented 3 years 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

tomfrenzel commented 3 years ago

The issue here might be the hardcoded version api-verision that PipelineProcessor is using. It is in source code src/MigrationTools.Clients.AzureDevops.Rest/Endpoints/AzureDevOpsEndpoint.cs line 130: builder.Query = "api-version=5.1";

In our case (we had DevOps Server 2019.0.1) we needed to use "api-version=5.0-preview" to make it to work. So run the tool from Visual Studio and overwrite this line. Good sugestion for developers would be to give option to select "api-version" during execution instead of hardcoding it.

Hey @hajtomoto!

I like your idea of allowing the user to specify the API version of their Azure DevOps instance on their own. I was thinking of keeping the existing code to specify the right version but instead, make it overrideable through the config.json.

Anyway, keep in mind the current behavior is more or less a workaround since there is no valid way to figure out the right endpoints or API versions used in an Azure DevOps instance (at least at the time I wrote that code).

github-actions[bot] commented 2 years 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

jsawanp1 commented 3 months ago

I am currently facing an issue with this tool version 15.1. As I am not a developer, I need some assistance with handling this issue via the configuration file.

I have provided the detailed error below: Error => 10:56:45 INF] [v15.1.3.0-] Processing Service Connections.. Error logged to Elmah.io [10:56:46 FTL] [v15.1.3.0-] Error while running AzureDevOpsPipelineProcessor System.Exception: Failed on call to get list of [ServiceConnection]. Url: GET https://migrationvmps/ADOMigration//MigrationTest/_apis/serviceendpoint/endpoints/? Response Code:NotFound Page not found. at MigrationTools.Endpoints.AzureDevOpsEndpoint.d91.MoveNext() in D:\a\1\s\src\MigrationTools.C lients.AzureDevops.Rest\Endpoints\AzureDevOpsEndpoint.cs:line 220 --- 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 System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at MigrationTools.Processors.AzureDevOpsPipelineProcessor.d27.MoveNext() in D:\a\1\s\src\ MigrationTools.Clients.AzureDevops.Rest\Processors\AzureDevOpsPipelineProcessor.cs:line 619 --- 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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at MigrationTools.Processors.AzureDevOpsPipelineProcessor.d__9.MoveNext() in D:\a\1\s\src\Migration Tools.Clients.AzureDevops.Rest\Processors\AzureDevOpsPipelineProcessor.cs:line 83 --- 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 System.Runtime.CompilerServices.TaskAwaiter.GetResult() at MigrationTools.Processors.AzureDevOpsPipelineProcessor.InternalExecute() in D:\a\1\s\src\MigrationTools.Clients.AzureDe vops.Rest\Processors\AzureDevOpsPipelineProcessor.cs:line 49 at MigrationTools.Processors.Processor.Execute() in D:\a\1\s\src\MigrationTools\Processors\Processor.cs:line 105 [10:56:46 INF] [v15.1.3.0-] AzureDevOpsPipelineProcessor completed in 00:00:00.2341377 [10:56:46 ERR] [v15.1.3.0-] AzureDevOpsPipelineProcessor The Processor MigrationEngine entered the failed state...stopping ru n [10:56:46 INF] [v15.1.3.0-] Application is shutting down... [10:56:46 INF] [v15.1.3.0-] Application Ending [10:56:46 INF] [v15.1.3.0-] The application ran in 00:00:02.3707812 and finished at 08/05/2024 10:56:46