Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An item with the same key has already been added #2340

Open
MrHinsh opened this issue Sep 6, 2024 · 1 comment
Open

An item with the same key has already been added #2340

MrHinsh opened this issue Sep 6, 2024 · 1 comment
Assignees

Comments

@MrHinsh
Copy link
Member

MrHinsh commented Sep 6, 2024

Got this error while migrating WI's. Can anyone help resolve this issue?

System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer) at System.Linq.Enumerable.ToDictionary[TSource,TKey](IEnumerable1 source, Func2 keySelector) at MigrationTools.Endpoints.TfsWorkItemConvertor.GetRevisionItems(RevisionCollection tfsRevisions) in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.ObjectModel\Endpoints\TfsWorkItemConvertor.cs:line 73 at MigrationTools.Endpoints.TfsWorkItemConvertor.MapWorkItemtoWorkItemData(WorkItemData context_wid, WorkItem context_wi, Dictionary2 fieldsOfRevision) in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.ObjectModel\Endpoints\TfsWorkItemConvertor.cs:line 39
at MigrationTools.TfsExtensions.RefreshWorkItem(WorkItemData context, Dictionary2 fieldsOfRevision) in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.ObjectModel\TfsExtensions.cs:line 51 at MigrationTools.TfsExtensions.SaveToAzureDevOps(WorkItemData context) in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.ObjectModel\TfsExtensions.cs:line 87 at VstsSyncMigrator.Engine.WorkItemMigrationContext.ReplayRevisions(List1 revisionsToMigrate, WorkItemData sourceWorkItem, WorkItemData targetWorkItem) in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 871

Originally posted by @akurisummoottil in #2336



Funding for us doing work on this tool is generally through 1) customer funding, or 2) donated free time.

Sponcer a Feature | Hire us directly

@MrHinsh MrHinsh self-assigned this Sep 6, 2024
@MrHinsh MrHinsh added the bug label Sep 6, 2024
@MrHinsh MrHinsh changed the title Got this error while migrating WI's. Can anyone help resolve this issue? An item with the same key has already been added Sep 6, 2024
@MrHinsh
Copy link
Member Author

MrHinsh commented Sep 6, 2024

I ran into the same error with the following logs when migration 190 work items:

migration-errors.log
migration.log

It looks like it an intermittent issue or some sort of race condition. Running arain with a failing workitem resulted in a success as in:

migration.log
migration-errors.log

Very strange behaviours and worth investigtaing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

1 participant