From 2673d0572baf571390e40da758435bd9f7772ec3 Mon Sep 17 00:00:00 2001 From: "Martin Hinshelwood nkdAgility.com" Date: Tue, 3 Sep 2024 14:35:41 +0100 Subject: [PATCH 01/11] Compile with new OpenTelemitery and no AI --- docs/Reference/Generated/MigrationTools.xml | 20 +- .../Endpoints/AzureDevOpsEndpoint.cs | 1 - ...ationTools.Clients.AzureDevops.Rest.csproj | 1 - ...ationTools.Clients.FileSystem.Tests.csproj | 1 - .../MigrationTools.Clients.FileSystem.csproj | 1 - ...nTools.Clients.TfsObjectModel.Tests.csproj | 1 - .../Clients/TfsWorkItemMigrationClient.cs | 275 ++++++++++-------- .../Clients/TfsWorkItemQuery.cs | 128 ++++---- .../Endpoints/TfsEndpoint.cs | 159 ++++++---- .../Endpoints/TfsTeamProjectEndpoint.cs | 49 ++-- ...grationTools.Clients.TfsObjectModel.csproj | 1 - .../TestPlansAndSuitesMigrationProcessor.cs | 30 +- .../Processors/TfsTeamSettingsProcessor.cs | 6 +- .../TfsWorkItemMigrationProcessor.cs | 150 +++++----- .../FieldMaps/FieldMapBase.cs | 3 +- .../Tools/TfsAttachmentTool.cs | 4 +- .../Tools/TfsEmbededImagesTool.cs | 2 +- .../Tools/TfsNodeStructureTool.cs | 2 +- .../Tools/TfsTeamSettingsTool.cs | 6 +- .../Tools/TfsUserMappingTool.cs | 2 +- .../Tools/TfsWorkItemEmbededLinkTool.cs | 4 +- .../Tools/TfsWorkItemLinkTool.cs | 6 +- .../MigrationTools.ConsoleCore.csproj | 1 - .../MigrationTools.ConsoleFull.csproj | 1 - src/MigrationTools.ConsoleFull/Program.cs | 40 +-- .../Properties/launchSettings.json | 4 +- .../Commands/CommandBase.cs | 35 ++- .../Commands/CommandSettingsBase.cs | 4 + .../Commands/ExecuteMigrationCommand.cs | 2 +- .../Commands/InitMigrationCommand.cs | 4 +- .../Commands/MigrationConfigCommand.cs | 13 +- .../Commands/UpgradeConfigCommand.cs | 118 ++++---- .../CustomDiagnostics/CustomConverter.cs | 54 ---- src/MigrationTools.Host/MigrationToolHost.cs | 29 -- .../MigrationTools.Host.csproj | 9 +- .../Services/DetectOnlineService.cs | 70 +++-- .../Services/DetectVersionService2.cs | 13 - .../MigrationTools.Shadows.csproj | 1 - .../ServiceCollectionExtensions.cs | 16 +- .../Services/TelemetryLoggerFake.cs | 34 +-- .../MigrationTools.Tests.csproj | 1 - .../Services/TelemetryLoggerMock.cs | 26 +- .../Endpoints/Infrastructure/Endpoint.cs | 2 + src/MigrationTools/MigrationEngine.cs | 98 +++---- src/MigrationTools/MigrationTools.csproj | 2 - .../Processors/Infrastructure/Processor.cs | 76 +++-- .../Infrastructure/ProcessorContainer.cs | 1 - .../Services/ActivitySourceProvider.cs | 157 ++++++++-- .../Services/ITelemetryLogger.cs | 17 +- .../Services/TelemetryClientAdapter.cs | 65 +---- 50 files changed, 840 insertions(+), 905 deletions(-) delete mode 100644 src/MigrationTools.Host/CustomDiagnostics/CustomConverter.cs diff --git a/docs/Reference/Generated/MigrationTools.xml b/docs/Reference/Generated/MigrationTools.xml index 050bad172..cffb1136e 100644 --- a/docs/Reference/Generated/MigrationTools.xml +++ b/docs/Reference/Generated/MigrationTools.xml @@ -258,37 +258,37 @@ - => @"topic/update-docs-2" + => @"topic/enable-upgrade-telemetery" - => @"26082d82" + => @"02994fe0" - => @"26082d82552f59963aad53b364d73bb74bf60803" + => @"02994fe0e8aec5d499f0ac58618e3dcfaeeb7c35" - => @"2024-08-30T09:13:07+01:00" + => @"2024-09-02T17:33:40+01:00" - => @"6" + => @"0" - => @"v16.0.0-Preview.4-6-g26082d82" + => @"v16.0.0-Preview.6" - => @"v16.0.0-Preview.4" + => @"v16.0.0-Preview.6" @@ -318,17 +318,17 @@ - => @"6" + => @"0" - => @"Preview.4" + => @"Preview.6" - => @"-Preview.4" + => @"-Preview.6" diff --git a/src/MigrationTools.Clients.AzureDevops.Rest/Endpoints/AzureDevOpsEndpoint.cs b/src/MigrationTools.Clients.AzureDevops.Rest/Endpoints/AzureDevOpsEndpoint.cs index 2cc84c313..3c03fef87 100644 --- a/src/MigrationTools.Clients.AzureDevops.Rest/Endpoints/AzureDevOpsEndpoint.cs +++ b/src/MigrationTools.Clients.AzureDevops.Rest/Endpoints/AzureDevOpsEndpoint.cs @@ -17,7 +17,6 @@ using MigrationTools.EndpointEnrichers; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; -using static Microsoft.ApplicationInsights.MetricDimensionNames.TelemetryContext; namespace MigrationTools.Endpoints { diff --git a/src/MigrationTools.Clients.AzureDevops.Rest/MigrationTools.Clients.AzureDevops.Rest.csproj b/src/MigrationTools.Clients.AzureDevops.Rest/MigrationTools.Clients.AzureDevops.Rest.csproj index 2eec1d02e..8a721e1b7 100644 --- a/src/MigrationTools.Clients.AzureDevops.Rest/MigrationTools.Clients.AzureDevops.Rest.csproj +++ b/src/MigrationTools.Clients.AzureDevops.Rest/MigrationTools.Clients.AzureDevops.Rest.csproj @@ -15,7 +15,6 @@ - diff --git a/src/MigrationTools.Clients.FileSystem.Tests/MigrationTools.Clients.FileSystem.Tests.csproj b/src/MigrationTools.Clients.FileSystem.Tests/MigrationTools.Clients.FileSystem.Tests.csproj index 9f4f02760..5681fdae7 100644 --- a/src/MigrationTools.Clients.FileSystem.Tests/MigrationTools.Clients.FileSystem.Tests.csproj +++ b/src/MigrationTools.Clients.FileSystem.Tests/MigrationTools.Clients.FileSystem.Tests.csproj @@ -9,7 +9,6 @@ - diff --git a/src/MigrationTools.Clients.FileSystem/MigrationTools.Clients.FileSystem.csproj b/src/MigrationTools.Clients.FileSystem/MigrationTools.Clients.FileSystem.csproj index a0b15768a..1fb39958b 100644 --- a/src/MigrationTools.Clients.FileSystem/MigrationTools.Clients.FileSystem.csproj +++ b/src/MigrationTools.Clients.FileSystem/MigrationTools.Clients.FileSystem.csproj @@ -16,7 +16,6 @@ - diff --git a/src/MigrationTools.Clients.TfsObjectModel.Tests/MigrationTools.Clients.TfsObjectModel.Tests.csproj b/src/MigrationTools.Clients.TfsObjectModel.Tests/MigrationTools.Clients.TfsObjectModel.Tests.csproj index e02c1deb6..a167c89c7 100644 --- a/src/MigrationTools.Clients.TfsObjectModel.Tests/MigrationTools.Clients.TfsObjectModel.Tests.csproj +++ b/src/MigrationTools.Clients.TfsObjectModel.Tests/MigrationTools.Clients.TfsObjectModel.Tests.csproj @@ -9,7 +9,6 @@ - diff --git a/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemMigrationClient.cs b/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemMigrationClient.cs index 1e451b83d..f1e6d0ec6 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemMigrationClient.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemMigrationClient.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; +using System.Diagnostics; +using System.Diagnostics.Metrics; using System.Linq; using System.Text; -using Microsoft.ApplicationInsights.Channel; -using Microsoft.ApplicationInsights.DataContracts; using Microsoft.Extensions.Options; using Microsoft.TeamFoundation.Client; using Microsoft.TeamFoundation.WorkItemTracking.Client; @@ -12,8 +12,9 @@ using MigrationTools.DataContracts; using MigrationTools.Endpoints; using MigrationTools.Endpoints.Infrastructure; +using MigrationTools.Services; +using OpenTelemetry.Metrics; using Serilog; -using static Microsoft.TeamFoundation.Client.CommandLine.Options; namespace MigrationTools._EngineV1.Clients { @@ -25,7 +26,7 @@ public class TfsWorkItemMigrationClient : WorkItemMigrationClientBase private ProjectData _project; private WorkItemStore _wistore; - public TfsWorkItemMigrationClient(IOptions options, IMigrationClient migrationClient, IWorkItemQueryBuilderFactory workItemQueryBuilderFactory, ITelemetryLogger telemetry) + public TfsWorkItemMigrationClient(IOptions options, IMigrationClient migrationClient, IWorkItemQueryBuilderFactory workItemQueryBuilderFactory, ITelemetryLogger telemetry, MeterProvider meterProvider) : base(options, migrationClient, telemetry) { _telemetry = telemetry; @@ -42,23 +43,24 @@ public List FilterExistingWorkItems( string query, TfsWorkItemMigrationClient sourceWorkItemMigrationClient) { - Log.Debug("FilterExistingWorkItems: START | "); - + using (var activity = ActivitySourceProvider.ActivitySource.StartActivity("FilterExistingWorkItems")) + { + Log.Debug("FilterByTarget: Query Execute..."); + var targetFoundItems = GetWorkItems(query); + Log.Debug("FilterByTarget: ... query complete."); + Log.Debug("FilterByTarget: Found {TargetWorkItemCount} based on the WIQLQuery in the target system.", targetFoundItems.Count); + var targetFoundIds = (from WorkItemData twi in targetFoundItems select GetReflectedWorkItemId(twi)) + //exclude null IDs + .Where(x => x != null) + .ToList(); + ////////////////////////////////////////////////////////// + var sourceWorkItems2 = sourceWorkItems.Where(p => targetFoundIds.All(p2 => p2.ToString() != sourceWorkItemMigrationClient.CreateReflectedWorkItemId(p).ToString())).ToList(); + Log.Debug("FilterByTarget: After removing all found work items there are {SourceWorkItemCount} remaining to be migrated.", sourceWorkItems.Count); + Log.Debug("FilterByTarget: END"); - Log.Debug("FilterByTarget: Query Execute..."); - var targetFoundItems = GetWorkItems(query); - Log.Debug("FilterByTarget: ... query complete."); - Log.Debug("FilterByTarget: Found {TargetWorkItemCount} based on the WIQLQuery in the target system.", targetFoundItems.Count); - var targetFoundIds = (from WorkItemData twi in targetFoundItems select GetReflectedWorkItemId(twi)) - //exclude null IDs - .Where(x=> x != null) - .ToList(); - ////////////////////////////////////////////////////////// - var sourceWorkItems2 = sourceWorkItems.Where(p => targetFoundIds.All(p2 => p2.ToString() != sourceWorkItemMigrationClient.CreateReflectedWorkItemId(p).ToString())).ToList(); - Log.Debug("FilterByTarget: After removing all found work items there are {SourceWorkItemCount} remaining to be migrated.", sourceWorkItems.Count); - Log.Debug("FilterByTarget: END"); - _telemetry.TrackEvent("FilterExistingWorkItems", new Dictionary { { "Project", Options.Project }, { "CollectionName", Options.CollectionName } }, new Dictionary { { "sourceWorkItems", sourceWorkItems.Count }, { "targetWorkItems", targetFoundItems.Count }, { "resultWorkItems", sourceWorkItems2.Count } }); - return sourceWorkItems2; + //_telemetry.TrackEvent("FilterExistingWorkItems", new Dictionary { { "Project", Options.Project }, { "CollectionName", Options.CollectionName } }, new Dictionary { { "sourceWorkItems", sourceWorkItems.Count }, { "targetWorkItems", targetFoundItems.Count }, { "resultWorkItems", sourceWorkItems2.Count } }); + return sourceWorkItems2; + } } public override WorkItemData FindReflectedWorkItem(WorkItemData workItemToReflect, bool cache) @@ -89,35 +91,39 @@ public override WorkItemData FindReflectedWorkItemByReflectedWorkItemId(string r public override ProjectData GetProject() { - var startTime = DateTime.UtcNow; - var timer = System.Diagnostics.Stopwatch.StartNew(); - Project y; - try + using (var activity = ActivitySourceProvider.ActivitySource.StartActivity("GetProject", ActivityKind.Client)) { - y = (from Project x in Store.Projects where string.Equals(x.Name, Options.Project, StringComparison.OrdinalIgnoreCase) select x).SingleOrDefault(); // Use Single instead of SingleOrDefault to force an exception here - if (y == null) + activity?.SetTagsFromOptions(Options); + activity?.SetTag("url.full", Store.TeamProjectCollection.Uri); + activity?.SetTag("server.address", Store.TeamProjectCollection.Uri); + activity?.SetTag("http.request.method", "GET"); + activity?.SetTag("http.response.status_code", "500"); + activity?.SetTag("migrationtools.client", "TfsObjectModel"); + activity?.SetEndTime(activity.StartTimeUtc.AddSeconds(10)); + + Project y = null; + try + { + activity?.Start(); + y = (from Project x in Store.Projects where string.Equals(x.Name, Options.Project, StringComparison.OrdinalIgnoreCase) select x).SingleOrDefault(); // Use Single instead of SingleOrDefault to force an exception here + if (y == null) + { + Log.Fatal("The project `{ConfiguredProjectName}` does not exist in the collection. Please fix to continue.", Options.Project); + Log.Error("Valid options are: @{projects}", Store.Projects.Cast().Select(x => x.Name).ToList()); + Environment.Exit(-1); + } + activity?.Stop(); + activity?.SetStatus(ActivityStatusCode.Ok); + } + catch (Exception ex) { - Log.Fatal("The project `{ConfiguredProjectName}` does not exist in the collection. Please fix to continue.", Options.Project); - Log.Error("Valid options are: @{projects}", Store.Projects.Cast().Select(x => x.Name).ToList()); + activity?.Stop(); + activity?.SetStatus(ActivityStatusCode.Error); + Log.Error(ex, "The project `{ConfiguredProjectName}` does not exist in the collection. Please fix to continue.", Options.Project); + ActivitySourceProvider.FlushTelemetery(); Environment.Exit(-1); } - timer.Stop(); - Telemetry.TrackDependency(new DependencyTelemetry("TfsObjectModel", Options.Collection.ToString(), "GetProject", null, startTime, timer.Elapsed, "200", true)); - return y?.ToProjectData(); // With SingleOrDefault earlier this would result in a NullReferenceException which is hard to debug - } - catch (Exception ex) - { - timer.Stop(); - Telemetry.TrackDependency(new DependencyTelemetry("TfsObjectModel", Options.Collection.ToString(), "GetProject", null, startTime, timer.Elapsed, "500", false)); - Telemetry.TrackException(ex, - new Dictionary { - { "CollectionUrl", Options.Collection.ToString() } - }, - new Dictionary { - { "Time",timer.ElapsedMilliseconds } - }); - Log.Error(ex, "The project `{ConfiguredProjectName}` does not exist in the collection. Please fix to continue.", Options.Project); - throw; + return y?.ToProjectData(); } } @@ -158,43 +164,41 @@ public override WorkItemData GetWorkItem(string id, bool stopOnError = true) public override WorkItemData GetWorkItem(int id, bool stopOnError = true) { - if (id == 0) + using (var activity = ActivitySourceProvider.ActivitySource.StartActivity("GetWorkItem", ActivityKind.Client)) { - throw new ArgumentOutOfRangeException("id", id, "id cant be empty."); - } - var startTime = DateTime.UtcNow; - var timer = System.Diagnostics.Stopwatch.StartNew(); - WorkItem y = null ; - try - { - Log.Debug("TfsWorkItemMigrationClient::GetWorkItem({id})", id); - y = Store.GetWorkItem(id); - timer.Stop(); - Telemetry.TrackDependency(new DependencyTelemetry("TfsObjectModel", Options.Collection.ToString(), "GetWorkItem", null, startTime, timer.Elapsed, "200", true)); - } - catch (Exception ex) - { - Telemetry.TrackException(ex, - new Dictionary { - { "CollectionUrl", Options.Collection.ToString() }, - { "Project", Options.Project.ToString() }, - { "WorkItem", id.ToString() } - }, - new Dictionary { - { "Time",timer.ElapsedMilliseconds } - }); - Log.Error(ex, "Unable to GetWorkItem with id[{id}]", id); - if (stopOnError) + activity?.SetTag("url.full", Store.TeamProjectCollection.Uri); + activity?.SetTag("server.address", Store.TeamProjectCollection.Uri); + activity?.SetTag("http.request.method", "GET"); + activity?.SetTag("http.response.status_code", "500"); + activity?.SetTag("migrationtools.client", "TfsObjectModel"); + activity?.SetEndTime(activity.StartTimeUtc.AddSeconds(10)); + if (id == 0) { - Environment.Exit(-1); - } - } finally - { - timer.Stop(); - Telemetry.TrackDependency(new DependencyTelemetry("TfsObjectModel", Options.Collection.ToString(), "GetWorkItem", null, startTime, timer.Elapsed, "500", false)); - + throw new ArgumentOutOfRangeException("id", id, "id cant be empty."); + } + WorkItem y = null; + try + { + activity?.Start(); + Log.Debug("TfsWorkItemMigrationClient::GetWorkItem({id})", id); + y = Store.GetWorkItem(id); + activity?.Stop(); + activity?.SetStatus(ActivityStatusCode.Ok); + } + catch (Exception ex) + { + activity?.Stop(); + activity?.SetStatus(ActivityStatusCode.Error); + Telemetry.TrackException(ex, activity.Tags); + Log.Error(ex, "Unable to GetWorkItem with id[{id}]", id); + if (stopOnError) + { + ActivitySourceProvider.FlushTelemetery(); + Environment.Exit(-1); + } + } + return y?.AsWorkItemData(); } - return y?.AsWorkItemData(); } public override List GetWorkItems() @@ -210,26 +214,36 @@ public override List GetWorkItemIds(string WIQLQuery) public override List GetWorkItems(string WIQLQuery) { - var query = GetWorkItemQuery(WIQLQuery); - return query.GetWorkItems(); + using (var activity = ActivitySourceProvider.ActivitySource.StartActivity("GetWorkItems")) + { + activity?.SetTagsFromOptions(Options); + activity?.SetTag("WIQLQuery", WIQLQuery); + var query = GetWorkItemQuery(WIQLQuery); + return query.GetWorkItems(); + } } public override List GetWorkItems(IWorkItemQueryBuilder queryBuilder) -{ + { queryBuilder.AddParameter("TeamProject", Options.Project); return queryBuilder.BuildWIQLQuery(MigrationClient).GetWorkItems(); } private Endpoints.IWorkItemQuery GetWorkItemQuery(string WIQLQuery) { - var wiqb = _workItemQueryBuilderFactory.Create(); - wiqb.Query = WIQLQuery; - wiqb.AddParameter("TeamProject", Options.Project); - wiqb.AddParameter("ReflectedWorkItemIdFieldName", Options.ReflectedWorkItemIDFieldName); - return wiqb.BuildWIQLQuery(MigrationClient); + using (var activity = ActivitySourceProvider.ActivitySource.StartActivity("GetWorkItemQuery")) + { + activity?.SetTagsFromOptions(Options); + activity?.SetTag("WIQLQuery", WIQLQuery); + var wiqb = _workItemQueryBuilderFactory.Create(); + wiqb.Query = WIQLQuery; + wiqb.AddParameter("TeamProject", Options.Project); + wiqb.AddParameter("ReflectedWorkItemIdFieldName", Options.ReflectedWorkItemIDFieldName); + return wiqb.BuildWIQLQuery(MigrationClient); + } } - protected void InnerConfigure(IMigrationClient migrationClient, bool bypassRules = true) + protected void InnerConfigure(IMigrationClient migrationClient, bool bypassRules = true) { _bypassRules = bypassRules ? WorkItemStoreFlags.BypassRules : WorkItemStoreFlags.None; _wistore = GetWorkItemStore(); @@ -243,20 +257,25 @@ public override WorkItemData PersistWorkItem(WorkItemData workItem) protected WorkItemData FindReflectedWorkItemByReflectedWorkItemId(ReflectedWorkItemId refId, bool cache = true) { - var foundWorkItem = GetFromCache(refId); - if (foundWorkItem is null) + using (var activity = ActivitySourceProvider.ActivitySource.StartActivity("GetWorkItemQuery")) { - var workItemQueryBuilder = CreateReflectedWorkItemQuery(refId.ToString()); - var query = workItemQueryBuilder.BuildWIQLQuery(MigrationClient); - var items = query.GetWorkItems(); - var reflectedFielName = Options.ReflectedWorkItemIDFieldName; - foundWorkItem = items.FirstOrDefault(wi => wi.ToWorkItem().Fields[reflectedFielName].Value.ToString() == refId.ToString()); - if (cache && foundWorkItem is not null) + activity?.SetTagsFromOptions(Options); + activity?.SetTag("ReflectedWorkItemId", refId); + var foundWorkItem = GetFromCache(refId); + if (foundWorkItem is null) { - AddToCache(foundWorkItem); + var workItemQueryBuilder = CreateReflectedWorkItemQuery(refId.ToString()); + var query = workItemQueryBuilder.BuildWIQLQuery(MigrationClient); + var items = query.GetWorkItems(); + var reflectedFielName = Options.ReflectedWorkItemIDFieldName; + foundWorkItem = items.FirstOrDefault(wi => wi.ToWorkItem().Fields[reflectedFielName].Value.ToString() == refId.ToString()); + if (cache && foundWorkItem is not null) + { + AddToCache(foundWorkItem); + } } + return foundWorkItem; } - return foundWorkItem; } private IWorkItemQueryBuilder CreateReflectedWorkItemQuery(string refId) @@ -289,40 +308,44 @@ private WorkItemData FindWorkItemByQuery(IWorkItemQueryBuilder query) private WorkItemStore GetWorkItemStore() { - var startTime = DateTime.UtcNow; - var timer = System.Diagnostics.Stopwatch.StartNew(); - WorkItemStore store; - try + using (var activity = ActivitySourceProvider.ActivitySource.StartActivity("GetWorkItemStore", ActivityKind.Client)) { - Log.Debug("TfsWorkItemMigrationClient::GetWorkItemStore({InternalCollection}, {bypassRules})", Options.Collection, _bypassRules); - store = new WorkItemStore((TfsTeamProjectCollection)MigrationClient.InternalCollection, _bypassRules); - timer.Stop(); - Telemetry.TrackDependency(new DependencyTelemetry("TfsObjectModel", Options.Collection.ToString(), "GetWorkItemStore", null, startTime, timer.Elapsed, "200", true)); - Log.Information("Work Item Store connected to {InternalCollection} with BypassRules set to {bypassRules}", Options.Collection, store.BypassRules); - if (_bypassRules == WorkItemStoreFlags.BypassRules) + activity?.SetTag("url.full", Options.Collection); + activity?.SetTag("server.address", Options.Collection); + activity?.SetTag("http.request.method", "GET"); + activity?.SetTag("http.response.status_code", "500"); + activity?.SetTag("migrationtools.client", "TfsObjectModel"); + activity?.SetTag("migrationtools.WorkItemStoreFlags", _bypassRules.ToString()); + activity?.SetTagsFromOptions(Options); + activity?.SetEndTime(activity.StartTimeUtc.AddSeconds(10)); + WorkItemStore store = null; + try { - if (store.BypassRules == false) + Log.Debug("TfsWorkItemMigrationClient::GetWorkItemStore({InternalCollection}, {bypassRules})", Options.Collection, _bypassRules); + store = new WorkItemStore((TfsTeamProjectCollection)MigrationClient.InternalCollection, _bypassRules); + activity?.Stop(); + activity?.SetStatus(ActivityStatusCode.Ok); + Log.Information("Work Item Store connected to {InternalCollection} with BypassRules set to {bypassRules}", Options.Collection, store.BypassRules); + if (_bypassRules == WorkItemStoreFlags.BypassRules) { - Log.Warning("TfsWorkItemMigrationClient::BypassRules Is not Enabled. Check your permissions on the server!"); + if (store.BypassRules == false) + { + Log.Warning("TfsWorkItemMigrationClient::BypassRules Is not Enabled. Check your permissions on the server!"); + } } - } + } + catch (Exception ex) + { + activity?.Stop(); + activity?.SetStatus(ActivityStatusCode.Error); + Telemetry.TrackException(ex, activity.Tags); + Log.Fatal(ex, "Unable to configure store"); + ActivitySourceProvider.FlushTelemetery(); + Environment.Exit(-1); + } + return store; } - catch (Exception ex) - { - timer.Stop(); - Telemetry.TrackDependency(new DependencyTelemetry("TfsObjectModel", Options.Collection.ToString(), "GetWorkItemStore", null, startTime, timer.Elapsed, "500", false)); - Telemetry.TrackException(ex, - new Dictionary { - { "CollectionUrl", Options.Collection.ToString() } - }, - new Dictionary { - { "Time",timer.ElapsedMilliseconds } - }); - Log.Error(ex, "Unable to configure store"); - throw; - } - return store; } } } \ No newline at end of file diff --git a/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemQuery.cs b/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemQuery.cs index 008239a44..e87d74684 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemQuery.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemQuery.cs @@ -3,9 +3,9 @@ using System.Diagnostics; using System.Linq; using System.Windows.Forms; -using Microsoft.ApplicationInsights.DataContracts; using Microsoft.TeamFoundation.WorkItemTracking.Client; using MigrationTools.DataContracts; +using MigrationTools.Services; using Serilog; namespace MigrationTools._EngineV1.Clients @@ -31,81 +31,85 @@ public override List GetWorkItems() private IList GetInternalWorkItems() { - Log.Debug("WorkItemQuery: ===========GetWorkItems============="); - var wiClient = (TfsWorkItemMigrationClient)MigrationClient.WorkItems; - Telemetry.TrackEvent("WorkItemQuery.Execute", Parameters, null); - Log.Debug("WorkItemQuery: TeamProjectCollection: {QueryTarget}", wiClient.Store.TeamProjectCollection.Uri.ToString()); - Log.Debug("WorkItemQuery: Query: {QueryText}", Query); - Log.Debug("WorkItemQuery: Parameters: {@QueryParams}", Parameters); - foreach (var item in Parameters) + using (var activity = ActivitySourceProvider.ActivitySource.StartActivity("TfsWorkItemQuery:GetInternalWorkItems", ActivityKind.Internal)) { - Log.Debug("WorkItemQuery: {0}: {1}", item.Key, item.Value); + activity?.SetTagsFromOptions(MigrationClient.Options); + activity?.SetTag("url.full", MigrationClient.Options.Collection); + activity?.SetTag("server.address", MigrationClient.Options.Collection); + activity?.SetTag("http.request.method", "GET"); + activity?.SetTag("migrationtools.client", "TfsObjectModel"); + activity?.SetEndTime(activity.StartTimeUtc.AddSeconds(10)); + foreach (var item in Parameters) + { + activity?.SetTag($"wiql.parameters.{item.Key}", item.Value); + } + + Log.Debug("WorkItemQuery: ===========GetWorkItems============="); + var wiClient = (TfsWorkItemMigrationClient)MigrationClient.WorkItems; + Log.Debug("WorkItemQuery: TeamProjectCollection: {QueryTarget}", wiClient.Store.TeamProjectCollection.Uri.ToString()); + Log.Debug("WorkItemQuery: Query: {QueryText}", Query); + Log.Debug("WorkItemQuery: Parameters: {@QueryParams}", Parameters); + foreach (var item in Parameters) + { + Log.Debug("WorkItemQuery: {0}: {1}", item.Key, item.Value); + } + return GetWorkItemsFromQuery(wiClient); } - return GetWorkItemsFromQuery(wiClient); } private IList GetWorkItemsFromQuery(TfsWorkItemMigrationClient wiClient) { - var startTime = DateTime.UtcNow; - var timer = Stopwatch.StartNew(); - var results = new List(); - try + using (var activity = ActivitySourceProvider.ActivitySource.StartActivity("GetWorkItemsFromQuery", ActivityKind.Client)) { - Log.Debug("Query sent"); - var workItemCollection = wiClient.Store.Query(Query); - if (workItemCollection.Count > 0) + activity?.SetTagsFromOptions(MigrationClient.Options); + activity?.SetTag("url.full", MigrationClient.Options.Collection); + activity?.SetTag("server.address", MigrationClient.Options.Collection); + activity?.SetTag("http.request.method", "GET"); + activity?.SetTag("migrationtools.client", "TfsObjectModel"); + activity?.SetEndTime(activity.StartTimeUtc.AddSeconds(10)); + var results = new List(); + try { - Log.Information("{0} Work items received, verifying", workItemCollection.Count); - foreach (WorkItem item in workItemCollection) + Log.Debug("Query sent"); + var workItemCollection = wiClient.Store.Query(Query); + if (workItemCollection.Count > 0) { - int id= 0; - try + Log.Information("{0} Work items received, verifying", workItemCollection.Count); + foreach (WorkItem item in workItemCollection) { - id = item.Id; - if (!string.IsNullOrEmpty(item.Title)) // Force to read WI - results.Add(item); - } - catch (DeniedOrNotExistException ex) - { - - Log.Warning(ex, "The Work Item {id} cant be accessed for some reason and returned a DeniedOrNotExistException! The specific error will be listed below.", id); - Telemetry.TrackException(ex, - new Dictionary - { - { "CollectionUrl", wiClient.Store.TeamProjectCollection.Uri.ToString() } - }, - new Dictionary - { - { "QueryTime",timer.ElapsedMilliseconds } - }); + int id = 0; + try + { + id = item.Id; + if (!string.IsNullOrEmpty(item.Title)) // Force to read WI + results.Add(item); + } + catch (DeniedOrNotExistException ex) + { + + Log.Warning(ex, "The Work Item {id} cant be accessed for some reason and returned a DeniedOrNotExistException! The specific error will be listed below.", id); + Telemetry.TrackException(ex, activity.Tags); + } } } + activity?.SetTag("http.response.status_code", "200"); } - timer.Stop(); - Telemetry.TrackDependency(new DependencyTelemetry("TfsObjectModel", MigrationClient.Options.Collection.ToString(), "GetWorkItemsFromQuery", null, startTime, timer.Elapsed, "200", true)); - } - catch (ValidationException ex) - { - timer.Stop(); - Telemetry.TrackDependency(new DependencyTelemetry("TfsObjectModel", MigrationClient.Options.Collection.ToString(), "GetWorkItemsFromQuery", null, startTime, timer.Elapsed, "500", false)); - Log.Error(ex, " Error running query"); - Environment.Exit(-1); - } - catch (Exception ex) - { - timer.Stop(); - Telemetry.TrackDependency(new DependencyTelemetry("TfsObjectModel", MigrationClient.Options.Collection.ToString(), "GetWorkItemsFromQuery", null, startTime, timer.Elapsed, "500", false)); - Telemetry.TrackException(ex, - new Dictionary { - { "CollectionUrl", wiClient.Store.TeamProjectCollection.Uri.ToString() } - }, - new Dictionary { - { "QueryTime",timer.ElapsedMilliseconds } - }); - Log.Error(ex, " Error running query"); - throw; + catch (ValidationException ex) + { + activity?.SetTag("http.response.status_code", "500"); + Log.Error(ex, " Error running query"); + Environment.Exit(-1); + } + catch (Exception ex) + { + + activity?.SetTag("http.response.status_code", "500"); + Telemetry.TrackException(ex, activity.Tags); + Log.Error(ex, " Error running query"); + throw; + } + return results; } - return results; } } } \ No newline at end of file diff --git a/src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsEndpoint.cs b/src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsEndpoint.cs index f994ee5ee..f5979785d 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsEndpoint.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsEndpoint.cs @@ -1,11 +1,12 @@ using System; -using Microsoft.ApplicationInsights.DataContracts; +using System.Diagnostics; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.TeamFoundation.Client; using Microsoft.TeamFoundation.WorkItemTracking.Client; using Microsoft.VisualStudio.Services.Common; using MigrationTools.EndpointEnrichers; +using MigrationTools.Services; namespace MigrationTools.Endpoints { @@ -62,71 +63,94 @@ public Uri TfsProjectUri private TfsTeamProjectCollection GetTfsCollection() { - if (_Collection is null) + using (var activity = ActivitySourceProvider.ActivitySource.StartActivity("GetTfsCollection", ActivityKind.Client)) { - var startTime = DateTime.UtcNow; - var timer = System.Diagnostics.Stopwatch.StartNew(); - VssCredentials vssCredentials; - try + activity?.SetTagsFromOptions(Options); + activity?.SetTag("url.full", Options.Organisation); + activity?.SetTag("server.address", Options.Organisation); + activity?.SetTag("http.request.method", "GET"); + activity?.SetTag("migrationtools.client", "TfsObjectModel"); + activity?.SetEndTime(activity.StartTimeUtc.AddSeconds(10)); + + if (_Collection is null) { - Log.LogDebug("TfsWorkItemEndPoint::GetTfsCollection:AuthenticationMode({0})", Options.AuthenticationMode.ToString()); - switch (Options.AuthenticationMode) + VssCredentials vssCredentials; + try { - case AuthenticationMode.AccessToken: - Log.LogDebug("TfsWorkItemEndPoint::GetTfsCollection: Connecting Using PAT Authentication ", Options.Organisation); - vssCredentials = new VssBasicCredential(string.Empty, Options.AccessToken); - _Collection = new TfsTeamProjectCollection(new Uri(Options.Organisation), vssCredentials); - break; - - case AuthenticationMode.Prompt: - Log.LogDebug("TfsWorkItemEndPoint::EnsureDataSource: Connecting Using Interactive Authentication ", Options.Organisation); - _Collection = new TfsTeamProjectCollection(new Uri(Options.Organisation)); - break; - - default: - Log.LogDebug("TfsWorkItemEndPoint::EnsureDataSource: Connecting Using Interactive Authentication ", Options.Organisation); - _Collection = new TfsTeamProjectCollection(new Uri(Options.Organisation)); - break; + Log.LogDebug("TfsWorkItemEndPoint::GetTfsCollection:AuthenticationMode({0})", Options.AuthenticationMode.ToString()); + switch (Options.AuthenticationMode) + { + case AuthenticationMode.AccessToken: + Log.LogDebug("TfsWorkItemEndPoint::GetTfsCollection: Connecting Using PAT Authentication ", Options.Organisation); + vssCredentials = new VssBasicCredential(string.Empty, Options.AccessToken); + _Collection = new TfsTeamProjectCollection(new Uri(Options.Organisation), vssCredentials); + break; + + case AuthenticationMode.Prompt: + Log.LogDebug("TfsWorkItemEndPoint::EnsureDataSource: Connecting Using Interactive Authentication ", Options.Organisation); + _Collection = new TfsTeamProjectCollection(new Uri(Options.Organisation)); + break; + + default: + Log.LogDebug("TfsWorkItemEndPoint::EnsureDataSource: Connecting Using Interactive Authentication ", Options.Organisation); + _Collection = new TfsTeamProjectCollection(new Uri(Options.Organisation)); + break; + } + Log.LogDebug("TfsWorkItemEndPoint::GetTfsCollection: Connected "); + Log.LogDebug("TfsWorkItemEndPoint::GetTfsCollection: validating security for {@AuthorizedIdentity} ", _Collection.AuthorizedIdentity); + _Collection.EnsureAuthenticated(); + + Log.LogInformation("TfsWorkItemEndPoint::GetTfsCollection: Access granted to {CollectionUrl} for {Name} ({Account})", Options.Organisation, _Collection.AuthorizedIdentity.DisplayName, _Collection.AuthorizedIdentity.UniqueName); + activity?.Stop(); + activity?.SetStatus(ActivityStatusCode.Ok); + activity?.SetTag("http.response.status_code", "200"); + } + catch (Exception ex) + { + + activity?.Stop(); + activity?.SetStatus(ActivityStatusCode.Error); + activity?.SetTag("http.response.status_code", "500"); + Telemetry.TrackException(ex, null); + Log.LogError(ex, "Unable to connect to {Organisation}", Options.Organisation); + throw; } - Log.LogDebug("TfsWorkItemEndPoint::GetTfsCollection: Connected "); - Log.LogDebug("TfsWorkItemEndPoint::GetTfsCollection: validating security for {@AuthorizedIdentity} ", _Collection.AuthorizedIdentity); - _Collection.EnsureAuthenticated(); - timer.Stop(); - Log.LogInformation("TfsWorkItemEndPoint::GetTfsCollection: Access granted to {CollectionUrl} for {Name} ({Account})", Options.Organisation, _Collection.AuthorizedIdentity.DisplayName, _Collection.AuthorizedIdentity.UniqueName); - Telemetry.TrackDependency(new DependencyTelemetry("TfsObjectModel", Options.Organisation, "GetTfsCollection", null, startTime, timer.Elapsed, "200", true)); - } - catch (Exception ex) - { - timer.Stop(); - Telemetry.TrackDependency(new DependencyTelemetry("TfsObjectModel", Options.Organisation, "GetTfsCollection", null, startTime, timer.Elapsed, "500", false)); - Telemetry.TrackException(ex, null, null); - Log.LogError(ex, "Unable to connect to {Organisation}", Options.Organisation); - throw; } + return _Collection; } - return _Collection; } private WorkItemStore GetWorkItemStore(TfsTeamProjectCollection tfs, WorkItemStoreFlags bypassRules) { if (_Store is null) { - var startTime = DateTime.UtcNow; - var timer = System.Diagnostics.Stopwatch.StartNew(); - try - { - _Store = new WorkItemStore(tfs, bypassRules); - } - catch (Exception ex) - { - Telemetry.TrackException(ex, null, null); - Log.LogError(ex, "Unable to connect to {Organisation} Store", Options.Organisation); - throw; - } - finally + using (var activity = ActivitySourceProvider.ActivitySource.StartActivity("GetWorkItemStore", ActivityKind.Client)) { - timer.Stop(); - Telemetry.TrackDependency(new DependencyTelemetry("TfsObjectModel", Options.Organisation, "GetWorkItemStore", null, startTime, timer.Elapsed, "200", true)); + activity?.SetTagsFromOptions(Options); + activity?.SetTag("url.full", Options.Organisation); + activity?.SetTag("server.address", Options.Organisation); + activity?.SetTag("http.request.method", "GET"); + activity?.SetTag("migrationtools.client", "TfsObjectModel"); + activity?.SetEndTime(activity.StartTimeUtc.AddSeconds(10)); + try + { + _Store = new WorkItemStore(tfs, bypassRules); + activity?.Stop(); + activity?.SetStatus(ActivityStatusCode.Ok); + activity?.SetTag("http.response.status_code", "200"); + } + catch (Exception ex) + { + Telemetry.TrackException(ex, null); + Log.LogError(ex, "Unable to connect to {Organisation} Store", Options.Organisation); + throw; + } + finally + { + activity?.Stop(); + activity?.SetStatus(ActivityStatusCode.Error); + activity?.SetTag("http.response.status_code", "500"); + } } } @@ -139,14 +163,29 @@ private Project GetTfsProject() var timer = System.Diagnostics.Stopwatch.StartNew(); if (_Project is null) { - if (TfsStore.Projects.Contains(Options.Project)) + using (var activity = ActivitySourceProvider.ActivitySource.StartActivity("GetTfsProject", ActivityKind.Client)) { - _Project = TfsStore.Projects[Options.Project]; - } - else - { - Telemetry.TrackDependency(new DependencyTelemetry("TfsObjectModel", Options.Organisation, "GetTfsProject", null, startTime, timer.Elapsed, "500", false)); - Log.LogError(new InvalidFieldValueException(), "Unable to find to {Project}", Options.Project); + activity?.SetTagsFromOptions(Options); + activity?.SetTag("url.full", Options.Organisation); + activity?.SetTag("server.address", Options.Organisation); + activity?.SetTag("http.request.method", "GET"); + activity?.SetTag("migrationtools.client", "TfsObjectModel"); + activity?.SetEndTime(activity.StartTimeUtc.AddSeconds(10)); + + + if (TfsStore.Projects.Contains(Options.Project)) + { + _Project = TfsStore.Projects[Options.Project]; + activity?.Stop(); + activity?.SetStatus(ActivityStatusCode.Ok); + activity?.SetTag("http.response.status_code", "200"); + } + else + { + activity?.Stop(); + activity?.SetStatus(ActivityStatusCode.Error); + Log.LogError(new InvalidFieldValueException(), "Unable to find to {Project}", Options.Project); + } } } return _Project; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsTeamProjectEndpoint.cs b/src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsTeamProjectEndpoint.cs index fcd2be8f9..a6c45f576 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsTeamProjectEndpoint.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsTeamProjectEndpoint.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Net; -using Microsoft.ApplicationInsights.DataContracts; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; @@ -15,6 +15,7 @@ using MigrationTools.Endpoints; using MigrationTools.Endpoints.Infrastructure; using MigrationTools.Options; +using MigrationTools.Services; using Serilog; namespace MigrationTools._EngineV1.Clients @@ -73,21 +74,20 @@ private void EnsureCollection() { if (_collection == null) { - Telemetry.TrackEvent("TeamProjectContext.EnsureCollection", - new Dictionary { - { "Name", Options.Project}, - { "Target Project", Options.Project}, - { "Target Collection",Options.Collection.ToString() }, - { "ReflectedWorkItemID Field Name",Options.ReflectedWorkItemIDFieldName } - }, null); _collection = GetDependantTfsCollection(); } } private TfsTeamProjectCollection GetDependantTfsCollection() { - var startTime = DateTime.UtcNow; - var timer = System.Diagnostics.Stopwatch.StartNew(); + using (var activity = ActivitySourceProvider.ActivitySource.StartActivity("GetDependantTfsCollection", ActivityKind.Client)) + { + activity?.SetTagsFromOptions(Options); + activity?.SetTag("url.full", Options.Collection); + activity?.SetTag("server.address", Options.Collection); + activity?.SetTag("http.request.method", "GET"); + activity?.SetTag("migrationtools.client", "TfsObjectModel"); + activity?.SetEndTime(activity.StartTimeUtc.AddSeconds(10)); TfsTeamProjectCollection y = null; try { @@ -131,29 +131,25 @@ private TfsTeamProjectCollection GetDependantTfsCollection() Log.LogDebug("MigrationClient: Connecting to {CollectionUrl} ", Options.Collection); Log.LogTrace("MigrationClient: validating security for {@AuthorizedIdentity} ", y.AuthorizedIdentity); y.EnsureAuthenticated(); - timer.Stop(); - Log.LogInformation("Access granted to {CollectionUrl} for {Name} ({Account})", Options.Collection, y.AuthorizedIdentity.DisplayName, y.AuthorizedIdentity.UniqueName); - Telemetry.TrackDependency(new DependencyTelemetry("TfsObjectModel", Options.Collection.ToString(), "GetWorkItem", null, startTime, timer.Elapsed, "200", true)); + activity?.Stop(); + activity?.SetStatus(ActivityStatusCode.Ok); + activity?.SetTag("http.response.status_code", "200"); + Log.LogInformation("Access granted to {CollectionUrl} for {Name} ({Account})", Options.Collection, y.AuthorizedIdentity.DisplayName, y.AuthorizedIdentity.UniqueName); } catch (TeamFoundationServerUnauthorizedException ex) { - timer.Stop(); - Telemetry.TrackDependency(new DependencyTelemetry("TfsObjectModel", Options.Collection.ToString(), "GetWorkItem", null, startTime, timer.Elapsed, "401", false)); - Log.LogError(ex, "Unable to configure store: Check persmissions and credentials for {AuthenticationMode}!", Options.Authentication.AuthenticationMode); + activity?.Stop(); + activity?.SetStatus(ActivityStatusCode.Error); + activity?.SetTag("http.response.status_code", "401"); + Log.LogError(ex, "Unable to configure store: Check persmissions and credentials for {AuthenticationMode}!", Options.Authentication.AuthenticationMode); Environment.Exit(-1); } catch (Exception ex) { - timer.Stop(); - Telemetry.TrackDependency(new DependencyTelemetry("TfsObjectModel", Options.Collection.ToString(), "GetWorkItem", null, startTime, timer.Elapsed, "500", false)); - Telemetry.TrackException(ex, - new Dictionary { - { "CollectionUrl", Options.Collection.ToString() }, - { "TeamProjectName", Options.Project} - }, - new Dictionary { - { "Time",timer.ElapsedMilliseconds } - }); + activity?.Stop(); + activity?.SetStatus(ActivityStatusCode.Error); + activity?.SetTag("http.response.status_code", "500"); + Telemetry.TrackException(ex, activity?.Tags); Log.LogError("Unable to configure store: Check persmissions and credentials for {AuthenticationMode}: " + ex.Message, Options.Authentication.AuthenticationMode); switch (Options.Authentication.AuthenticationMode) { @@ -166,6 +162,7 @@ private TfsTeamProjectCollection GetDependantTfsCollection() Environment.Exit(-1); } return y; + } } public T GetService() diff --git a/src/MigrationTools.Clients.TfsObjectModel/MigrationTools.Clients.TfsObjectModel.csproj b/src/MigrationTools.Clients.TfsObjectModel/MigrationTools.Clients.TfsObjectModel.csproj index 9e17a92ea..58fc095f5 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/MigrationTools.Clients.TfsObjectModel.csproj +++ b/src/MigrationTools.Clients.TfsObjectModel/MigrationTools.Clients.TfsObjectModel.csproj @@ -33,7 +33,6 @@ - diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TestPlansAndSuitesMigrationProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TestPlansAndSuitesMigrationProcessor.cs index f07af6cf2..2806dbe3c 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/TestPlansAndSuitesMigrationProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/TestPlansAndSuitesMigrationProcessor.cs @@ -27,6 +27,7 @@ using MigrationTools.Tools; using MigrationTools.Processors.Infrastructure; using MigrationTools.Enrichers; +using System.Diagnostics.Metrics; namespace MigrationTools.Processors { @@ -50,8 +51,15 @@ public class TestPlansAndSuitesMigrationProcessor : TfsProcessor private int _totalPlans = 0; private int _totalTestCases = 0; + + private static readonly Meter _meter = new Meter("MigrationTools.TestPlansAndSuitesMigrationProcessor", "1.0.0"); + private static readonly Counter _testPlansCounter = _meter.CreateCounter("test_plans_count"); + private static readonly Counter _testSuitesCounter = _meter.CreateCounter("test_suites_count"); + private static readonly Counter _testCasesCounter = _meter.CreateCounter("test_cases_count"); + public TestPlansAndSuitesMigrationProcessor(IOptions options, TfsCommonTools tfsCommonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsCommonTools, processorEnrichers, services, telemetry, logger) { + } new TestPlansAndSuitesMigrationProcessorOptions Options => (TestPlansAndSuitesMigrationProcessorOptions)base.Options; @@ -96,7 +104,7 @@ protected override void InternalExecute() foreach (ITestPlan sourcePlan in toProcess) { _currentPlan++; - + _testPlansCounter.Add(1); if (CanSkipElementBecauseOfTags(sourcePlan.Id)) { Log.LogInformation("TestPlansAndSuitesMigrationContext: Skipping Test Plan {Id}:'{Name}' as is not tagged with '{Tag}'.", sourcePlan.Id, sourcePlan.Name, Options.OnlyElementsWithTag); @@ -181,9 +189,6 @@ where tc.TestCase.WorkItem.Id.ToString() == wi.Id targetPlan.Save(); InnerLog(source, string.Format(" SAVED {0} : {1} - {2} ", target.TestSuiteType.ToString(), target.Id, target.Title), 15); - metrics.Add("ElapsedMS", stopwatch.ElapsedMilliseconds); - Telemetry.TrackEvent("MigrateTestCases", parameters, metrics); - Telemetry.TrackRequest("MigrateTestCases", starttime, stopwatch.Elapsed, "200", true); stopwatch.Stop(); _totalTestCases = 0; _currentTestCases = 0; @@ -256,7 +261,6 @@ where tc.TestCase.WorkItem.Id.ToString() == wi.Id { InnerLog(sourceSuite, $"Work Item for Test Case {sourceTce.Title} cannot be found in target. Has it been migrated?", 5); } - Telemetry.TrackRequest("ApplyConfigurationsAndAssignTesters", starttime, stopwatch.Elapsed, "200", true); } _totalTestCases = 0; _currentTestCases = 0; @@ -834,9 +838,6 @@ private void ProcessTestPlan(ITestPlan sourcePlan) { var stopwatch = Stopwatch.StartNew(); var starttime = DateTime.Now; - var metrics = new Dictionary(); - var parameters = new Dictionary(); - AddParameter("PlanId", parameters, sourcePlan.Id.ToString()); //////////////////////////////////// var newPlanName = $"{sourcePlan.Name}"; InnerLog(sourcePlan, $"Process Plan {newPlanName}", 0, true); @@ -885,7 +886,6 @@ private void ProcessTestPlan(ITestPlan sourcePlan) __currentSuite = 0; __totalSuites = sourcePlan.RootSuite.Entries.Count; InnerLog(sourcePlan, $"Source Plan has {__totalSuites} Suites", 5); - metrics.Add("SubSuites", __totalSuites); foreach (var sourceSuiteChild in sourcePlan.RootSuite.SubSuites) { __currentSuite++; @@ -913,13 +913,11 @@ private void ProcessTestPlan(ITestPlan sourcePlan) } /////////////////////////////////////////////// - metrics.Add("ElapsedMS", stopwatch.ElapsedMilliseconds); - Telemetry.TrackEvent("MigrateTestPlan", parameters, metrics); - Telemetry.TrackRequest("MigrateTestPlan", starttime, stopwatch.Elapsed, "200", true); } private void ProcessTestSuite(ITestSuiteBase sourceSuite, ITestSuiteBase targetParent, ITestPlan targetPlan) { + _testSuitesCounter.Add(1); if (CanSkipElementBecauseOfTags(sourceSuite.Id)) return; ////////////////////////////////////////// @@ -929,10 +927,6 @@ private void ProcessTestSuite(ITestSuiteBase sourceSuite, ITestSuiteBase targetP System.Threading.Thread.Sleep(Options.MigrationDelay); } var starttime = DateTime.Now; - var metrics = new Dictionary(); - var parameters = new Dictionary(); - AddParameter("SuiteId", parameters, sourceSuite.Id.ToString()); - AddParameter("TestSuiteType", parameters, sourceSuite.TestSuiteType.ToString()); //////////////////////////////////// InnerLog(sourceSuite, $" Processing {sourceSuite.TestSuiteType} : {sourceSuite.Id} - {sourceSuite.Title} ", 5); @@ -1036,10 +1030,6 @@ private void ProcessTestSuite(ITestSuiteBase sourceSuite, ITestSuiteBase targetP } } /////////////////////////////////////////////// - - metrics.Add("ElapsedMS", stopwatch.ElapsedMilliseconds); - Telemetry.TrackEvent("MigrateTestSuite", parameters, metrics); - Telemetry.TrackRequest("MigrateTestSuite", starttime, stopwatch.Elapsed, "200", true); } /// diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTeamSettingsProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTeamSettingsProcessor.cs index 6d3d6a9a2..b742c5f23 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTeamSettingsProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTeamSettingsProcessor.cs @@ -42,7 +42,7 @@ public TfsTeamSettingsProcessor(IOptions option } catch (Exception ex) { - Telemetry.TrackException(ex, null, null); + Telemetry.TrackException(ex, null); Log.LogError(ex, "{LogTypeName}: Unable load list of identities from target collection.", LogTypeName); return new List(); } @@ -350,7 +350,7 @@ private void MigrateCapacities(WorkHttpClient sourceHttpClient, WorkHttpClient t } catch (Exception ex) { - Telemetry.TrackException(ex, null, null); + Telemetry.TrackException(ex, null); Log.LogWarning(ex, "[SKIP] Problem migrating team capacities for iteration {iteration}.", sourceIteration.Path); } @@ -358,7 +358,7 @@ private void MigrateCapacities(WorkHttpClient sourceHttpClient, WorkHttpClient t } catch (Exception ex) { - Telemetry.TrackException(ex, null, null); + Telemetry.TrackException(ex, null); Log.LogWarning(ex, "[SKIP] Problem migrating team capacities."); } diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessor.cs index b3074b6c9..171f310a0 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessor.cs @@ -2,14 +2,13 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.Metrics; using System.Globalization; using System.Linq; using System.Net; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; -using Microsoft.ApplicationInsights.Channel; -using Microsoft.ApplicationInsights.DataContracts; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; @@ -32,6 +31,7 @@ using MigrationTools.DataContracts; using MigrationTools.Enrichers; using MigrationTools.Processors.Infrastructure; +using MigrationTools.Services; using MigrationTools.Tools; using Newtonsoft.Json.Linq; using Serilog.Context; @@ -57,8 +57,6 @@ public class TfsWorkItemMigrationProcessor : TfsProcessor private List _ignore; private ILogger contextLog; - private IDictionary processWorkItemMetrics = null; - private IDictionary processWorkItemParamiters = null; private ILogger workItemLog; private List _itemsInError; @@ -86,8 +84,13 @@ internal void TraceWriteLine(LogEventLevel level, string message, Dictionary WorkItemsProcessedCounter = WorkItemMeter.CreateCounter("work_items_processed_total"); + private static readonly Histogram WorkItemProcessingDurationHistogram = WorkItemMeter.CreateHistogram("work_item_processing_duration"); + protected override void InternalExecute() { + Log.LogDebug("WorkItemMigrationContext::InternalExecute "); if (Options == null) { @@ -100,13 +103,12 @@ protected override void InternalExecute() if (CommonTools.TeamSettings.Enabled) { CommonTools.TeamSettings.ProcessorExecutionBegin(this); - } else + } + else { Log.LogWarning("WorkItemMigrationContext::InternalExecute: teamSettingsEnricher is disabled!"); } - - var stopwatch = Stopwatch.StartNew(); _itemsInError = new List(); try @@ -160,7 +162,7 @@ protected override void InternalExecute() _totalWorkItem = sourceWorkItems.Count; foreach (WorkItemData sourceWorkItemData in sourceWorkItems) { - + var stopwatch = Stopwatch.StartNew(); var sourceWorkItem = TfsExtensions.ToWorkItem(sourceWorkItemData); workItemLog = contextLog.ForContext("SourceWorkItemId", sourceWorkItem.Id); using (LogContext.PushProperty("sourceWorkItemTypeName", sourceWorkItem.Type.Name)) @@ -173,6 +175,11 @@ protected override void InternalExecute() try { ProcessWorkItemAsync(sourceWorkItemData, Options.WorkItemCreateRetryLimit).Wait(); + + stopwatch.Stop(); + var processingTime = stopwatch.Elapsed.TotalMilliseconds; + WorkItemsProcessedCounter.Add(1, new KeyValuePair("workItemType", sourceWorkItemData.Type)); + WorkItemProcessingDurationHistogram.Record(processingTime, new KeyValuePair("workItemType", sourceWorkItemData.Type)); if (Options.PauseAfterEachWorkItem) { Console.WriteLine("Do you want to continue? (y/n)"); @@ -205,16 +212,15 @@ protected override void InternalExecute() { if (Options.FixHtmlAttachmentLinks) { - CommonTools.EmbededImages?.ProcessorExecutionEnd(null); + CommonTools.EmbededImages?.ProcessorExecutionEnd(null); } - stopwatch.Stop(); if (_itemsInError.Count > 0) { contextLog.Warning("The following items could not be migrated: {ItemIds}", string.Join(", ", _itemsInError)); } - contextLog.Information("DONE in {Elapsed}", stopwatch.Elapsed.ToString("c")); + } } @@ -228,7 +234,7 @@ private void ValidateAllUsersExistOrAreMapped(List sourceWorkItems { Log.LogWarning("Validating Failed! There are {usersToMap} users that exist in the source that do not exist in the target. This will not cause any errors, but may result in disconnected users that could have been mapped. Use the ExportUsersForMapping processor to create a list of mappable users. Then Import using ", usersToMap.Count); } - + } //private void ValidateAllNodesExistOrAreMapped(List sourceWorkItems) @@ -257,7 +263,7 @@ private void ValidateAllWorkItemTypesHaveReflectedWorkItemIdField(List(); - processWorkItemParamiters = new Dictionary(); - AddParameter("SourceURL", processWorkItemParamiters, Source.Options.Collection.ToString()); - AddParameter("SourceWorkItem", processWorkItemParamiters, sourceWorkItem.Id); - AddParameter("TargetURL", processWorkItemParamiters, Target.Options.Collection.ToString()); - AddParameter("TargetProject", processWorkItemParamiters, Target.WorkItems.Project.Name); - AddParameter("RetryLimit", processWorkItemParamiters, retryLimit.ToString()); - AddParameter("RetryNumber", processWorkItemParamiters, retries.ToString()); + using (var activity = ActivitySourceProvider.ActivitySource.StartActivity("ProcessWorkItemAsync", ActivityKind.Client)) + { + activity?.SetTagsFromOptions(Options); + activity?.SetTag("http.request.method", "GET"); + activity?.SetTag("migrationtools.client", "TfsObjectModel"); + activity?.SetEndTime(activity.StartTimeUtc.AddSeconds(10)); + activity?.SetTag("SourceURL", Source.Options.Collection.ToString()); + activity?.SetTag("SourceWorkItem", sourceWorkItem.Id); + activity?.SetTag("TargetURL", Target.Options.Collection.ToString()); + activity?.SetTag("TargetProject", Target.WorkItems.Project.Name); + activity?.SetTag("RetryLimit", retryLimit.ToString()); + activity?.SetTag("RetryNumber", retries.ToString()); Log.LogDebug("######################################################################################"); Log.LogDebug("ProcessWorkItem: {sourceWorkItemId}", sourceWorkItem.Id); Log.LogDebug("######################################################################################"); @@ -525,7 +540,8 @@ private async Task ProcessWorkItemAsync(WorkItemData sourceWorkItem, int retryLi if (targetWorkItem == null) { targetWorkItem = ReplayRevisions(revisionsToMigrate, sourceWorkItem, null); - AddMetric("Revisions", processWorkItemMetrics, revisionsToMigrate.Count); + activity?.SetTag("Revisions", revisionsToMigrate.Count); + } else { @@ -536,7 +552,7 @@ private async Task ProcessWorkItemAsync(WorkItemData sourceWorkItem, int retryLi ProcessHTMLFieldAttachements(targetWorkItem); ProcessWorkItemEmbeddedLinks(sourceWorkItem, targetWorkItem); TraceWriteLine(LogEventLevel.Information, "Skipping as work item exists and no revisions to sync detected"); - processWorkItemMetrics.Add("Revisions", 0); + activity?.SetTag("Revisions", 0); } else { @@ -546,13 +562,8 @@ private async Task ProcessWorkItemAsync(WorkItemData sourceWorkItem, int retryLi }); targetWorkItem = ReplayRevisions(revisionsToMigrate, sourceWorkItem, targetWorkItem); - - AddMetric("Revisions", processWorkItemMetrics, revisionsToMigrate.Count); - AddMetric("SyncRev", processWorkItemMetrics, revisionsToMigrate.Count); } } - AddParameter("TargetWorkItem", processWorkItemParamiters, targetWorkItem.ToWorkItem().Revisions.Count.ToString()); - if (targetWorkItem != null && targetWorkItem.ToWorkItem().IsDirty) { targetWorkItem.SaveToAzureDevOps(); @@ -600,16 +611,14 @@ private async Task ProcessWorkItemAsync(WorkItemData sourceWorkItem, int retryLi } catch (Exception ex) { + activity?.Stop(); + activity?.SetStatus(ActivityStatusCode.Error); + activity?.SetTag("http.response.status_code", "502"); Log.LogError(ex, ex.ToString()); - Telemetry.TrackRequest("ProcessWorkItem", startTime, witStopWatch.Elapsed, "502", false); - Telemetry.TrackException(ex); + Telemetry.TrackException(ex, activity.Tags); throw ex; } - witStopWatch.Stop(); - _elapsedms += witStopWatch.ElapsedMilliseconds; - processWorkItemMetrics.Add("ElapsedTimeMS", _elapsedms); - - var average = new TimeSpan(0, 0, 0, 0, (int)(_elapsedms / _current)); + var average = new TimeSpan(0, 0, 0, 0, (int)(activity.Duration.TotalMilliseconds / _current)); var remaining = new TimeSpan(0, 0, 0, 0, (int)(average.TotalMilliseconds * _count)); TraceWriteLine(LogEventLevel.Information, "Average time of {average:%s}.{average:%fff} per work item and {remaining:%h} hours {remaining:%m} minutes {remaining:%s}.{remaining:%fff} seconds estimated to completion", @@ -617,11 +626,13 @@ private async Task ProcessWorkItemAsync(WorkItemData sourceWorkItem, int retryLi {"average", average}, {"remaining", remaining} }); - Telemetry.TrackEvent("WorkItemMigrated", processWorkItemParamiters, processWorkItemMetrics); - Telemetry.TrackRequest("ProcessWorkItem", startTime, witStopWatch.Elapsed, "200", true); + activity?.Stop(); + activity?.SetStatus(ActivityStatusCode.Error); + activity?.SetTag("http.response.status_code", "200"); _current++; _count--; + } } private void ProcessWorkItemAttachments(WorkItemData sourceWorkItem, WorkItemData targetWorkItem, bool save = true) @@ -630,7 +641,7 @@ private void ProcessWorkItemAttachments(WorkItemData sourceWorkItem, WorkItemDat { TraceWriteLine(LogEventLevel.Information, "Attachemnts {SourceWorkItemAttachmentCount} | LinkMigrator:{AttachmentMigration}", new Dictionary() { { "SourceWorkItemAttachmentCount", sourceWorkItem.ToWorkItem().Attachments.Count }, { "AttachmentMigration", CommonTools.Attachment.Enabled } }); CommonTools.Attachment.ProcessAttachemnts(this, sourceWorkItem, targetWorkItem, save); - AddMetric("Attachments", processWorkItemMetrics, targetWorkItem.ToWorkItem().AttachedFileCount); + //AddMetric("Attachments", processWorkItemMetrics, targetWorkItem.ToWorkItem().AttachedFileCount); } } @@ -640,11 +651,11 @@ private void ProcessWorkItemLinks(IWorkItemMigrationClient sourceStore, IWorkIte { TraceWriteLine(LogEventLevel.Information, "Links {SourceWorkItemLinkCount} | LinkMigrator:{LinkMigration}", new Dictionary() { { "SourceWorkItemLinkCount", sourceWorkItem.ToWorkItem().Links.Count }, { "LinkMigration", CommonTools.WorkItemLink.Enabled } }); CommonTools.WorkItemLink.Enrich(this, sourceWorkItem, targetWorkItem); - AddMetric("RelatedLinkCount", processWorkItemMetrics, targetWorkItem.ToWorkItem().Links.Count); + //AddMetric("RelatedLinkCount", processWorkItemMetrics, targetWorkItem.ToWorkItem().Links.Count); int fixedLinkCount = CommonTools.GitRepository.Enrich(this, sourceWorkItem, targetWorkItem); - AddMetric("FixedGitLinkCount", processWorkItemMetrics, fixedLinkCount); + // AddMetric("FixedGitLinkCount", processWorkItemMetrics, fixedLinkCount); } - else if (targetWorkItem != null && sourceWorkItem.ToWorkItem().Links.Count > 0 && sourceWorkItem.Type == "Test Case" ) + else if (targetWorkItem != null && sourceWorkItem.ToWorkItem().Links.Count > 0 && sourceWorkItem.Type == "Test Case") { CommonTools.WorkItemLink.MigrateSharedSteps(this, sourceWorkItem, targetWorkItem); CommonTools.WorkItemLink.MigrateSharedParameters(this, sourceWorkItem, targetWorkItem); @@ -871,14 +882,15 @@ private WorkItemData ReplayRevisions(List revisionsToMigrate, Work private void CheckClosedDateIsValid(WorkItemData sourceWorkItem, WorkItemData targetWorkItem) { var closedDateField = "System.ClosedDate"; - if (targetWorkItem.ToWorkItem().Fields.Contains("Microsoft.VSTS.Common.ClosedDate")) { + if (targetWorkItem.ToWorkItem().Fields.Contains("Microsoft.VSTS.Common.ClosedDate")) + { closedDateField = "Microsoft.VSTS.Common.ClosedDate"; } Log.LogDebug("CheckClosedDateIsValid::ClosedDate field is {closedDateField}", closedDateField); if (targetWorkItem.ToWorkItem().Fields[closedDateField].Value == null && (targetWorkItem.ToWorkItem().Fields["System.State"].Value.ToString() == "Closed" || targetWorkItem.ToWorkItem().Fields["System.State"].Value.ToString() == "Done")) { Log.LogWarning("The field {closedDateField} is set to Null and will revert to the current date on save! ", closedDateField); - Log.LogWarning("Source Closed Date [#{sourceId}][Rev{sourceRev}]: {sourceClosedDate} ", sourceWorkItem.ToWorkItem().Id, sourceWorkItem.ToWorkItem().Rev, sourceWorkItem.ToWorkItem().Fields[closedDateField].Value); + Log.LogWarning("Source Closed Date [#{sourceId}][Rev{sourceRev}]: {sourceClosedDate} ", sourceWorkItem.ToWorkItem().Id, sourceWorkItem.ToWorkItem().Rev, sourceWorkItem.ToWorkItem().Fields[closedDateField].Value); } if (!sourceWorkItem.ToWorkItem().Fields.Contains(closedDateField)) { diff --git a/src/MigrationTools.Clients.TfsObjectModel/Tools/FieldMappingTool/FieldMaps/FieldMapBase.cs b/src/MigrationTools.Clients.TfsObjectModel/Tools/FieldMappingTool/FieldMaps/FieldMapBase.cs index 594934666..eef35d579 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Tools/FieldMappingTool/FieldMaps/FieldMapBase.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Tools/FieldMappingTool/FieldMaps/FieldMapBase.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using Microsoft.ApplicationInsights.Channel; using Microsoft.Extensions.Logging; using Microsoft.TeamFoundation.WorkItemTracking.Client; using MigrationTools._EngineV1.Configuration; @@ -47,7 +46,7 @@ public void Execute(WorkItemData source, WorkItemData target) { "Source", source.ToWorkItem().Id.ToString() }, { "Target", target.ToWorkItem().Id.ToString()} }); - Telemetry.TrackException(ex, null, null); + Telemetry.TrackException(ex, null); } } diff --git a/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsAttachmentTool.cs b/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsAttachmentTool.cs index 2ffb68bd0..80230bd5c 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsAttachmentTool.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsAttachmentTool.cs @@ -75,7 +75,7 @@ public void ProcessAttachemnts(TfsProcessor processer, WorkItemData source, Work catch (Exception ex) { Log.LogError(ex, "AttachmentMigrationEnricher:Unable to process atachment from source wi {SourceWorkItemId} called {AttachmentName}", source.ToWorkItem().Id, wia.Name); - Telemetry.TrackException(ex, null, null); + Telemetry.TrackException(ex, null); } } if (save) @@ -120,7 +120,7 @@ private string ExportAttachment(WorkItem wi, Attachment wia, string exportpath) catch (Exception ex) { Log.LogError(ex, "Exception downloading attachements"); - Telemetry.TrackException(ex, null, null); + Telemetry.TrackException(ex, null); return null; } } diff --git a/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsEmbededImagesTool.cs b/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsEmbededImagesTool.cs index aa26f7450..5413ea558 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsEmbededImagesTool.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsEmbededImagesTool.cs @@ -108,7 +108,7 @@ protected override void FixEmbededImages(WorkItemData wi, string oldTfsurl, stri catch (Exception ex) { Log.LogError(ex, "EmbededImagesRepairEnricher: Unable to fix HTML field attachments for work item {wiId} from {oldTfsurl} to {newTfsurl}", wi.Id, oldTfsurl, newTfsurl); - Telemetry.TrackException(ex, null, null); + Telemetry.TrackException(ex, null); } } } diff --git a/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsNodeStructureTool.cs b/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsNodeStructureTool.cs index 150bd1380..4cbbf6c17 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsNodeStructureTool.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsNodeStructureTool.cs @@ -452,7 +452,7 @@ private void ProcessCommonStructure(string treeTypeSource, string localizedTreeT { Exception ex2 = new Exception(string.Format("Unable to load Common Structure for Target.This is usually due to different language versions. Validate that '{0}' is the correct name in your version. ", localizedTreeTypeName), ex); Log.LogError(ex2, "Unable to load Common Structure for Target."); - Telemetry.TrackException(ex2, null, null); + Telemetry.TrackException(ex2, null); throw ex2; } diff --git a/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsTeamSettingsTool.cs b/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsTeamSettingsTool.cs index 89d88069c..0f7c1aab8 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsTeamSettingsTool.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsTeamSettingsTool.cs @@ -69,7 +69,7 @@ public void ProcessorExecutionBegin(TfsProcessor processor) // Could be a IProce catch (Exception ex) { Log.LogError(ex, "{LogTypeName}: Unable load list of identities from target collection.", LogTypeName); - Telemetry.TrackException(ex, null, null); + Telemetry.TrackException(ex, null); return new List(); } }); @@ -316,7 +316,7 @@ private void MigrateCapacities(TeamFoundationTeam sourceTeam, TeamFoundationTeam } catch (Exception ex) { - Telemetry.TrackException(ex, null, null); + Telemetry.TrackException(ex, null); Log.LogError(ex, "[SKIP] Problem migrating team capacities for iteration {iteration}.", sourceIteration.Path); } @@ -324,7 +324,7 @@ private void MigrateCapacities(TeamFoundationTeam sourceTeam, TeamFoundationTeam } catch (Exception ex) { - Telemetry.TrackException(ex, null, null); + Telemetry.TrackException(ex, null); Log.LogError(ex, "[SKIP] Problem migrating team capacities."); } diff --git a/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsUserMappingTool.cs b/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsUserMappingTool.cs index fcb959dc5..3570828ce 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsUserMappingTool.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsUserMappingTool.cs @@ -137,7 +137,7 @@ private List GetUsersListFromServer(IGroupSecurityService gss) } catch (Exception ex) { - Telemetry.TrackException(ex, null, null); + Telemetry.TrackException(ex, null); Log.LogWarning("TfsUserMappingTool::GetUsersListFromServer::[user:{user}] Failed With {Exception}", user, ex.Message); } diff --git a/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsWorkItemEmbededLinkTool.cs b/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsWorkItemEmbededLinkTool.cs index 768549827..1aca1aaf6 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsWorkItemEmbededLinkTool.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsWorkItemEmbededLinkTool.cs @@ -47,7 +47,7 @@ public int Enrich(TfsProcessor processor, WorkItemData sourceWorkItem, WorkItem catch (Exception ex) { Log.LogError(ex, "{LogTypeName}: Unable load list of identities from target collection.", LogTypeName); - Telemetry.TrackException(ex, null, null); + Telemetry.TrackException(ex, null); return new List(); } }); @@ -137,7 +137,7 @@ public int Enrich(TfsProcessor processor, WorkItemData sourceWorkItem, WorkItem catch (Exception ex) { Log.LogError(ex, "{LogTypeName}: Unable to fix embedded mention links on field {fieldName} on target work item {targetWorkItemId} from {oldTfsurl} to {newTfsurl}", LogTypeName, field.Name, targetWorkItem.Id, oldTfsurl, newTfsurl); - Telemetry.TrackException(ex, null, null); + Telemetry.TrackException(ex, null); } } diff --git a/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsWorkItemLinkTool.cs b/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsWorkItemLinkTool.cs index f6d77eaa2..a52dfa6c0 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsWorkItemLinkTool.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsWorkItemLinkTool.cs @@ -191,7 +191,7 @@ private void CreateExternalLink(ExternalLink sourceLink, WorkItemData target) } catch (Exception ex) { - Telemetry.TrackException(ex, null, null); + Telemetry.TrackException(ex, null); // Ignore this link because the TFS server didn't recognize its type (There's no point in crashing the rest of the migration due to a link) if (ex.Message.Contains("Unrecognized Resource link")) { @@ -242,7 +242,7 @@ private void CreateRelatedLink(TfsProcessor processor, WorkItemData wiSourceL, R } catch (Exception ex) { - Telemetry.TrackException(ex, null, null); + Telemetry.TrackException(ex, null); Log.LogError(ex, " [FIND-FAIL] Adding Link of type {0} where wiSourceL={1}, wiTargetL={2} ", rl.LinkTypeEnd.ImmutableName, wiSourceL.Id, wiTargetL.Id); return; } @@ -252,7 +252,7 @@ private void CreateRelatedLink(TfsProcessor processor, WorkItemData wiSourceL, R } catch (Exception ex) { - Telemetry.TrackException(ex, null, null); + Telemetry.TrackException(ex, null); Log.LogError(ex, " [FIND-FAIL] Adding Link of type {0} where wiSourceL={1}, wiTargetL={2} ", rl.LinkTypeEnd.ImmutableName, wiSourceL.Id, wiTargetL.Id); return; } diff --git a/src/MigrationTools.ConsoleCore/MigrationTools.ConsoleCore.csproj b/src/MigrationTools.ConsoleCore/MigrationTools.ConsoleCore.csproj index 27983aa8f..ec36db005 100644 --- a/src/MigrationTools.ConsoleCore/MigrationTools.ConsoleCore.csproj +++ b/src/MigrationTools.ConsoleCore/MigrationTools.ConsoleCore.csproj @@ -15,7 +15,6 @@ - diff --git a/src/MigrationTools.ConsoleFull/MigrationTools.ConsoleFull.csproj b/src/MigrationTools.ConsoleFull/MigrationTools.ConsoleFull.csproj index 50dcaa041..491f6744c 100644 --- a/src/MigrationTools.ConsoleFull/MigrationTools.ConsoleFull.csproj +++ b/src/MigrationTools.ConsoleFull/MigrationTools.ConsoleFull.csproj @@ -49,7 +49,6 @@ - diff --git a/src/MigrationTools.ConsoleFull/Program.cs b/src/MigrationTools.ConsoleFull/Program.cs index 06262ee29..4bc395d57 100644 --- a/src/MigrationTools.ConsoleFull/Program.cs +++ b/src/MigrationTools.ConsoleFull/Program.cs @@ -7,6 +7,9 @@ using MigrationTools.Host; using OpenTelemetry.Metrics; using OpenTelemetry.Trace; +using OpenTelemetry.Metrics; +using OpenTelemetry.Trace; +using MigrationTools.Services; namespace VstsSyncMigrator.ConsoleApp { @@ -14,30 +17,31 @@ public class Program { public static async Task Main(string[] args) { - var hostBuilder = MigrationToolHost.CreateDefaultBuilder(args); - - if (hostBuilder is null) + using (var CommandActivity = ActivitySourceProvider.GetActivitySource().StartActivity("MigrationToolsCli")) { - return; - } + var hostBuilder = MigrationToolHost.CreateDefaultBuilder(args); - hostBuilder - .ConfigureServices((context, services) => + if (hostBuilder is null) { - // New v2 Architecture fpr testing - services.AddMigrationToolServicesForClientFileSystem(context.Configuration); - services.AddMigrationToolServicesForClientAzureDevOpsObjectModel(context.Configuration); - services.AddMigrationToolServicesForClientAzureDevopsRest(context.Configuration); + return; + } - // v1 Architecture (Legacy) - services.AddMigrationToolServicesForClientLegacyAzureDevOpsObjectModel(); - services.AddMigrationToolServicesForClientLegacyCore(); - }); - + hostBuilder + .ConfigureServices((context, services) => + { + // New v2 Architecture fpr testing + services.AddMigrationToolServicesForClientFileSystem(context.Configuration); + services.AddMigrationToolServicesForClientAzureDevOpsObjectModel(context.Configuration); + services.AddMigrationToolServicesForClientAzureDevopsRest(context.Configuration); - await hostBuilder.RunConsoleAsync(); + // v1 Architecture (Legacy) + services.AddMigrationToolServicesForClientLegacyAzureDevOpsObjectModel(); + services.AddMigrationToolServicesForClientLegacyCore(); + }); + await hostBuilder.RunConsoleAsync(); + } } - + } } \ No newline at end of file diff --git a/src/MigrationTools.ConsoleFull/Properties/launchSettings.json b/src/MigrationTools.ConsoleFull/Properties/launchSettings.json index a9abe0466..3ee5d2b4c 100644 --- a/src/MigrationTools.ConsoleFull/Properties/launchSettings.json +++ b/src/MigrationTools.ConsoleFull/Properties/launchSettings.json @@ -9,7 +9,7 @@ }, "execute": { "commandName": "Project", - "commandLineArgs": "execute -c \"configuration.json\"" + "commandLineArgs": "execute -c \"configuration.json\" --debugTrace" }, "execute --help": { "commandName": "Project", @@ -29,7 +29,7 @@ }, "Upgrade": { "commandName": "Project", - "commandLineArgs": "upgrade -c \"configuration.json\" --disableTelemetry" + "commandLineArgs": "upgrade -c \"configuration.json\" --debugTrace" }, "Execute Classic": { "commandName": "Project", diff --git a/src/MigrationTools.Host/Commands/CommandBase.cs b/src/MigrationTools.Host/Commands/CommandBase.cs index 01396942e..373d7535c 100644 --- a/src/MigrationTools.Host/Commands/CommandBase.cs +++ b/src/MigrationTools.Host/Commands/CommandBase.cs @@ -6,7 +6,6 @@ using System.Text; using System.Threading; using System.Threading.Tasks; -using Microsoft.ApplicationInsights.Extensibility; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -64,24 +63,30 @@ public CommandBase( public sealed override async Task ExecuteAsync(CommandContext context, TSettings settings) { + // Disable Telemetry + if (settings.DisableTelemetry) + { + Log.Debug("Disabling Telemetry {CommandName}", this.GetType().Name); + CommandActivity.AddTag("DisableTelemetry", settings.DisableTelemetry); + CommandActivity.Stop(); + ActivitySourceProvider.DisableActivitySource(); + } + //Enable Debug Trace + if (settings.DebugTrace) + { + Log.Debug("Enabling Telemetry DebugTrace {CommandName}", this.GetType().Name); + ActivitySourceProvider.EnableTelemeteryDebug(); + } + using (CommandActivity = ActivitySource.StartActivity(this.GetType().Name)) { + CommandActivity.SetTagsFromObject(settings); CommandActivity?.Start(); - // Disable Telemetry - TelemetryConfiguration ai = Services.GetService(); - ai.DisableTelemetry = settings.DisableTelemetry; - if (settings.DisableTelemetry) - { - Log.Debug("Disabling Telemetry {CommandName}", this.GetType().Name); - CommandActivity.AddTag("DisableTelemetry", settings.DisableTelemetry); - CommandActivity.Stop(); - ActivitySourceProvider.DisableActivitySource(); - } - + // Run the command - Log.Debug("Starting {CommandName}", this.GetType().Name); - TelemetryLogger.TrackEvent(this.GetType().Name); + Log.Verbose("Starting {CommandName}", this.GetType().Name); + CommandActivity.AddEvent(new ActivityEvent("Starting")); RunStartupLogic(settings); try { @@ -92,7 +97,7 @@ public sealed override async Task ExecuteAsync(CommandContext context, TSet catch (Exception ex) { CommandActivity.RecordException(ex); - TelemetryLogger.TrackException(ex, null, null); + TelemetryLogger.TrackException(ex, CommandActivity.Tags); _logger.LogError(ex, "Unhandled exception!"); return -1; } diff --git a/src/MigrationTools.Host/Commands/CommandSettingsBase.cs b/src/MigrationTools.Host/Commands/CommandSettingsBase.cs index fe6071e9b..104c55f47 100644 --- a/src/MigrationTools.Host/Commands/CommandSettingsBase.cs +++ b/src/MigrationTools.Host/Commands/CommandSettingsBase.cs @@ -18,6 +18,10 @@ internal class CommandSettingsBase : CommandSettings [CommandOption("--disableTelemetry")] public bool DisableTelemetry { get; set; } + [Description("Enabled additional trace")] + [CommandOption("--debugTrace")] + public bool DebugTrace { get; set; } + [Description("Add this paramiter to turn version check off")] [CommandOption("--skipVersionCheck")] public bool skipVersionCheck { get; set; } diff --git a/src/MigrationTools.Host/Commands/ExecuteMigrationCommand.cs b/src/MigrationTools.Host/Commands/ExecuteMigrationCommand.cs index 4daf0eb4e..42fa58584 100644 --- a/src/MigrationTools.Host/Commands/ExecuteMigrationCommand.cs +++ b/src/MigrationTools.Host/Commands/ExecuteMigrationCommand.cs @@ -63,7 +63,7 @@ internal override async Task ExecuteInternalAsync(CommandContext context, E catch (Exception ex) { CommandActivity.RecordException(ex); - Telemetery.TrackException(ex, null, null); + Telemetery.TrackException(ex, null); _logger.LogError(ex, "Unhandled exception!"); _exitCode = 1; diff --git a/src/MigrationTools.Host/Commands/InitMigrationCommand.cs b/src/MigrationTools.Host/Commands/InitMigrationCommand.cs index 610b04909..53b73c167 100644 --- a/src/MigrationTools.Host/Commands/InitMigrationCommand.cs +++ b/src/MigrationTools.Host/Commands/InitMigrationCommand.cs @@ -6,7 +6,6 @@ using System.Text; using System.Threading.Tasks; using Elmah.Io.Client; -using Microsoft.ApplicationInsights.DataContracts; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -38,7 +37,6 @@ internal override async Task ExecuteInternalAsync(CommandContext context, I int _exitCode; try { - TelemetryLogger.TrackEvent(new EventTelemetry("InitCommand")); string configFile = settings.ConfigFile; if (string.IsNullOrEmpty(configFile)) { @@ -108,7 +106,7 @@ internal override async Task ExecuteInternalAsync(CommandContext context, I } catch (Exception ex) { - TelemetryLogger.TrackException(ex, null, null); + TelemetryLogger.TrackException(ex, CommandActivity.Tags); _logger.LogError(ex, "Unhandled exception!"); _exitCode = 1; } diff --git a/src/MigrationTools.Host/Commands/MigrationConfigCommand.cs b/src/MigrationTools.Host/Commands/MigrationConfigCommand.cs index bd3ca78aa..0b1fe5dfa 100644 --- a/src/MigrationTools.Host/Commands/MigrationConfigCommand.cs +++ b/src/MigrationTools.Host/Commands/MigrationConfigCommand.cs @@ -1,21 +1,11 @@ using System; using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; using System.Threading.Tasks; -using Microsoft.ApplicationInsights.DataContracts; using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Options; using Microsoft.VisualStudio.Services.Common; -using MigrationTools._EngineV1.Configuration; -using MigrationTools._EngineV1.Containers; -using MigrationTools.Options; -using MigrationTools.Processors; -using MigrationTools.Processors.Infrastructure; using Newtonsoft.Json.Linq; using Spectre.Console; using Spectre.Console.Cli; @@ -48,7 +38,6 @@ public override async Task ExecuteAsync(CommandContext context, MigrationCo try { - Telemetery.TrackEvent(new EventTelemetry("MigrationConfigCommand")); string configFile = settings.ConfigFile; if (string.IsNullOrEmpty(configFile)) { @@ -108,7 +97,7 @@ public override async Task ExecuteAsync(CommandContext context, MigrationCo } catch (Exception ex) { - Telemetery.TrackException(ex, null, null); + Telemetery.TrackException(ex, null); _logger.LogError(ex, "Unhandled exception!"); _exitCode = 1; } diff --git a/src/MigrationTools.Host/Commands/UpgradeConfigCommand.cs b/src/MigrationTools.Host/Commands/UpgradeConfigCommand.cs index 9aa11ed9d..19b6841bc 100644 --- a/src/MigrationTools.Host/Commands/UpgradeConfigCommand.cs +++ b/src/MigrationTools.Host/Commands/UpgradeConfigCommand.cs @@ -11,7 +11,6 @@ using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Xml.Linq; -using Microsoft.ApplicationInsights.DataContracts; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -47,67 +46,68 @@ public UpgradeConfigCommand(IHostApplicationLifetime appLifetime, IServiceProvid internal override async Task ExecuteInternalAsync(CommandContext context, UpgradeConfigCommandSettings settings) { - CommandActivity.AddTag("CommandSettings", settings); + CommandActivity.SetTagsFromObject(settings); int _exitCode = 0; - TelemetryLogger.TrackEvent(new EventTelemetry("UpgradeConfigCommand")); - string configFile = settings.ConfigFile; - if (string.IsNullOrEmpty(configFile)) - { - configFile = "configuration.json"; - } - _logger.LogInformation("ConfigFile: {configFile}", configFile); - - //// Load configuration - //var configuration = new ConfigurationBuilder() - // .SetBasePath(Directory.GetCurrentDirectory()) - // .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true) - // .AddJsonFile(configFile, optional: true, reloadOnChange: true) - // .Build(); - - classNameChangeLog.Add("WorkItemMigrationContext", "TfsWorkItemMigrationProcessor"); - classNameChangeLog.Add("TfsTeamProjectConfig", "TfsTeamProjectEndpoint"); - classNameChangeLog.Add("WorkItemGitRepoMappingTool", "TfsGitRepositoryTool"); - classNameChangeLog.Add("WorkItemFieldMappingTool", "FieldMappingTool"); - - OptionsConfiguration optionsBuilder = Services.GetService(); - - var schemaVersion = VersionOptions.ConfigureOptions.GetMigrationConfigVersion(Configuration); - CommandActivity?.AddTag("SchemaVersion", schemaVersion.schema.ToString()); - switch (schemaVersion.schema) + string configFile = settings.ConfigFile; + if (string.IsNullOrEmpty(configFile)) + { + configFile = "configuration.json"; + } + _logger.LogInformation("ConfigFile: {configFile}", configFile); + + //// Load configuration + //var configuration = new ConfigurationBuilder() + // .SetBasePath(Directory.GetCurrentDirectory()) + // .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true) + // .AddJsonFile(configFile, optional: true, reloadOnChange: true) + // .Build(); + + classNameChangeLog.Add("WorkItemMigrationContext", "TfsWorkItemMigrationProcessor"); + classNameChangeLog.Add("TfsTeamProjectConfig", "TfsTeamProjectEndpoint"); + classNameChangeLog.Add("WorkItemGitRepoMappingTool", "TfsGitRepositoryTool"); + classNameChangeLog.Add("WorkItemFieldMappingTool", "FieldMappingTool"); + + OptionsConfiguration optionsBuilder = Services.GetService(); + + var schemaVersion = VersionOptions.ConfigureOptions.GetMigrationConfigVersion(Configuration); + CommandActivity?.AddTag("SchemaVersion", schemaVersion.schema.ToString()); + CommandActivity.AddEvent(new ActivityEvent($"UpgradeConfigCommand.{schemaVersion.schema.ToString()}")); + switch (schemaVersion.schema) + { + case MigrationConfigSchema.v1: + case MigrationConfigSchema.v150: + CommandActivity.AddEvent(new ActivityEvent("UpgradeConfigCommand.v150")); + // ChangeSetMappingFile + optionsBuilder.AddOption(ParseV1TfsChangeSetMappingToolOptions(Configuration)); + optionsBuilder.AddOption(ParseV1TfsGitRepoMappingOptions(Configuration)); + optionsBuilder.AddOption(ParseV1FieldMaps(Configuration)); + optionsBuilder.AddOption(ParseSectionCollectionWithTypePropertyNameToList(Configuration, "Processors", "$type")); + optionsBuilder.AddOption(ParseSectionCollectionWithTypePropertyNameToList(Configuration, "CommonEnrichersConfig", "$type")); + if (!IsSectionNullOrEmpty(Configuration.GetSection("Source")) || !IsSectionNullOrEmpty(Configuration.GetSection("Target"))) { - case MigrationConfigSchema.v1: - case MigrationConfigSchema.v150: - - // ChangeSetMappingFile - optionsBuilder.AddOption(ParseV1TfsChangeSetMappingToolOptions(Configuration)); - optionsBuilder.AddOption(ParseV1TfsGitRepoMappingOptions(Configuration)); - optionsBuilder.AddOption(ParseV1FieldMaps(Configuration)); - optionsBuilder.AddOption(ParseSectionCollectionWithTypePropertyNameToList(Configuration, "Processors", "$type")); - optionsBuilder.AddOption(ParseSectionCollectionWithTypePropertyNameToList(Configuration, "CommonEnrichersConfig", "$type")); - if (!IsSectionNullOrEmpty(Configuration.GetSection("Source")) || !IsSectionNullOrEmpty(Configuration.GetSection("Target"))) - { - optionsBuilder.AddOption(ParseSectionWithTypePropertyNameToOptions(Configuration, "Source", "$type"), "Source"); - optionsBuilder.AddOption(ParseSectionWithTypePropertyNameToOptions(Configuration, "Target", "$type"), "Target"); - } - else - { - optionsBuilder.AddOption(ParseSectionCollectionWithPathAsTypeToOption(Configuration, "Endpoints:AzureDevOpsEndpoints", "Source"), "Source"); - optionsBuilder.AddOption(ParseSectionCollectionWithPathAsTypeToOption(Configuration, "Endpoints:AzureDevOpsEndpoints", "Target"), "Target"); - } - break; - case MigrationConfigSchema.v160: - optionsBuilder.AddOption(ParseSectionWithTypePropertyNameToOptions(Configuration, "MigrationTools:Endpoints:Source", "EndpointType"), "Source"); - optionsBuilder.AddOption(ParseSectionWithTypePropertyNameToOptions(Configuration, "MigrationTools:Endpoints:Target", "EndpointType"), "Target"); - optionsBuilder.AddOption(ParseSectionListWithPathAsTypeToOption(Configuration, "MigrationTools:CommonTools")); - optionsBuilder.AddOption(ParseSectionCollectionWithTypePropertyNameToList(Configuration, "MigrationTools:CommonTools:FieldMappingTool:FieldMaps", "FieldMapType")); - optionsBuilder.AddOption(ParseSectionCollectionWithTypePropertyNameToList(Configuration, "MigrationTools:Processors", "ProcessorType")); - break; + optionsBuilder.AddOption(ParseSectionWithTypePropertyNameToOptions(Configuration, "Source", "$type"), "Source"); + optionsBuilder.AddOption(ParseSectionWithTypePropertyNameToOptions(Configuration, "Target", "$type"), "Target"); } - string json = optionsBuilder.Build(); - configFile = AddSuffixToFileName(configFile, "-upgraded"); - File.WriteAllText(configFile, json); - _logger.LogInformation("New {configFile} file has been created", configFile); - Console.WriteLine(json); + else + { + optionsBuilder.AddOption(ParseSectionCollectionWithPathAsTypeToOption(Configuration, "Endpoints:AzureDevOpsEndpoints", "Source"), "Source"); + optionsBuilder.AddOption(ParseSectionCollectionWithPathAsTypeToOption(Configuration, "Endpoints:AzureDevOpsEndpoints", "Target"), "Target"); + } + break; + case MigrationConfigSchema.v160: + + optionsBuilder.AddOption(ParseSectionWithTypePropertyNameToOptions(Configuration, "MigrationTools:Endpoints:Source", "EndpointType"), "Source"); + optionsBuilder.AddOption(ParseSectionWithTypePropertyNameToOptions(Configuration, "MigrationTools:Endpoints:Target", "EndpointType"), "Target"); + optionsBuilder.AddOption(ParseSectionListWithPathAsTypeToOption(Configuration, "MigrationTools:CommonTools")); + optionsBuilder.AddOption(ParseSectionCollectionWithTypePropertyNameToList(Configuration, "MigrationTools:CommonTools:FieldMappingTool:FieldMaps", "FieldMapType")); + optionsBuilder.AddOption(ParseSectionCollectionWithTypePropertyNameToList(Configuration, "MigrationTools:Processors", "ProcessorType")); + break; + } + string json = optionsBuilder.Build(); + configFile = AddSuffixToFileName(configFile, "-upgraded"); + File.WriteAllText(configFile, json); + _logger.LogInformation("New {configFile} file has been created", configFile); + Console.WriteLine(json); return _exitCode; } diff --git a/src/MigrationTools.Host/CustomDiagnostics/CustomConverter.cs b/src/MigrationTools.Host/CustomDiagnostics/CustomConverter.cs deleted file mode 100644 index 003940588..000000000 --- a/src/MigrationTools.Host/CustomDiagnostics/CustomConverter.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using Microsoft.ApplicationInsights.Channel; -using Microsoft.ApplicationInsights.DataContracts; -using Serilog.Events; -using Serilog.Sinks.ApplicationInsights.TelemetryConverters; - -namespace MigrationTools.Host.CustomDiagnostics -{ - public class CustomConverter : TraceTelemetryConverter - { - public override IEnumerable Convert(LogEvent logEvent, IFormatProvider formatProvider) - { - // first create a default TraceTelemetry using the sink's default logic - // .. but without the log level, and (rendered) message (template) included in the Properties - foreach (ITelemetry telemetry in base.Convert(logEvent, formatProvider)) - { - // Add Common Stuff - telemetry.Context.Device.OperatingSystem = Environment.OSVersion.ToString(); - telemetry.Context.Component.Version = Assembly.GetEntryAssembly().GetName().Version.ToString(); - if (logEvent.Properties.ContainsKey("SessionID")) - { - telemetry.Context.Session.Id = logEvent.Properties["SessionID"].ToString(); - } - // post-process the telemetry's context to contain the operation id - if (logEvent.Properties.ContainsKey("operation_Id")) - { - telemetry.Context.Operation.Id = logEvent.Properties["operation_Id"].ToString(); - } - // post-process the telemetry's context to contain the operation parent id - if (logEvent.Properties.ContainsKey("operation_parentId")) - { - telemetry.Context.Operation.ParentId = logEvent.Properties["operation_parentId"].ToString(); - } - // typecast to ISupportProperties so you can manipulate the properties as desired - ISupportProperties propTelematry = (ISupportProperties)telemetry; - - // find redundent properties - var removeProps = new[] { "UserId", "operation_parentId", "operation_Id", "SessionID" }; - removeProps = removeProps.Where(prop => propTelematry.Properties.ContainsKey(prop)).ToArray(); - - foreach (var prop in removeProps) - { - // remove redundent properties - propTelematry.Properties.Remove(prop); - } - - yield return telemetry; - } - } - } -} \ No newline at end of file diff --git a/src/MigrationTools.Host/MigrationToolHost.cs b/src/MigrationTools.Host/MigrationToolHost.cs index 60c067582..e6859f451 100644 --- a/src/MigrationTools.Host/MigrationToolHost.cs +++ b/src/MigrationTools.Host/MigrationToolHost.cs @@ -1,14 +1,9 @@ using System; using System.IO; using System.Reflection; -using Microsoft.ApplicationInsights.Extensibility; -using Microsoft.ApplicationInsights.WorkerService; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; -using MigrationTools._EngineV1.Configuration; -using MigrationTools.Host.CustomDiagnostics; using MigrationTools.Host.Services; using Serilog; using Serilog.Events; @@ -70,7 +65,6 @@ public static IHostBuilder CreateDefaultBuilder(string[] args, Action(), new CustomConverter(), LogEventLevel.Error) .WriteTo.File(Path.Combine(logsPath, $"migration.log"), LogEventLevel.Verbose, shared: true,outputTemplate: outputTemplate) .WriteTo.File(new Serilog.Formatting.Json.JsonFormatter(), Path.Combine(logsPath, $"migration-errors.log"), LogEventLevel.Error, shared: true) .WriteTo.Logger(lc => lc @@ -102,15 +96,6 @@ public static IHostBuilder CreateDefaultBuilder(string[] args, Action(); //services.AddTransient(); @@ -170,19 +155,5 @@ private static string CreateLogsPath() return exportPath; } - private static MeterProvider _meterProvider; - private static TracerProvider _tracerProvider; - - static void FlushAndCloseTelemetry() - { - // Flush and dispose of the tracer provider - _tracerProvider?.ForceFlush(); - _tracerProvider?.Dispose(); - - // Flush and dispose of the meter provider - _tracerProvider?.ForceFlush(); - _tracerProvider?.Dispose(); - } - } } \ No newline at end of file diff --git a/src/MigrationTools.Host/MigrationTools.Host.csproj b/src/MigrationTools.Host/MigrationTools.Host.csproj index b5b42537a..aa54a1cd1 100644 --- a/src/MigrationTools.Host/MigrationTools.Host.csproj +++ b/src/MigrationTools.Host/MigrationTools.Host.csproj @@ -18,12 +18,8 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - @@ -34,7 +30,6 @@ - @@ -52,4 +47,8 @@ + + + + diff --git a/src/MigrationTools.Host/Services/DetectOnlineService.cs b/src/MigrationTools.Host/Services/DetectOnlineService.cs index d31b98103..b801b3575 100644 --- a/src/MigrationTools.Host/Services/DetectOnlineService.cs +++ b/src/MigrationTools.Host/Services/DetectOnlineService.cs @@ -1,8 +1,8 @@ using System; using System.Diagnostics; using System.Net.NetworkInformation; -using Microsoft.ApplicationInsights.DataContracts; using Microsoft.Extensions.Logging; +using MigrationTools.Services; using Serilog; namespace MigrationTools.Host.Services @@ -21,39 +21,51 @@ public DetectOnlineService(ITelemetryLogger telemetry, ILogger - diff --git a/src/MigrationTools.Shadows/ServiceCollectionExtensions.cs b/src/MigrationTools.Shadows/ServiceCollectionExtensions.cs index 20ca396aa..e8d377aa3 100644 --- a/src/MigrationTools.Shadows/ServiceCollectionExtensions.cs +++ b/src/MigrationTools.Shadows/ServiceCollectionExtensions.cs @@ -1,5 +1,4 @@ -using Microsoft.ApplicationInsights.WorkerService; -using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection; using MigrationTools.Services; using MigrationTools.Services.Shadows; using Serilog; @@ -12,13 +11,12 @@ public static class ServiceCollectionExtensions { public static void AddMigrationToolServicesForUnitTests(this IServiceCollection context) { - // Add Fake AI Endpoint - var aiOptions = new ApplicationInsightsServiceOptions - { - EndpointAddress = "http://localhost:8888/v2/track" - }; - context.AddApplicationInsightsTelemetryWorkerService(aiOptions); - context.AddSingleton(); + //// Add Fake AI Endpoint + //var aiOptions = new ApplicationInsightsServiceOptions + //{ + // EndpointAddress = "http://localhost:8888/v2/track" + //}; + //context.AddApplicationInsightsTelemetryWorkerService(aiOptions); // Logging for Unit Tests var loggers = new LoggerConfiguration().MinimumLevel.Verbose().Enrich.FromLogContext(); loggers.WriteTo.Logger(logger => logger diff --git a/src/MigrationTools.Shadows/Services/TelemetryLoggerFake.cs b/src/MigrationTools.Shadows/Services/TelemetryLoggerFake.cs index 5bc7be2cf..a6fa56f3a 100644 --- a/src/MigrationTools.Shadows/Services/TelemetryLoggerFake.cs +++ b/src/MigrationTools.Shadows/Services/TelemetryLoggerFake.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Text; -using Microsoft.ApplicationInsights.DataContracts; namespace MigrationTools.Services.Shadows { @@ -9,39 +8,14 @@ public class TelemetryLoggerFake : ITelemetryLogger { public string SessionId { get { return new Guid().ToString(); } } - public void CloseAndFlush() + public void TrackException(Exception ex, IDictionary properties = null) { - - } - - public void TrackDependency(DependencyTelemetry dependencyTelemetry) - { - - } - - public void TrackEvent(EventTelemetry eventTelemetry) - { - - } - - public void TrackEvent(string name) - { - - } - - public void TrackEvent(string name, IDictionary properties, IDictionary measurements) - { - + throw new NotImplementedException(); } - public void TrackException(Exception ex, IDictionary properties = null, IDictionary measurements = null) + public void TrackException(Exception ex, IEnumerable> properties = null) { - - } - - public void TrackRequest(string name, DateTimeOffset startTime, TimeSpan duration, string responseCode, bool success) - { - + throw new NotImplementedException(); } } } diff --git a/src/MigrationTools.Tests/MigrationTools.Tests.csproj b/src/MigrationTools.Tests/MigrationTools.Tests.csproj index a2617f491..9f7f8de95 100644 --- a/src/MigrationTools.Tests/MigrationTools.Tests.csproj +++ b/src/MigrationTools.Tests/MigrationTools.Tests.csproj @@ -7,7 +7,6 @@ - diff --git a/src/MigrationTools.Tests/Services/TelemetryLoggerMock.cs b/src/MigrationTools.Tests/Services/TelemetryLoggerMock.cs index 7bf806249..066adc5b2 100644 --- a/src/MigrationTools.Tests/Services/TelemetryLoggerMock.cs +++ b/src/MigrationTools.Tests/Services/TelemetryLoggerMock.cs @@ -10,32 +10,14 @@ public class TelemetryLoggerMock : ITelemetryLogger public string SessionId => throw new NotImplementedException(); - public void CloseAndFlush() + public void TrackException(Exception ex, IDictionary properties = null) { + throw new NotImplementedException(); } - public void TrackDependency(DependencyTelemetry dependencyTelemetry) - { - } - - public void TrackEvent(EventTelemetry eventTelemetry) - { - } - - public void TrackEvent(string name) - { - } - - public void TrackEvent(string name, IDictionary properties, IDictionary measurements) - { - } - - public void TrackException(Exception ex, IDictionary properties, IDictionary measurements) - { - } - - public void TrackRequest(string name, DateTimeOffset startTime, TimeSpan duration, string responseCode, bool success) + public void TrackException(Exception ex, IEnumerable> properties = null) { + throw new NotImplementedException(); } } } \ No newline at end of file diff --git a/src/MigrationTools/Endpoints/Infrastructure/Endpoint.cs b/src/MigrationTools/Endpoints/Infrastructure/Endpoint.cs index 0c45a88d9..6c0536afd 100644 --- a/src/MigrationTools/Endpoints/Infrastructure/Endpoint.cs +++ b/src/MigrationTools/Endpoints/Infrastructure/Endpoint.cs @@ -1,11 +1,13 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using MigrationTools.EndpointEnrichers; using MigrationTools.Endpoints.Infrastructure; using MigrationTools.Options; +using MigrationTools.Services; namespace MigrationTools.Endpoints { diff --git a/src/MigrationTools/MigrationEngine.cs b/src/MigrationTools/MigrationEngine.cs index 4283c3e47..4ab6d3964 100644 --- a/src/MigrationTools/MigrationEngine.cs +++ b/src/MigrationTools/MigrationEngine.cs @@ -1,19 +1,11 @@ using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Net; +using System.Diagnostics.Metrics; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Options; -using MigrationTools._EngineV1.Clients; -using MigrationTools._EngineV1.Configuration; -using MigrationTools._EngineV1.Containers; using MigrationTools.Endpoints; -using MigrationTools.Endpoints.Infrastructure; -using MigrationTools.Options; -using MigrationTools.Processors; using MigrationTools.Processors.Infrastructure; - +using MigrationTools.Services; namespace MigrationTools { @@ -24,6 +16,7 @@ public class MigrationEngine : IMigrationEngine private IEndpoint _source; private IEndpoint _target; private ITelemetryLogger _telemetryLogger; + private static readonly Meter _meter = new("MigrationEngine"); public MigrationEngine( IServiceProvider services, @@ -37,7 +30,7 @@ public MigrationEngine( Processors = processors; _telemetryLogger = telemetry; } - + public ProcessorContainer Processors { get; } @@ -47,7 +40,7 @@ public IEndpoint Source { if (_source is null) { - _source = _services.GetKeyedService("Source"); + _source = _services.GetKeyedService("Source"); } return _source; } @@ -64,62 +57,47 @@ public IEndpoint Target return _target; } } - + public ProcessingStatus Run() { - _telemetryLogger.TrackEvent("EngineStart", - new Dictionary { - { "Engine", "Migration" } - }, - new Dictionary { - { "Processors", Processors.Count } - }); - Stopwatch engineTimer = Stopwatch.StartNew(); - - _logger.LogInformation("Logging has been configured and is set to: {LogLevel}. ", "unknown"); - _logger.LogInformation(" Max Logfile: {FileLogLevel}. ", "Verbose"); - _logger.LogInformation(" Max Console: {ConsoleLogLevel}. ", "Debug"); - _logger.LogInformation(" Max Application Insights: {AILogLevel}. ", "Error"); - _logger.LogInformation("The Max log levels above show where to go look for extra info. e.g. Even if you set the log level to Verbose you will only see that info in the Log File, however everything up to Debug will be in the Console."); - - ProcessingStatus ps = ProcessingStatus.Running; - - - _logger.LogInformation("Beginning run of {ProcessorCount} processors", Processors.Count.ToString()); - foreach (IOldProcessor process in Processors.Processors) + using (var activity = ActivitySourceProvider.ActivitySource.StartActivity("MigrationEngine:Run", ActivityKind.Internal)) { - _logger.LogInformation("Processor: {ProcessorName}", process.Name); - Stopwatch processorTimer = Stopwatch.StartNew(); - process.Execute(); - processorTimer.Stop(); - _telemetryLogger.TrackEvent("ProcessorComplete", new Dictionary { { "Processor", process.Name }, { "Status", process.Status.ToString() } }, new Dictionary { { "ProcessingTime", processorTimer.ElapsedMilliseconds } }); + activity?.SetTag("migrationtools.engine.processors", Processors.Count); + activity?.Start(); - if (process.Status == ProcessingStatus.Failed) + _logger.LogInformation("Logging has been configured and is set to: {LogLevel}. ", "unknown"); + _logger.LogInformation(" Max Logfile: {FileLogLevel}. ", "Verbose"); + _logger.LogInformation(" Max Console: {ConsoleLogLevel}. ", "Debug"); + _logger.LogInformation(" Max Application Insights: {AILogLevel}. ", "Error"); + _logger.LogInformation("The Max log levels above show where to go look for extra info. e.g. Even if you set the log level to Verbose you will only see that info in the Log File, however everything up to Debug will be in the Console."); + ProcessingStatus ps = ProcessingStatus.Running; + _logger.LogInformation("Beginning run of {ProcessorCount} processors", Processors.Count.ToString()); + var histogram = _meter.CreateHistogram("ProcessorDuration", unit: "ms"); + foreach (IOldProcessor process in Processors.Processors) { - ps = ProcessingStatus.Failed; - _logger.LogError("{Context} The Processor {ProcessorName} entered the failed state...stopping run", process.Name, "MigrationEngine"); - break; + using (var activityForProcessor = ActivitySourceProvider.ActivitySource.StartActivity($"Processor[{process.GetType().Name}]", ActivityKind.Internal)) + { + _logger.LogInformation("Processor: {ProcessorName}", process.Name); + Stopwatch processorTimer = Stopwatch.StartNew(); + process.Execute(); + processorTimer.Stop(); + var tags = new TagList(); + tags.Add("Processor", process.Name); + tags.Add("Status", process.Status.ToString()); + histogram.Record(processorTimer.ElapsedMilliseconds, tags); + if (process.Status == ProcessingStatus.Failed) + { + activity.SetStatus(ActivityStatusCode.Error); + ps = ProcessingStatus.Failed; + _logger.LogError("{Context} The Processor {ProcessorName} entered the failed state...stopping run", process.Name, "MigrationEngine"); + break; + } + } } + activity?.Stop(); + return ps; } - engineTimer.Stop(); - _telemetryLogger.TrackEvent("EngineComplete", - new Dictionary { - { "Engine", "Migration" } - }, - new Dictionary { - { "EngineTime", engineTimer.ElapsedMilliseconds } - }); - return ps; } - private NetworkCredential CheckForNetworkCredentials(NetworkCredentials credentials) - { - NetworkCredential networkCredentials = null; - if (!string.IsNullOrWhiteSpace(credentials?.UserName) && !string.IsNullOrWhiteSpace(credentials?.Password)) - { - networkCredentials = new NetworkCredential(credentials.UserName, credentials.Password, credentials.Domain); - } - return networkCredentials; - } } } diff --git a/src/MigrationTools/MigrationTools.csproj b/src/MigrationTools/MigrationTools.csproj index 6329417aa..dbf559fe0 100644 --- a/src/MigrationTools/MigrationTools.csproj +++ b/src/MigrationTools/MigrationTools.csproj @@ -40,10 +40,8 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - diff --git a/src/MigrationTools/Processors/Infrastructure/Processor.cs b/src/MigrationTools/Processors/Infrastructure/Processor.cs index dbb576743..c609c69d0 100644 --- a/src/MigrationTools/Processors/Infrastructure/Processor.cs +++ b/src/MigrationTools/Processors/Infrastructure/Processor.cs @@ -9,6 +9,7 @@ using MigrationTools.Endpoints; using MigrationTools.Endpoints.Infrastructure; using MigrationTools.Enrichers; +using MigrationTools.Services; using MigrationTools.Tools; namespace MigrationTools.Processors.Infrastructure @@ -54,6 +55,8 @@ public Processor( public virtual ProcessorType Type => ProcessorType.AddHock; + public Activity ProcessorActivity { get; private set; } + public IEndpoint GetEndpoint(string name) { if (string.IsNullOrWhiteSpace(name)) @@ -79,53 +82,44 @@ public IEndpoint GetEndpoint(string name) public void Execute() { - Telemetry.TrackEvent(this.Name); - Log.LogInformation("Migration Context Start: {MigrationContextname} ", Name); - DateTime start = DateTime.Now; - var executeTimer = Stopwatch.StartNew(); - ////////////////////////////////////////////////// - try + using (ProcessorActivity = ActivitySourceProvider.ActivitySource.StartActivity($"{this.GetType().Name}", ActivityKind.Internal)) { - if (Options == null) + ProcessorActivity.SetTagsFromOptions(Options); + + + Log.LogInformation("Migration Context Start: {MigrationContextname} ", Name); + ////////////////////////////////////////////////// + try { - Log.LogError("Processor::Execute: Processer base has not been configured. Options does not exist!"); - throw new InvalidOperationException("Processer base has not been configured."); + if (Options == null) + { + Log.LogError("Processor::Execute: Processer base has not been configured. Options does not exist!"); + throw new InvalidOperationException("Processer base has not been configured."); + } + if (string.IsNullOrEmpty(Options.SourceName) || string.IsNullOrEmpty(Options.TargetName)) + { + Log.LogCritical("Processor::Execute: Processer base has not been configured. Source or Target is null! You need to set both 'SourceName' and 'TargetName' on the processer to a valid 'Endpoint' entry."); + Environment.Exit(-200); + } + Status = ProcessingStatus.Running; + InternalExecute(); + Status = ProcessingStatus.Complete; + + + Log.LogInformation(" Migration Processor Complete {MigrationContextname} ", Name); } - if (string.IsNullOrEmpty(Options.SourceName) || string.IsNullOrEmpty(Options.TargetName)) + catch (Exception ex) { - Log.LogCritical("Processor::Execute: Processer base has not been configured. Source or Target is null! You need to set both 'SourceName' and 'TargetName' on the processer to a valid 'Endpoint' entry."); - Environment.Exit(-200); + Status = ProcessingStatus.Failed; + ProcessorActivity.SetStatus(ActivityStatusCode.Error); + Telemetry.TrackException(ex, ProcessorActivity.Tags); + Log.LogCritical(ex, "Error while running {MigrationContextname}", Name); + } + finally + { + Log.LogInformation("{ProcessorName} completed in {ProcessorDuration} ", Name, ProcessorActivity.Duration.ToString("c")); } - Status = ProcessingStatus.Running; - InternalExecute(); - Status = ProcessingStatus.Complete; - executeTimer.Stop(); - - Log.LogInformation(" Migration Processor Complete {MigrationContextname} ", Name); - } - catch (Exception ex) - { - Status = ProcessingStatus.Failed; - executeTimer.Stop(); - Telemetry.TrackException(ex, - new Dictionary - { - {"Name", Name}, - //{"Target", Engine.Target.Config.ToString()}, - //{"Source", Engine.Source.Config.ToString()}, - {"Status", Status.ToString()} - }, - new Dictionary - { - {"MigrationContextTime", executeTimer.ElapsedMilliseconds} - }); - Log.LogCritical(ex, "Error while running {MigrationContextname}", Name); - } - finally - { - Log.LogInformation("{ProcessorName} completed in {ProcessorDuration} ", Name, executeTimer.Elapsed.ToString("c")); - Telemetry.TrackRequest(Name, start, executeTimer.Elapsed, Status.ToString(), (Status == ProcessingStatus.Complete)); } } diff --git a/src/MigrationTools/Processors/Infrastructure/ProcessorContainer.cs b/src/MigrationTools/Processors/Infrastructure/ProcessorContainer.cs index 09ddb2960..ac2d3c359 100644 --- a/src/MigrationTools/Processors/Infrastructure/ProcessorContainer.cs +++ b/src/MigrationTools/Processors/Infrastructure/ProcessorContainer.cs @@ -4,7 +4,6 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -using Microsoft.ApplicationInsights.Channel; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; diff --git a/src/MigrationTools/Services/ActivitySourceProvider.cs b/src/MigrationTools/Services/ActivitySourceProvider.cs index 2d8758175..f04df8d15 100644 --- a/src/MigrationTools/Services/ActivitySourceProvider.cs +++ b/src/MigrationTools/Services/ActivitySourceProvider.cs @@ -14,35 +14,81 @@ using OpenTelemetry.Logs; using OpenTelemetry.Instrumentation.Process; using OpenTelemetry; +using Serilog; +using MigrationTools.Options; namespace MigrationTools.Services { public class ActivitySourceProvider { - private static readonly ActivitySource _activitySource; public static readonly string ActivitySourceName = "MigrationTools"; - public static string OpenTelemetryConnectionString = "InstrumentationKey=823d0de3-69c9-42ee-b902-de7675f681bc;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=4dd8f684-2f91-48ac-974f-dc898b686786"; + private static string OpenTelemetryConnectionString = "InstrumentationKey=823d0de3-69c9-42ee-b902-de7675f681bc;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=4dd8f684-2f91-48ac-974f-dc898b686786"; + private static string MigrationToolAIConnectionString = "InstrumentationKey=2d666f84-b3fb-4dcf-9aad-65de038d2772;IngestionEndpoint=https://northeurope-0.in.applicationinsights.azure.com/;LiveEndpoint=https://northeurope.livediagnostics.monitor.azure.com/;ApplicationId=9146fe72-5c18-48d7-a0f2-8fb891ef1277"; + public static ActivitySource ActivitySource { get; private set; } public static bool IsActivitySourceEnabled { get; private set; } + public static bool TelemeteryDebug { get; private set; } + + public static string GetConnectionString() + { + return OpenTelemetryConnectionString; + } + + static ActivitySourceProvider() { IsActivitySourceEnabled = true; - _activitySource = new ActivitySource(ActivitySourceName); - - //ActivitySource.AddActivityListener(new ActivityListener() - //{ - // ShouldListenTo = _ => true, - // Sample = (ref ActivityCreationOptions _) => ActivitySamplingResult.AllData, - // ActivityStarted = activity => Console.WriteLine($"{activity.ParentId}:{activity.Id} - Start"), - // ActivityStopped = activity => Console.WriteLine($"{activity.ParentId}:{activity.Id} - Stop") - //}); + ActivitySource = new ActivitySource(ActivitySourceName); + + // Enable debug listener + ActivitySource.AddActivityListener(new ActivityListener + { + ShouldListenTo = _ => true, + Sample = (ref ActivityCreationOptions _) => ActivitySamplingResult.AllData, + ActivityStarted = activity => + { + if (TelemeteryDebug) + { + Log.Debug($"Telemetry:{GetActivityPath(activity)} - Start"); + } + }, + ActivityStopped = activity => + { + if (TelemeteryDebug) + { + Log.Debug($"Telemetry:{GetActivityPath(activity)} - Stop"); + } + } + }); + } + + public static string GetActivityPath(Activity activity) + { + if (activity == null) + { + return string.Empty; + } + + // Recursively get the parent's path + string parentPath = GetActivityPath(activity.Parent); + + // If the parent path is not empty, append the current activity's name with a colon separator + if (!string.IsNullOrEmpty(parentPath)) + { + return $"{parentPath}:{activity.DisplayName}"; + } + + // If there is no parent, just return the current activity's name + return activity.DisplayName; } + + public static ActivitySource GetActivitySource() { - return _activitySource; + return ActivitySource; } public static void DisableActivitySource() @@ -55,6 +101,21 @@ public static void EnableActivitySource() IsActivitySourceEnabled = true; } + public static void DisableTelemeteryDebug() + { + TelemeteryDebug = false; + } + + public static void EnableTelemeteryDebug() + { + TelemeteryDebug = true; + } + + public static void FlushTelemetery() + { + throw new NotImplementedException(); + } + internal class ActivityFilteringProcessor : BaseProcessor { public override void OnStart(Activity activity) @@ -85,12 +146,12 @@ public static IHostBuilder UseOpenTelemitery(this IHostBuilder builder, string v .SetSampler(new AlwaysOnSampler()) .SetResourceBuilder(ResourceBuilder.CreateDefault().AddService(entryAssemblyName, serviceVersion: versionString)) .AddSource(ActivitySourceProvider.ActivitySourceName) // Register your custom ActivitySource - .AddConsoleExporter() // Export traces to console + //.AddConsoleExporter() // Export traces to console .AddProcessor(new ActivitySourceProvider.ActivityFilteringProcessor()) .SetErrorStatusOnException() .AddAzureMonitorTraceExporter(options => { - options.ConnectionString = ActivitySourceProvider.OpenTelemetryConnectionString; + options.ConnectionString = ActivitySourceProvider.GetConnectionString(); }); }) @@ -103,24 +164,66 @@ public static IHostBuilder UseOpenTelemitery(this IHostBuilder builder, string v //.AddConsoleExporter() // Export metrics to console .AddAzureMonitorMetricExporter(options => { - options.ConnectionString = ActivitySourceProvider.OpenTelemetryConnectionString; + + options.ConnectionString = ActivitySourceProvider.GetConnectionString(); }); }); - - //services.AddLogging(loggingBuilder => - //{ - // loggingBuilder.AddOpenTelemetry(options => - // { - // options.AddConsoleExporter(); - // options.AddAzureMonitorLogExporter(config => - // { - // config.ConnectionString = ActivitySourceProvider.OpenTelemetryConnectionString; - // }); - // }); - //}); + services.AddLogging(loggingBuilder => + { + loggingBuilder.AddOpenTelemetry(options => + { + //options.AddConsoleExporter(); + options.AddAzureMonitorLogExporter(config => + { + config.ConnectionString = ActivitySourceProvider.GetConnectionString(); + }); + }); + }); services.AddSingleton(sp => ActivitySourceProvider.GetActivitySource()); }); + + + return builder; } + + public static void SetTagsFromOptions(this Activity activity, IOptions options) + { + if (options == null) + { + return; + } + var properties = options.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance); + foreach (var property in properties) + { + var value = property.GetValue(options); + + if (value != null) + { + activity.SetTag($"options.{property.Name}", value.ToString()); + activity.SetTag($"{options.GetType().Name}.{property.Name}", value.ToString()); + } + } + return; + } + +public static void SetTagsFromObject(this Activity activity, object values) + { + if (values == null) + { + return; + } + var properties = values.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance); + foreach (var property in properties) + { + var value = property.GetValue(values); + + if (value != null) + { + activity.SetTag($"{values.GetType().Name}.{property.Name}", value.ToString()); + } + } + return; + } } } diff --git a/src/MigrationTools/Services/ITelemetryLogger.cs b/src/MigrationTools/Services/ITelemetryLogger.cs index 61f3ab85c..4b4e37d1d 100644 --- a/src/MigrationTools/Services/ITelemetryLogger.cs +++ b/src/MigrationTools/Services/ITelemetryLogger.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using Microsoft.ApplicationInsights.DataContracts; namespace MigrationTools { @@ -8,19 +7,7 @@ public interface ITelemetryLogger { string SessionId { get; } - void TrackDependency(DependencyTelemetry dependencyTelemetry); - - void TrackEvent(EventTelemetry eventTelemetry); - - void TrackEvent(string name); - - void TrackEvent(string name, IDictionary properties, IDictionary measurements); - - //void TrackRequest(RequestTelemetry requestTelemetry); - void TrackRequest(string name, DateTimeOffset startTime, TimeSpan duration, string responseCode, bool success); - - void TrackException(Exception ex, IDictionary properties = null, IDictionary measurements = null); - - void CloseAndFlush(); + void TrackException(Exception ex, IDictionary properties = null); + void TrackException(Exception ex, IEnumerable> properties = null); } } \ No newline at end of file diff --git a/src/MigrationTools/Services/TelemetryClientAdapter.cs b/src/MigrationTools/Services/TelemetryClientAdapter.cs index bfec1d0d4..393108398 100644 --- a/src/MigrationTools/Services/TelemetryClientAdapter.cs +++ b/src/MigrationTools/Services/TelemetryClientAdapter.cs @@ -1,34 +1,22 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.Linq; using System.Reflection; using System.Security.Principal; using System.Text.RegularExpressions; using Elmah.Io.Client; -using Microsoft.ApplicationInsights; -using Microsoft.ApplicationInsights.DataContracts; -using Microsoft.ApplicationInsights.Extensibility; using MigrationTools.Services; namespace MigrationTools { public class TelemetryClientAdapter : ITelemetryLogger { - private TelemetryClient _telemetryClient; private static IElmahioAPI elmahIoClient; private static IMigrationToolVersion _MigrationToolVersion; - public TelemetryClientAdapter(TelemetryConfiguration telemetryConfiguration, IMigrationToolVersion migrationToolVersion) + public TelemetryClientAdapter(IMigrationToolVersion migrationToolVersion) { - TelemetryClient telemetryClient = new TelemetryClient(telemetryConfiguration); - _MigrationToolVersion = migrationToolVersion; - telemetryClient.Context.Session.Id = Guid.NewGuid().ToString(); - telemetryClient.Context.Device.OperatingSystem = Environment.OSVersion.ToString(); - if (!(System.Reflection.Assembly.GetEntryAssembly() is null)) - { - telemetryClient.Context.Component.Version = migrationToolVersion.GetRunningVersion().versionString; - } - _telemetryClient = telemetryClient; elmahIoClient = ElmahioAPI.Create("7589821e832a4ae1a1170f8201def634", new ElmahIoOptions { @@ -39,43 +27,12 @@ public TelemetryClientAdapter(TelemetryConfiguration telemetryConfiguration, IMi } - public string SessionId - { - get - { - return _telemetryClient.Context.Session.Id; - } - } - - public void CloseAndFlush() - { - _telemetryClient.Flush(); - } - - public void TrackDependency(DependencyTelemetry dependencyTelemetry) - { - _telemetryClient.TrackDependency(dependencyTelemetry); - } - - public void TrackEvent(EventTelemetry eventTelemetry) - { - _telemetryClient.TrackEvent(eventTelemetry); - } - - public void TrackEvent(string name) - { - _telemetryClient.TrackEvent(name); - } + private static string _sessionid = Guid.NewGuid().ToString(); - public void TrackEvent(string name, IDictionary properties, IDictionary measurements) - { - _telemetryClient.TrackEvent(name, properties, measurements); - } + public string SessionId => _sessionid; - public void TrackException(Exception ex, IDictionary properties, IDictionary measurements) + public void TrackException(Exception ex, IDictionary properties) { - _telemetryClient.TrackException(ex, properties, measurements); - var baseException = ex.GetBaseException(); var createMessage = new CreateMessage { @@ -105,20 +62,14 @@ public void TrackException(Exception ex, IDictionary properties, } } - if (measurements != null) - { - foreach (var measurement in measurements) - { - createMessage.Data.Add(new Item(measurement.Key, measurement.Value.ToString())); - } - } var result = elmahIoClient.Messages.CreateAndNotify(new Guid("24086b6d-4f58-47f4-8ac7-68d8bc05ca9e"), createMessage); Console.WriteLine($"Error logged to Elmah.io"); } - public void TrackRequest(string name, DateTimeOffset startTime, TimeSpan duration, string responseCode, bool success) + public void TrackException(Exception ex, IEnumerable> properties = null) { - _telemetryClient.TrackRequest(name, startTime, duration, responseCode, success); + TrackException(ex, properties.ToDictionary(k => k.Key, v => v.Value)); } + } } \ No newline at end of file From 98df924d09b8dc4a6119dc205362104fa34ebde5 Mon Sep 17 00:00:00 2001 From: "Martin Hinshelwood nkdAgility.com" Date: Tue, 3 Sep 2024 14:43:07 +0100 Subject: [PATCH 02/11] Update --- docs/Reference/Generated/MigrationTools.xml | 12 ++++++------ .../Processors/TfsProcessorTests.cs | 2 ++ .../Clients/TfsWorkItemMigrationClient.cs | 2 +- .../Services/TelemetryLoggerFake.cs | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/Reference/Generated/MigrationTools.xml b/docs/Reference/Generated/MigrationTools.xml index cffb1136e..8debe4df4 100644 --- a/docs/Reference/Generated/MigrationTools.xml +++ b/docs/Reference/Generated/MigrationTools.xml @@ -263,27 +263,27 @@ - => @"02994fe0" + => @"2673d057" - => @"02994fe0e8aec5d499f0ac58618e3dcfaeeb7c35" + => @"2673d0572baf571390e40da758435bd9f7772ec3" - => @"2024-09-02T17:33:40+01:00" + => @"2024-09-03T14:35:41+01:00" - => @"0" + => @"1" - => @"v16.0.0-Preview.6" + => @"v16.0.0-Preview.6-1-g2673d057" @@ -318,7 +318,7 @@ - => @"0" + => @"1" diff --git a/src/MigrationTools.Clients.TfsObjectModel.Tests/Processors/TfsProcessorTests.cs b/src/MigrationTools.Clients.TfsObjectModel.Tests/Processors/TfsProcessorTests.cs index 92c574dc8..56e577a2c 100644 --- a/src/MigrationTools.Clients.TfsObjectModel.Tests/Processors/TfsProcessorTests.cs +++ b/src/MigrationTools.Clients.TfsObjectModel.Tests/Processors/TfsProcessorTests.cs @@ -16,6 +16,7 @@ using System.Collections.Generic; using System.Xml.Linq; using Microsoft.VisualStudio.Services.Commerce; +using Microsoft.Extensions.DependencyInjection.Extensions; namespace MigrationTools.Processors.Tests { @@ -104,6 +105,7 @@ protected TfsSharedQueryProcessor GetTfsSharedQueryProcessor(TfsSharedQueryProce services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); + services.TryAddScoped(); services.AddSingleton(); diff --git a/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemMigrationClient.cs b/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemMigrationClient.cs index f1e6d0ec6..b0a5f9e11 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemMigrationClient.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemMigrationClient.cs @@ -26,7 +26,7 @@ public class TfsWorkItemMigrationClient : WorkItemMigrationClientBase private ProjectData _project; private WorkItemStore _wistore; - public TfsWorkItemMigrationClient(IOptions options, IMigrationClient migrationClient, IWorkItemQueryBuilderFactory workItemQueryBuilderFactory, ITelemetryLogger telemetry, MeterProvider meterProvider) + public TfsWorkItemMigrationClient(IOptions options, IMigrationClient migrationClient, IWorkItemQueryBuilderFactory workItemQueryBuilderFactory, ITelemetryLogger telemetry) : base(options, migrationClient, telemetry) { _telemetry = telemetry; diff --git a/src/MigrationTools.Shadows/Services/TelemetryLoggerFake.cs b/src/MigrationTools.Shadows/Services/TelemetryLoggerFake.cs index a6fa56f3a..925444917 100644 --- a/src/MigrationTools.Shadows/Services/TelemetryLoggerFake.cs +++ b/src/MigrationTools.Shadows/Services/TelemetryLoggerFake.cs @@ -15,7 +15,7 @@ public void TrackException(Exception ex, IDictionary properties public void TrackException(Exception ex, IEnumerable> properties = null) { - throw new NotImplementedException(); + } } } From b2c4ef312628645a559b69450a695d4da36fcabe Mon Sep 17 00:00:00 2001 From: "Martin Hinshelwood nkdAgility.com" Date: Tue, 3 Sep 2024 14:44:45 +0100 Subject: [PATCH 03/11] Update MigrationTools._EngineV1.Clients to MigrationTools.Clients --- .../MigrationTools.Clients.TfsObjectModel.xml | 136 +++++++++--------- docs/Reference/Generated/MigrationTools.xml | 12 +- ...eference.endpoints.tfsmigrationclient.yaml | 8 +- .../reference.endpoints.tfsmigrationclient.md | 8 +- .../Endpoints/FileSystemWorkItemQuery.cs | 2 +- .../Endpoints/TfsWorkItemEndPointTests.cs | 2 +- .../Processors/TfsProcessorTests.cs | 2 +- .../Clients/TfsReflectedWorkItemId.cs | 2 +- .../Clients/TfsTestPlanMigrationClient.cs | 2 +- .../Clients/TfsWorkItemMigrationClient.cs | 2 +- .../Clients/TfsWorkItemQuery.cs | 2 +- .../Endpoints/TfsTeamProjectEndpoint.cs | 2 +- .../Processors/CreateTeamFoldersProcessor.cs | 2 +- .../ExportProfilePictureFromADProcessor.cs | 2 +- .../Processors/ExportTeamListProcessor.cs | 2 +- .../ExportUsersForMappingProcessor.cs | 2 +- .../Processors/FakeProcessor.cs | 2 +- .../ImportProfilePictureProcessor.cs | 2 +- .../Processors/Infra/TestManagementContext.cs | 2 +- .../Processors/Infra/TfsProcessor.cs | 2 +- .../TestConfigurationsMigrationProcessor.cs | 2 +- .../TestPlansAndSuitesMigrationProcessor.cs | 2 +- .../TestVariablesMigrationProcessor.cs | 2 +- .../TfsWorkItemMigrationProcessor.cs | 2 +- .../Processors/WorkItemBulkEditProcessor.cs | 2 +- .../Processors/WorkItemDeleteProcessor.cs | 2 +- .../WorkItemPostProcessingProcessor.cs | 2 +- .../WorkItemUpdateAreasAsTagsProcessor.cs | 2 +- .../ServiceCollectionExtensions.cs | 2 +- .../Tools/TfsGitRepositoryTool.cs | 2 +- .../Tools/TfsNodeStructureTool.cs | 2 +- .../Tools/TfsRevisionManagerTool.cs | 2 +- .../Tools/TfsWorkItemLinkTool.cs | 2 +- .../Core/Clients/MigrationClientMock.cs | 2 +- .../Clients/WorkItemMigrationClientMock.cs | 2 +- .../Clients/WorkItemMigrationClientTests.cs | 2 +- .../Endpoints/IWorkItemQuery.cs | 2 +- src/MigrationTools/IMigrationEngine.cs | 2 +- .../_EngineV1/Clients/IMigrationClient.cs | 2 +- .../Clients/ITestPlanMigrationClient.cs | 2 +- .../Clients/IWorkItemMigrationClient.cs | 2 +- .../Clients/IWorkItemQueryBuilder.cs | 2 +- .../Clients/IWorkItemQueryBuilderFactory.cs | 2 +- .../_EngineV1/Clients/ReflectedWorkItemId.cs | 2 +- .../Clients/WorkItemMigrationClientBase.cs | 2 +- .../_EngineV1/Clients/WorkItemQueryBase.cs | 2 +- .../_EngineV1/Clients/WorkItemQueryBuilder.cs | 2 +- .../Clients/WorkItemQueryBuilderFactory.cs | 2 +- 48 files changed, 126 insertions(+), 126 deletions(-) diff --git a/docs/Reference/Generated/MigrationTools.Clients.TfsObjectModel.xml b/docs/Reference/Generated/MigrationTools.Clients.TfsObjectModel.xml index c16e34a24..f58c72bc7 100644 --- a/docs/Reference/Generated/MigrationTools.Clients.TfsObjectModel.xml +++ b/docs/Reference/Generated/MigrationTools.Clients.TfsObjectModel.xml @@ -4,74 +4,6 @@ MigrationTools.Clients.TfsObjectModel - - - The tag name that is present on all elements that must be migrated. If this option isn't present this processor will migrate all. - - `String.Empty` - - - - Filtering conditions to decide whether to migrate a test plan or not. When provided, this partial query is added after `Select * From TestPlan Where` when selecting test plans. Among filtering options, `AreaPath`, `PlanName` and `PlanState` are known to work. There is unfortunately no documentation regarding the available fields. - - `String.Empty` - - - - ??Not sure what this does. Check code. - - false - - - - ??Not sure what this does. Check code. - - 0 - - - - Indicates whether the configuration for node structure transformation should be taken from the common enricher configs. Otherwise the configuration elements below are used - - false - - Remove Invalid Links, see https://github.com/nkdAgility/azure-devops-migration-tools/issues/178 - - - - - - - - A work item query based on WIQL to select only important work items. To migrate all leave this empty. See [WIQL Query Bits](#wiql-query-bits) - - AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') - - - - A list of work items to import - - [] - - - - This loads all of the work items already saved to the Target and removes them from the Source work item list prior to commencing the run. - While this may take some time in large data sets it reduces the time of the overall migration significantly if you need to restart. - - true - - - - Pause after each work item is migrated - - false - - - - **beta** If set to a number greater than 0 work items that fail to save will retry after a number of seconds equal to the retry count. - This allows for periodic network glitches not to end the process. - - 5 - Creates folders in Sared Queries for each Team @@ -439,6 +371,74 @@ \ + + + The tag name that is present on all elements that must be migrated. If this option isn't present this processor will migrate all. + + `String.Empty` + + + + Filtering conditions to decide whether to migrate a test plan or not. When provided, this partial query is added after `Select * From TestPlan Where` when selecting test plans. Among filtering options, `AreaPath`, `PlanName` and `PlanState` are known to work. There is unfortunately no documentation regarding the available fields. + + `String.Empty` + + + + ??Not sure what this does. Check code. + + false + + + + ??Not sure what this does. Check code. + + 0 + + + + Indicates whether the configuration for node structure transformation should be taken from the common enricher configs. Otherwise the configuration elements below are used + + false + + Remove Invalid Links, see https://github.com/nkdAgility/azure-devops-migration-tools/issues/178 + + + + + + + + A work item query based on WIQL to select only important work items. To migrate all leave this empty. See [WIQL Query Bits](#wiql-query-bits) + + AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') + + + + A list of work items to import + + [] + + + + This loads all of the work items already saved to the Target and removes them from the Source work item list prior to commencing the run. + While this may take some time in large data sets it reduces the time of the overall migration significantly if you need to restart. + + true + + + + Pause after each work item is migrated + + false + + + + **beta** If set to a number greater than 0 work items that fail to save will retry after a number of seconds equal to the retry count. + This allows for periodic network glitches not to end the process. + + 5 + `AttachmentMigration` is set to true then you need to specify a working path for attachments to be saved locally. diff --git a/docs/Reference/Generated/MigrationTools.xml b/docs/Reference/Generated/MigrationTools.xml index 8debe4df4..c4eff3a1b 100644 --- a/docs/Reference/Generated/MigrationTools.xml +++ b/docs/Reference/Generated/MigrationTools.xml @@ -263,27 +263,27 @@ - => @"2673d057" + => @"98df924d" - => @"2673d0572baf571390e40da758435bd9f7772ec3" + => @"98df924d09b8dc4a6119dc205362104fa34ebde5" - => @"2024-09-03T14:35:41+01:00" + => @"2024-09-03T14:43:07+01:00" - => @"1" + => @"2" - => @"v16.0.0-Preview.6-1-g2673d057" + => @"v16.0.0-Preview.6-2-g98df924d" @@ -318,7 +318,7 @@ - => @"1" + => @"2" diff --git a/docs/_data/reference.endpoints.tfsmigrationclient.yaml b/docs/_data/reference.endpoints.tfsmigrationclient.yaml index 713693132..913071072 100644 --- a/docs/_data/reference.endpoints.tfsmigrationclient.yaml +++ b/docs/_data/reference.endpoints.tfsmigrationclient.yaml @@ -1,5 +1,5 @@ optionsClassName: TfsMigrationClient -optionsClassFullName: MigrationTools._EngineV1.Clients.TfsMigrationClient +optionsClassFullName: MigrationTools.Clients.TfsMigrationClient configurationSamples: - name: defaults description: @@ -11,7 +11,7 @@ configurationSamples: } } } - sampleFor: MigrationTools._EngineV1.Clients.TfsMigrationClient + sampleFor: MigrationTools.Clients.TfsMigrationClient - name: sample description: code: >- @@ -22,7 +22,7 @@ configurationSamples: } } } - sampleFor: MigrationTools._EngineV1.Clients.TfsMigrationClient + sampleFor: MigrationTools.Clients.TfsMigrationClient - name: classic description: code: >- @@ -54,7 +54,7 @@ configurationSamples: "Name": null, "EndpointEnrichers": null } - sampleFor: MigrationTools._EngineV1.Clients.TfsMigrationClient + sampleFor: MigrationTools.Clients.TfsMigrationClient description: missng XML code comments className: TfsMigrationClient typeName: Endpoints diff --git a/docs/collections/_reference/reference.endpoints.tfsmigrationclient.md b/docs/collections/_reference/reference.endpoints.tfsmigrationclient.md index f25fc78f5..11eb9ffed 100644 --- a/docs/collections/_reference/reference.endpoints.tfsmigrationclient.md +++ b/docs/collections/_reference/reference.endpoints.tfsmigrationclient.md @@ -1,6 +1,6 @@ --- optionsClassName: TfsMigrationClient -optionsClassFullName: MigrationTools._EngineV1.Clients.TfsMigrationClient +optionsClassFullName: MigrationTools.Clients.TfsMigrationClient configurationSamples: - name: defaults description: @@ -12,7 +12,7 @@ configurationSamples: } } } - sampleFor: MigrationTools._EngineV1.Clients.TfsMigrationClient + sampleFor: MigrationTools.Clients.TfsMigrationClient - name: sample description: code: >- @@ -23,7 +23,7 @@ configurationSamples: } } } - sampleFor: MigrationTools._EngineV1.Clients.TfsMigrationClient + sampleFor: MigrationTools.Clients.TfsMigrationClient - name: classic description: code: >- @@ -55,7 +55,7 @@ configurationSamples: "Name": null, "EndpointEnrichers": null } - sampleFor: MigrationTools._EngineV1.Clients.TfsMigrationClient + sampleFor: MigrationTools.Clients.TfsMigrationClient description: missng XML code comments className: TfsMigrationClient typeName: Endpoints diff --git a/src/MigrationTools.Clients.FileSystem/Endpoints/FileSystemWorkItemQuery.cs b/src/MigrationTools.Clients.FileSystem/Endpoints/FileSystemWorkItemQuery.cs index b912173b8..0c4379ed6 100644 --- a/src/MigrationTools.Clients.FileSystem/Endpoints/FileSystemWorkItemQuery.cs +++ b/src/MigrationTools.Clients.FileSystem/Endpoints/FileSystemWorkItemQuery.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; using MigrationTools.DataContracts; using Newtonsoft.Json; diff --git a/src/MigrationTools.Clients.TfsObjectModel.Tests/Endpoints/TfsWorkItemEndPointTests.cs b/src/MigrationTools.Clients.TfsObjectModel.Tests/Endpoints/TfsWorkItemEndPointTests.cs index d34e2f1a4..e73b78b76 100644 --- a/src/MigrationTools.Clients.TfsObjectModel.Tests/Endpoints/TfsWorkItemEndPointTests.cs +++ b/src/MigrationTools.Clients.TfsObjectModel.Tests/Endpoints/TfsWorkItemEndPointTests.cs @@ -4,7 +4,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using Microsoft.VisualStudio.TestTools.UnitTesting; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; using MigrationTools.DataContracts; using MigrationTools.EndpointEnrichers; using MigrationTools.Enrichers; diff --git a/src/MigrationTools.Clients.TfsObjectModel.Tests/Processors/TfsProcessorTests.cs b/src/MigrationTools.Clients.TfsObjectModel.Tests/Processors/TfsProcessorTests.cs index 56e577a2c..841ca5e97 100644 --- a/src/MigrationTools.Clients.TfsObjectModel.Tests/Processors/TfsProcessorTests.cs +++ b/src/MigrationTools.Clients.TfsObjectModel.Tests/Processors/TfsProcessorTests.cs @@ -10,7 +10,7 @@ using MigrationTools.Tools.Shadows; using MigrationTools.Shadows; using MigrationTools.Endpoints; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; using MigrationTools.Endpoints.Infrastructure; using System; using System.Collections.Generic; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsReflectedWorkItemId.cs b/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsReflectedWorkItemId.cs index d13e9aabd..650aa8e8f 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsReflectedWorkItemId.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsReflectedWorkItemId.cs @@ -3,7 +3,7 @@ using MigrationTools.DataContracts; using Serilog; -namespace MigrationTools._EngineV1.Clients +namespace MigrationTools.Clients { public class TfsReflectedWorkItemId : ReflectedWorkItemId { diff --git a/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsTestPlanMigrationClient.cs b/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsTestPlanMigrationClient.cs index 2977b2e15..5f37cc47e 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsTestPlanMigrationClient.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsTestPlanMigrationClient.cs @@ -7,7 +7,7 @@ using MigrationTools.Endpoints.Infrastructure; using MigrationTools.Options; -namespace MigrationTools._EngineV1.Clients +namespace MigrationTools.Clients { public class TfsTestPlanMigrationClient : ITestPlanMigrationClient { diff --git a/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemMigrationClient.cs b/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemMigrationClient.cs index b0a5f9e11..1a5f91a71 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemMigrationClient.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemMigrationClient.cs @@ -16,7 +16,7 @@ using OpenTelemetry.Metrics; using Serilog; -namespace MigrationTools._EngineV1.Clients +namespace MigrationTools.Clients { public class TfsWorkItemMigrationClient : WorkItemMigrationClientBase { diff --git a/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemQuery.cs b/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemQuery.cs index e87d74684..a40fcb694 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemQuery.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemQuery.cs @@ -8,7 +8,7 @@ using MigrationTools.Services; using Serilog; -namespace MigrationTools._EngineV1.Clients +namespace MigrationTools.Clients { public class TfsWorkItemQuery : WorkItemQueryBase { diff --git a/src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsTeamProjectEndpoint.cs b/src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsTeamProjectEndpoint.cs index a6c45f576..84b709f5e 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsTeamProjectEndpoint.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsTeamProjectEndpoint.cs @@ -18,7 +18,7 @@ using MigrationTools.Services; using Serilog; -namespace MigrationTools._EngineV1.Clients +namespace MigrationTools.Clients { public class TfsTeamProjectEndpoint : Endpoint, IMigrationClient // TODO: Rename IMigrationClient to ITfsTeamProjectEndpoint { diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/CreateTeamFoldersProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/CreateTeamFoldersProcessor.cs index 792b81142..067b10a32 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/CreateTeamFoldersProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/CreateTeamFoldersProcessor.cs @@ -7,7 +7,7 @@ using Microsoft.TeamFoundation.Client; using Microsoft.TeamFoundation.WorkItemTracking.Client; using MigrationTools; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; using MigrationTools._EngineV1.Configuration; using MigrationTools.Processors.Infrastructure; using MigrationTools.Tools; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportProfilePictureFromADProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportProfilePictureFromADProcessor.cs index 705874c85..cfcec0ff9 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportProfilePictureFromADProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportProfilePictureFromADProcessor.cs @@ -16,7 +16,7 @@ using Microsoft.Extensions.Options; using MigrationTools.Tools; using MigrationTools.Processors.Infrastructure; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; using MigrationTools.Enrichers; namespace MigrationTools.Processors diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportTeamListProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportTeamListProcessor.cs index cf5e5635a..b8173c174 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportTeamListProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportTeamListProcessor.cs @@ -7,7 +7,7 @@ using Microsoft.TeamFoundation.Framework.Common; using Microsoft.TeamFoundation.Server; using MigrationTools; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; using MigrationTools._EngineV1.Configuration; using MigrationTools.Enrichers; using MigrationTools.Processors.Infrastructure; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportUsersForMappingProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportUsersForMappingProcessor.cs index 896a95774..a46219305 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportUsersForMappingProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportUsersForMappingProcessor.cs @@ -6,7 +6,7 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using MigrationTools; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; using MigrationTools._EngineV1.Configuration; using MigrationTools._EngineV1.Configuration.Processing; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/FakeProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/FakeProcessor.cs index ea54d21ec..41c34c26b 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/FakeProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/FakeProcessor.cs @@ -9,7 +9,7 @@ using MigrationTools.Tools; using Microsoft.Extensions.Options; using MigrationTools.Enrichers; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; namespace MigrationTools.Processors { diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/ImportProfilePictureProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/ImportProfilePictureProcessor.cs index 167412e98..0ec77a5a2 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/ImportProfilePictureProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/ImportProfilePictureProcessor.cs @@ -11,7 +11,7 @@ using Microsoft.TeamFoundation.Framework.Client; using Microsoft.TeamFoundation.Framework.Common; using MigrationTools; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; using MigrationTools._EngineV1.Configuration; using MigrationTools.Enrichers; using MigrationTools.Processors.Infrastructure; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/Infra/TestManagementContext.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/Infra/TestManagementContext.cs index 16014189b..809369575 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/Infra/TestManagementContext.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/Infra/TestManagementContext.cs @@ -2,7 +2,7 @@ using System.Linq; using Microsoft.TeamFoundation.TestManagement.Client; using MigrationTools; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; namespace MigrationTools.Processors.Infrastructure { diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/Infra/TfsProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/Infra/TfsProcessor.cs index e3caaa14a..08ec52200 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/Infra/TfsProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/Infra/TfsProcessor.cs @@ -6,7 +6,7 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using MigrationTools; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; using MigrationTools.Enrichers; using MigrationTools.Tools; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TestConfigurationsMigrationProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TestConfigurationsMigrationProcessor.cs index 9438c051b..aad6f8ae1 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/TestConfigurationsMigrationProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/TestConfigurationsMigrationProcessor.cs @@ -4,7 +4,7 @@ using Microsoft.Extensions.Options; using Microsoft.TeamFoundation.TestManagement.Client; using MigrationTools; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; using MigrationTools._EngineV1.Configuration; using MigrationTools.Enrichers; using MigrationTools.Processors.Infrastructure; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TestPlansAndSuitesMigrationProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TestPlansAndSuitesMigrationProcessor.cs index 2806dbe3c..8225c6281 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/TestPlansAndSuitesMigrationProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/TestPlansAndSuitesMigrationProcessor.cs @@ -16,7 +16,7 @@ using Microsoft.VisualStudio.Services.TestManagement.TestPlanning.WebApi; using Microsoft.VisualStudio.Services.WebApi; using MigrationTools; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; using MigrationTools._EngineV1.Configuration; using MigrationTools._EngineV1.Configuration.Processing; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TestVariablesMigrationProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TestVariablesMigrationProcessor.cs index 647a6ddc9..ced183087 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/TestVariablesMigrationProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/TestVariablesMigrationProcessor.cs @@ -10,7 +10,7 @@ using MigrationTools.Processors.Infrastructure; using Microsoft.Extensions.Options; using MigrationTools.Enrichers; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; namespace MigrationTools.Processors diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessor.cs index 171f310a0..da2ce389b 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessor.cs @@ -22,7 +22,7 @@ using Microsoft.VisualStudio.Services.WebApi.Patch; using Microsoft.VisualStudio.Services.WebApi.Patch.Json; using MigrationTools; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; using MigrationTools._EngineV1.Configuration; using MigrationTools._EngineV1.Configuration.Processing; using MigrationTools._EngineV1.Containers; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemBulkEditProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemBulkEditProcessor.cs index 885674e30..d7b10976d 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemBulkEditProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemBulkEditProcessor.cs @@ -10,7 +10,7 @@ using Microsoft.Extensions.Options; using MigrationTools.Tools; using MigrationTools.Processors.Infrastructure; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; using MigrationTools.Enrichers; namespace MigrationTools.Processors diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemDeleteProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemDeleteProcessor.cs index d8a9e1b78..2b34e2415 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemDeleteProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemDeleteProcessor.cs @@ -5,7 +5,7 @@ using System.Linq; using Microsoft.Extensions.Logging; using MigrationTools; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; using MigrationTools._EngineV1.Configuration; using MigrationTools._EngineV1.Configuration.Processing; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemPostProcessingProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemPostProcessingProcessor.cs index 71f7f1469..d37d06881 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemPostProcessingProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemPostProcessingProcessor.cs @@ -6,7 +6,7 @@ using Microsoft.Extensions.Logging; using Microsoft.TeamFoundation.WorkItemTracking.Client; using MigrationTools; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; using MigrationTools._EngineV1.Configuration; using MigrationTools._EngineV1.Configuration.Processing; using MigrationTools._EngineV1.DataContracts; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemUpdateAreasAsTagsProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemUpdateAreasAsTagsProcessor.cs index 1b57b94c7..c06c3cb64 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemUpdateAreasAsTagsProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemUpdateAreasAsTagsProcessor.cs @@ -5,7 +5,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using MigrationTools; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; using MigrationTools._EngineV1.Configuration; using MigrationTools._EngineV1.Configuration.Processing; using MigrationTools.DataContracts; diff --git a/src/MigrationTools.Clients.TfsObjectModel/ServiceCollectionExtensions.cs b/src/MigrationTools.Clients.TfsObjectModel/ServiceCollectionExtensions.cs index e6805ffc9..73e0f3aa2 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/ServiceCollectionExtensions.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/ServiceCollectionExtensions.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; using MigrationTools._EngineV1.Containers; using MigrationTools.EndpointEnrichers; using MigrationTools.Endpoints; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsGitRepositoryTool.cs b/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsGitRepositoryTool.cs index a717c129b..39144fd86 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsGitRepositoryTool.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsGitRepositoryTool.cs @@ -9,7 +9,7 @@ using Microsoft.TeamFoundation.Git.Client; using Microsoft.TeamFoundation.SourceControl.WebApi; using Microsoft.TeamFoundation.WorkItemTracking.Client; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; using MigrationTools.DataContracts; using MigrationTools.Enrichers; using MigrationTools.Processors; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsNodeStructureTool.cs b/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsNodeStructureTool.cs index 4cbbf6c17..41f3ee139 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsNodeStructureTool.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsNodeStructureTool.cs @@ -10,7 +10,7 @@ using Microsoft.TeamFoundation.Common; using Microsoft.TeamFoundation.Server; using Microsoft.TeamFoundation.Work.WebApi; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; using MigrationTools.DataContracts; using MigrationTools.Endpoints; using MigrationTools.Enrichers; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsRevisionManagerTool.cs b/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsRevisionManagerTool.cs index 5c1206e1a..d0a144046 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsRevisionManagerTool.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsRevisionManagerTool.cs @@ -7,7 +7,7 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.TeamFoundation.WorkItemTracking.Client; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; using MigrationTools.DataContracts; using MigrationTools.Endpoints; using MigrationTools.Enrichers; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsWorkItemLinkTool.cs b/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsWorkItemLinkTool.cs index a52dfa6c0..970eaa5e0 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsWorkItemLinkTool.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsWorkItemLinkTool.cs @@ -4,7 +4,7 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.TeamFoundation.WorkItemTracking.Client; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; using MigrationTools.DataContracts; using MigrationTools.Enrichers; using MigrationTools.Exceptions; diff --git a/src/MigrationTools.Tests/Core/Clients/MigrationClientMock.cs b/src/MigrationTools.Tests/Core/Clients/MigrationClientMock.cs index 7fdca93c4..1009fd5f3 100644 --- a/src/MigrationTools.Tests/Core/Clients/MigrationClientMock.cs +++ b/src/MigrationTools.Tests/Core/Clients/MigrationClientMock.cs @@ -2,7 +2,7 @@ using System.Net; using Microsoft.VisualStudio.Services.Common; using Microsoft.VisualStudio.Services.WebApi; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; using MigrationTools._EngineV1.Configuration; using MigrationTools.Endpoints; using MigrationTools.Endpoints.Infrastructure; diff --git a/src/MigrationTools.Tests/Core/Clients/WorkItemMigrationClientMock.cs b/src/MigrationTools.Tests/Core/Clients/WorkItemMigrationClientMock.cs index 86c67f69d..0554f7ea7 100644 --- a/src/MigrationTools.Tests/Core/Clients/WorkItemMigrationClientMock.cs +++ b/src/MigrationTools.Tests/Core/Clients/WorkItemMigrationClientMock.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; using System.Linq; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; using MigrationTools._EngineV1.Configuration; using MigrationTools._EngineV1.DataContracts; using MigrationTools.DataContracts; diff --git a/src/MigrationTools.Tests/Core/Clients/WorkItemMigrationClientTests.cs b/src/MigrationTools.Tests/Core/Clients/WorkItemMigrationClientTests.cs index 74e82f630..318959594 100644 --- a/src/MigrationTools.Tests/Core/Clients/WorkItemMigrationClientTests.cs +++ b/src/MigrationTools.Tests/Core/Clients/WorkItemMigrationClientTests.cs @@ -1,6 +1,6 @@ using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; using MigrationTools.DataContracts; namespace MigrationTools.Clients.Tests diff --git a/src/MigrationTools/Endpoints/IWorkItemQuery.cs b/src/MigrationTools/Endpoints/IWorkItemQuery.cs index 6f76c0b47..73076754d 100644 --- a/src/MigrationTools/Endpoints/IWorkItemQuery.cs +++ b/src/MigrationTools/Endpoints/IWorkItemQuery.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; using MigrationTools.DataContracts; namespace MigrationTools.Endpoints diff --git a/src/MigrationTools/IMigrationEngine.cs b/src/MigrationTools/IMigrationEngine.cs index 6bfe37c7d..255e41e08 100644 --- a/src/MigrationTools/IMigrationEngine.cs +++ b/src/MigrationTools/IMigrationEngine.cs @@ -1,5 +1,5 @@ using System; -using MigrationTools._EngineV1.Clients; +using MigrationTools.Clients; using MigrationTools._EngineV1.Containers; using MigrationTools.Endpoints; using MigrationTools.Processors; diff --git a/src/MigrationTools/_EngineV1/Clients/IMigrationClient.cs b/src/MigrationTools/_EngineV1/Clients/IMigrationClient.cs index 8421e3a41..14fa751a0 100644 --- a/src/MigrationTools/_EngineV1/Clients/IMigrationClient.cs +++ b/src/MigrationTools/_EngineV1/Clients/IMigrationClient.cs @@ -5,7 +5,7 @@ using MigrationTools.Endpoints; using MigrationTools.Endpoints.Infrastructure; -namespace MigrationTools._EngineV1.Clients +namespace MigrationTools.Clients { // TODO: Rename IMigrationClient to ITfsTeamProjectEndpoint public interface IMigrationClient diff --git a/src/MigrationTools/_EngineV1/Clients/ITestPlanMigrationClient.cs b/src/MigrationTools/_EngineV1/Clients/ITestPlanMigrationClient.cs index a95e2b546..4a29dcab9 100644 --- a/src/MigrationTools/_EngineV1/Clients/ITestPlanMigrationClient.cs +++ b/src/MigrationTools/_EngineV1/Clients/ITestPlanMigrationClient.cs @@ -4,7 +4,7 @@ using MigrationTools.Endpoints; using MigrationTools.Endpoints.Infrastructure; -namespace MigrationTools._EngineV1.Clients +namespace MigrationTools.Clients { public interface ITestPlanMigrationClient { diff --git a/src/MigrationTools/_EngineV1/Clients/IWorkItemMigrationClient.cs b/src/MigrationTools/_EngineV1/Clients/IWorkItemMigrationClient.cs index 98485046e..422ea7f49 100644 --- a/src/MigrationTools/_EngineV1/Clients/IWorkItemMigrationClient.cs +++ b/src/MigrationTools/_EngineV1/Clients/IWorkItemMigrationClient.cs @@ -5,7 +5,7 @@ using MigrationTools.Endpoints; using MigrationTools.Endpoints.Infrastructure; -namespace MigrationTools._EngineV1.Clients +namespace MigrationTools.Clients { public interface IWorkItemMigrationClient { diff --git a/src/MigrationTools/_EngineV1/Clients/IWorkItemQueryBuilder.cs b/src/MigrationTools/_EngineV1/Clients/IWorkItemQueryBuilder.cs index 78e66ba32..2c64f0776 100644 --- a/src/MigrationTools/_EngineV1/Clients/IWorkItemQueryBuilder.cs +++ b/src/MigrationTools/_EngineV1/Clients/IWorkItemQueryBuilder.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using MigrationTools.Endpoints; -namespace MigrationTools._EngineV1.Clients +namespace MigrationTools.Clients { public interface IWorkItemQueryBuilder { diff --git a/src/MigrationTools/_EngineV1/Clients/IWorkItemQueryBuilderFactory.cs b/src/MigrationTools/_EngineV1/Clients/IWorkItemQueryBuilderFactory.cs index 310c04d59..73020e0cf 100644 --- a/src/MigrationTools/_EngineV1/Clients/IWorkItemQueryBuilderFactory.cs +++ b/src/MigrationTools/_EngineV1/Clients/IWorkItemQueryBuilderFactory.cs @@ -1,4 +1,4 @@ -namespace MigrationTools._EngineV1.Clients +namespace MigrationTools.Clients { public interface IWorkItemQueryBuilderFactory { diff --git a/src/MigrationTools/_EngineV1/Clients/ReflectedWorkItemId.cs b/src/MigrationTools/_EngineV1/Clients/ReflectedWorkItemId.cs index e466818c4..55d94d6a0 100644 --- a/src/MigrationTools/_EngineV1/Clients/ReflectedWorkItemId.cs +++ b/src/MigrationTools/_EngineV1/Clients/ReflectedWorkItemId.cs @@ -1,7 +1,7 @@ using System; using MigrationTools.DataContracts; -namespace MigrationTools._EngineV1.Clients +namespace MigrationTools.Clients { public abstract class ReflectedWorkItemId { diff --git a/src/MigrationTools/_EngineV1/Clients/WorkItemMigrationClientBase.cs b/src/MigrationTools/_EngineV1/Clients/WorkItemMigrationClientBase.cs index b0dad9639..0b42c4f20 100644 --- a/src/MigrationTools/_EngineV1/Clients/WorkItemMigrationClientBase.cs +++ b/src/MigrationTools/_EngineV1/Clients/WorkItemMigrationClientBase.cs @@ -7,7 +7,7 @@ using MigrationTools.Endpoints; using MigrationTools.Endpoints.Infrastructure; -namespace MigrationTools._EngineV1.Clients +namespace MigrationTools.Clients { public abstract class WorkItemMigrationClientBase : IWorkItemMigrationClient { diff --git a/src/MigrationTools/_EngineV1/Clients/WorkItemQueryBase.cs b/src/MigrationTools/_EngineV1/Clients/WorkItemQueryBase.cs index 48ffb22df..bc0d6eb46 100644 --- a/src/MigrationTools/_EngineV1/Clients/WorkItemQueryBase.cs +++ b/src/MigrationTools/_EngineV1/Clients/WorkItemQueryBase.cs @@ -3,7 +3,7 @@ using MigrationTools.DataContracts; using MigrationTools.Endpoints; -namespace MigrationTools._EngineV1.Clients +namespace MigrationTools.Clients { public abstract class WorkItemQueryBase : IWorkItemQuery { diff --git a/src/MigrationTools/_EngineV1/Clients/WorkItemQueryBuilder.cs b/src/MigrationTools/_EngineV1/Clients/WorkItemQueryBuilder.cs index 49569a191..2a6eec2db 100644 --- a/src/MigrationTools/_EngineV1/Clients/WorkItemQueryBuilder.cs +++ b/src/MigrationTools/_EngineV1/Clients/WorkItemQueryBuilder.cs @@ -4,7 +4,7 @@ using Microsoft.Extensions.DependencyInjection; using MigrationTools.Endpoints; -namespace MigrationTools._EngineV1.Clients +namespace MigrationTools.Clients { public class WorkItemQueryBuilder : IWorkItemQueryBuilder { diff --git a/src/MigrationTools/_EngineV1/Clients/WorkItemQueryBuilderFactory.cs b/src/MigrationTools/_EngineV1/Clients/WorkItemQueryBuilderFactory.cs index 208c8b85e..153f91426 100644 --- a/src/MigrationTools/_EngineV1/Clients/WorkItemQueryBuilderFactory.cs +++ b/src/MigrationTools/_EngineV1/Clients/WorkItemQueryBuilderFactory.cs @@ -1,7 +1,7 @@ using System; using Microsoft.Extensions.DependencyInjection; -namespace MigrationTools._EngineV1.Clients +namespace MigrationTools.Clients { public class WorkItemQueryBuilderFactory : IWorkItemQueryBuilderFactory { From cd8c3616f29a1e28f9162564cf99ae434ae0081d Mon Sep 17 00:00:00 2001 From: "Martin Hinshelwood nkdAgility.com" Date: Tue, 3 Sep 2024 14:59:33 +0100 Subject: [PATCH 04/11] Rename all processors to the correct context --- .../MigrationTools.Clients.TfsObjectModel.xml | 90 +++++++++---------- .../Processors/CreateTeamFoldersProcessor.cs | 4 +- .../Processors/EmptyProcessorOptions.cs | 2 +- .../ExportProfilePictureFromADProcessor.cs | 6 +- ...ortProfilePictureFromADProcessorOptions.cs | 2 +- .../Processors/ExportTeamListProcessor.cs | 4 +- .../ExportUsersForMappingProcessor.cs | 6 +- .../ExportUsersForMappingProcessorOptions.cs | 2 +- .../Processors/FakeProcessor.cs | 4 +- .../ImportProfilePictureProcessor.cs | 6 +- .../ImportProfilePictureProcessorOptions.cs | 2 +- .../TestConfigurationsMigrationProcessor.cs | 6 +- ...ConfigurationsMigrationProcessorOptions.cs | 2 +- .../TestPlansAndSuitesMigrationProcessor.cs | 6 +- ...PlansAndSuitesMigrationProcessorOptions.cs | 4 +- .../TestVariablesMigrationProcessor.cs | 6 +- .../TestVariablesMigrationProcessorOptions.cs | 2 +- .../TfsWorkItemMigrationProcessor.cs | 4 +- .../TfsWorkItemMigrationProcessorOptions.cs | 2 +- .../Processors/WorkItemBulkEditProcessor.cs | 4 +- .../Processors/WorkItemDeleteProcessor.cs | 6 +- .../WorkItemDeleteProcessorOptions.cs | 4 +- .../WorkItemPostProcessingProcessor.cs | 4 +- .../WorkItemUpdateAreasAsTagsProcessor.cs | 8 +- ...rkItemUpdateAreasAsTagsProcessorOptions.cs | 2 +- .../ServiceCollectionExtensions.cs | 24 ++--- .../Commands/UpgradeConfigCommand.cs | 26 ++++++ 27 files changed, 132 insertions(+), 106 deletions(-) diff --git a/docs/Reference/Generated/MigrationTools.Clients.TfsObjectModel.xml b/docs/Reference/Generated/MigrationTools.Clients.TfsObjectModel.xml index f58c72bc7..b71bddac5 100644 --- a/docs/Reference/Generated/MigrationTools.Clients.TfsObjectModel.xml +++ b/docs/Reference/Generated/MigrationTools.Clients.TfsObjectModel.xml @@ -4,45 +4,45 @@ MigrationTools.Clients.TfsObjectModel - + Creates folders in Sared Queries for each Team alpha Shared Queries - + Downloads corporate images and updates TFS/Azure DevOps profiles alpha Profiles - + The source domain where the pictures should be exported. String.Empty - + The user name of the user that is used to export the pictures. String.Empty - + The password of the user that is used to export the pictures. String.Empty - + TODO: You wpuld need to customise this for your system. Clone repo and run in Debug String.Empty - + ExportUsersForMappingContext is a tool used to create a starter mapping file for users between the source and target systems. Use `ExportUsersForMappingConfig` to configure. @@ -50,60 +50,60 @@ ready Work Items - - + + Note: this is only for internal usage. Don't use this in your configurations. - + Downloads corporate images and updates TFS/Azure DevOps profiles alpha Profiles - + This processor can migrate `test configuration`. This should be run before `LinkMigrationConfig`. Beta Suites & Plans - + Rebuilds Suits and plans for Test Cases migrated using the WorkItemMigration Beta Suites & Plans - + Apply configurations to a single test case entry on the target, by copying from the source - + Sets default configurations on migrated test suites. The test suite to take as a source. The test suite to apply the default configurations to. - + Fix work item ID's in query based suites - + Retrieve the target identity for a given source descriptor Source identity Descriptor Target Identity - + Remove invalid links @@ -115,20 +115,20 @@ The plan to remove invalid links drom - + This processor can migrate test variables that are defined in the test plans / suites. This must run before `TestPlansAndSuitesMigrationConfig`. Beta Suites & Plans - + - + - + @@ -220,7 +220,7 @@ ready Work Items - + If this is enabled the creation process on the target project will create the items with the original creation date. (Important: The item history is always pointed to the date of the migration, it's change only the data column CreateDate, @@ -228,7 +228,7 @@ true - + If this is enabled the creation process on the target project will create the items with the original creation date. (Important: The item history is always pointed to the date of the migration, it's change only the data column CreateDate, @@ -236,13 +236,13 @@ true - + A work item query based on WIQL to select only important work items. To migrate all leave this empty. See [WIQL Query Bits](#wiql-query-bits) SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [[System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc - + **beta** If enabled this will fix any image attachments URL's, work item mention URL's or user mentions in the HTML fields as well as discussion comments. You must specify a PersonalAccessToken in the Source project for Azure DevOps; @@ -250,68 +250,68 @@ ? - + **beta** If set to a number greater than 0 work items that fail to save will retry after a number of seconds equal to the retry count. This allows for periodic network glitches not to end the process. 5 - + This loads all of the work items already saved to the Target and removes them from the Source work item list prior to commencing the run. While this may take some time in large data sets it reduces the time of the overall migration significantly if you need to restart. true - + Pause after each work item is migrated false - + This will create a json file with the revision history and attach it to the work item. Best used with `MaxRevisions` or `ReplayRevisions`. ? - + If enabled, adds a comment recording the migration false - + A list of work items to import [] - + The maximum number of failures to tolerate before the migration fails. When set above zero, a work item migration error is logged but the migration will continue until the number of failed items reaches the configured value, after which the migration fails. 0 - + This will skip a revision if the source iteration has not been migrated i.e. it was deleted - + When set to true, this setting will skip a revision if the source area has not been migrated, has been deleted or is somehow invalid, etc. - + This processor allows you to make changes in place where we load from teh Target and update the Target. This is used for bulk updates with the most common reason being a process template change. WorkItem - + The `WorkItemDelete` processor allows you to delete any amount of work items that meet the query. **DANGER:** This is not a recoverable action and should be use with extream caution. @@ -319,7 +319,7 @@ ready WorkItem - + Reapply field mappings after a migration. Does not migtate Work Items, only reapplied changes to filed mappings. @@ -358,44 +358,44 @@ 5 - + A common issue with older *TFS/Azure DevOps* instances is the proliferation of `Area Paths`. With the use of `Area Path` for `Teams` and the addition of the `Node Name` column option these extensive tag hierarchies should instad be moved to tags. Beta Work Item - + This is a required parameter. That define the root path of the iteration. To get the full path use `\` \ - + The tag name that is present on all elements that must be migrated. If this option isn't present this processor will migrate all. `String.Empty` - + Filtering conditions to decide whether to migrate a test plan or not. When provided, this partial query is added after `Select * From TestPlan Where` when selecting test plans. Among filtering options, `AreaPath`, `PlanName` and `PlanState` are known to work. There is unfortunately no documentation regarding the available fields. `String.Empty` - + ??Not sure what this does. Check code. false - + ??Not sure what this does. Check code. 0 - + Indicates whether the configuration for node structure transformation should be taken from the common enricher configs. Otherwise the configuration elements below are used @@ -404,7 +404,7 @@ Remove Invalid Links, see https://github.com/nkdAgility/azure-devops-migration-tools/issues/178 - + diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/CreateTeamFoldersProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/CreateTeamFoldersProcessor.cs index 067b10a32..a394b9109 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/CreateTeamFoldersProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/CreateTeamFoldersProcessor.cs @@ -23,9 +23,9 @@ namespace MigrationTools.Processors /// /// alpha /// Shared Queries - public class CreateTeamFolders : TfsProcessor + public class TfsCreateTeamFoldersProcessor : TfsProcessor { - public CreateTeamFolders(IOptions options, TfsCommonTools tfsCommonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsCommonTools, processorEnrichers, services, telemetry, logger) + public TfsCreateTeamFoldersProcessor(IOptions options, TfsCommonTools tfsCommonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsCommonTools, processorEnrichers, services, telemetry, logger) { } diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/EmptyProcessorOptions.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/EmptyProcessorOptions.cs index 4767c7b32..c6d12eb69 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/EmptyProcessorOptions.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/EmptyProcessorOptions.cs @@ -7,7 +7,7 @@ namespace MigrationTools.Processors { - public class EmptyProcessorOptions : ProcessorOptions + public class TfsEmptyProcessorOptions : ProcessorOptions { } diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportProfilePictureFromADProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportProfilePictureFromADProcessor.cs index cfcec0ff9..695346948 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportProfilePictureFromADProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportProfilePictureFromADProcessor.cs @@ -26,17 +26,17 @@ namespace MigrationTools.Processors /// /// alpha /// Profiles - public class ExportProfilePictureFromADProcessor : Processor + public class TfsExportProfilePictureFromADProcessor : Processor { private IIdentityManagementService2 ims2; - public ExportProfilePictureFromADProcessor(IOptions options, CommonTools commonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, commonTools, processorEnrichers, services, telemetry, logger) + public TfsExportProfilePictureFromADProcessor(IOptions options, CommonTools commonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, commonTools, processorEnrichers, services, telemetry, logger) { //http://www.codeproject.com/Articles/18102/Howto-Almost-Everything-In-Active-Directory-via-C ims2 = Target.GetService(); } - new ExportProfilePictureFromADProcessorOptions Options => (ExportProfilePictureFromADProcessorOptions)base.Options; + new TfsExportProfilePictureFromADProcessorOptions Options => (TfsExportProfilePictureFromADProcessorOptions)base.Options; new TfsTeamProjectEndpoint Source => (TfsTeamProjectEndpoint)base.Source; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportProfilePictureFromADProcessorOptions.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportProfilePictureFromADProcessorOptions.cs index 448ae05f2..f8ae78c48 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportProfilePictureFromADProcessorOptions.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportProfilePictureFromADProcessorOptions.cs @@ -5,7 +5,7 @@ namespace MigrationTools.Processors { - public class ExportProfilePictureFromADProcessorOptions : ProcessorOptions + public class TfsExportProfilePictureFromADProcessorOptions : ProcessorOptions { diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportTeamListProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportTeamListProcessor.cs index b8173c174..f60b001a2 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportTeamListProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportTeamListProcessor.cs @@ -17,9 +17,9 @@ namespace MigrationTools.Processors { - public class ExportTeamListProcessor : TfsProcessor + public class TfsExportTeamListProcessor : TfsProcessor { - public ExportTeamListProcessor(IOptions options, TfsCommonTools tfsCommonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsCommonTools, processorEnrichers, services, telemetry, logger) + public TfsExportTeamListProcessor(IOptions options, TfsCommonTools tfsCommonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsCommonTools, processorEnrichers, services, telemetry, logger) { } diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportUsersForMappingProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportUsersForMappingProcessor.cs index a46219305..89f5c576f 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportUsersForMappingProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportUsersForMappingProcessor.cs @@ -27,14 +27,14 @@ namespace MigrationTools.Processors /// /// ready /// Work Items - public class ExportUsersForMappingProcessor : TfsProcessor + public class TfsExportUsersForMappingProcessor : TfsProcessor { - public ExportUsersForMappingProcessor(IOptions options, TfsCommonTools tfsCommonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsCommonTools, processorEnrichers, services, telemetry, logger) + public TfsExportUsersForMappingProcessor(IOptions options, TfsCommonTools tfsCommonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsCommonTools, processorEnrichers, services, telemetry, logger) { } - new ExportUsersForMappingProcessorOptions Options => (ExportUsersForMappingProcessorOptions)base.Options; + new TfsExportUsersForMappingProcessorOptions Options => (TfsExportUsersForMappingProcessorOptions)base.Options; new TfsTeamProjectEndpoint Source => (TfsTeamProjectEndpoint)base.Source; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportUsersForMappingProcessorOptions.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportUsersForMappingProcessorOptions.cs index 940921e4b..b78bb157c 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportUsersForMappingProcessorOptions.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportUsersForMappingProcessorOptions.cs @@ -5,7 +5,7 @@ namespace MigrationTools.Processors { - public class ExportUsersForMappingProcessorOptions : ProcessorOptions + public class TfsExportUsersForMappingProcessorOptions : ProcessorOptions { public string WIQLQuery { get; set; } diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/FakeProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/FakeProcessor.cs index 41c34c26b..ea315cb33 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/FakeProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/FakeProcessor.cs @@ -16,9 +16,9 @@ namespace MigrationTools.Processors /// /// Note: this is only for internal usage. Don't use this in your configurations. /// - public class FakeProcessor : TfsProcessor + public class TfsFakeProcessor : TfsProcessor { - public FakeProcessor(IOptions options, TfsCommonTools tfsCommonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsCommonTools, processorEnrichers, services, telemetry, logger) + public TfsFakeProcessor(IOptions options, TfsCommonTools tfsCommonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsCommonTools, processorEnrichers, services, telemetry, logger) { } diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/ImportProfilePictureProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/ImportProfilePictureProcessor.cs index 0ec77a5a2..5785c6e58 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/ImportProfilePictureProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/ImportProfilePictureProcessor.cs @@ -25,17 +25,17 @@ namespace MigrationTools.Processors /// /// alpha /// Profiles - public class ImportProfilePictureProcessor : TfsProcessor + public class TfsImportProfilePictureProcessor : TfsProcessor { private readonly IIdentityManagementService2 ims2; - public ImportProfilePictureProcessor(IOptions options, TfsCommonTools tfsCommonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsCommonTools, processorEnrichers, services, telemetry, logger) + public TfsImportProfilePictureProcessor(IOptions options, TfsCommonTools tfsCommonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsCommonTools, processorEnrichers, services, telemetry, logger) { //http://www.codeproject.com/Articles/18102/Howto-Almost-Everything-In-Active-Directory-via-C ims2 = (IIdentityManagementService2)Target.GetService(); } - new ImportProfilePictureProcessorOptions Options => (ImportProfilePictureProcessorOptions)base.Options; + new TfsImportProfilePictureProcessorOptions Options => (TfsImportProfilePictureProcessorOptions)base.Options; new TfsTeamProjectEndpoint Source => (TfsTeamProjectEndpoint)base.Source; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/ImportProfilePictureProcessorOptions.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/ImportProfilePictureProcessorOptions.cs index 593111ac3..485de50f5 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/ImportProfilePictureProcessorOptions.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/ImportProfilePictureProcessorOptions.cs @@ -5,7 +5,7 @@ namespace MigrationTools.Processors { - public class ImportProfilePictureProcessorOptions : ProcessorOptions + public class TfsImportProfilePictureProcessorOptions : ProcessorOptions { } diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TestConfigurationsMigrationProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TestConfigurationsMigrationProcessor.cs index aad6f8ae1..eb4567988 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/TestConfigurationsMigrationProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/TestConfigurationsMigrationProcessor.cs @@ -17,16 +17,16 @@ namespace MigrationTools.Processors /// /// Beta /// Suites & Plans - public class TestConfigurationsMigrationProcessor : TfsProcessor + public class TfsTestConfigurationsMigrationProcessor : TfsProcessor { - public TestConfigurationsMigrationProcessor(IOptions options, TfsCommonTools tfsCommonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsCommonTools, processorEnrichers, services, telemetry, logger) + public TfsTestConfigurationsMigrationProcessor(IOptions options, TfsCommonTools tfsCommonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsCommonTools, processorEnrichers, services, telemetry, logger) { } // http://blogs.microsoft.co.il/shair/2015/02/02/tfs-api-part-56-test-configurations/ - new TestConfigurationsMigrationProcessorOptions Options => (TestConfigurationsMigrationProcessorOptions)base.Options; + new TfsTestConfigurationsMigrationProcessorOptions Options => (TfsTestConfigurationsMigrationProcessorOptions)base.Options; new TfsTeamProjectEndpoint Source => (TfsTeamProjectEndpoint)base.Source; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TestConfigurationsMigrationProcessorOptions.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TestConfigurationsMigrationProcessorOptions.cs index 72a620eea..e8888946c 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/TestConfigurationsMigrationProcessorOptions.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/TestConfigurationsMigrationProcessorOptions.cs @@ -5,7 +5,7 @@ namespace MigrationTools.Processors { - public class TestConfigurationsMigrationProcessorOptions : ProcessorOptions + public class TfsTestConfigurationsMigrationProcessorOptions : ProcessorOptions { } diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TestPlansAndSuitesMigrationProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TestPlansAndSuitesMigrationProcessor.cs index 8225c6281..d1600d3bf 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/TestPlansAndSuitesMigrationProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/TestPlansAndSuitesMigrationProcessor.cs @@ -36,7 +36,7 @@ namespace MigrationTools.Processors /// /// Beta /// Suites & Plans - public class TestPlansAndSuitesMigrationProcessor : TfsProcessor + public class TfsTestPlansAndSuitesMigrationProcessor : TfsProcessor { private int __currentSuite = 0; private int __totalSuites = 0; @@ -57,12 +57,12 @@ public class TestPlansAndSuitesMigrationProcessor : TfsProcessor private static readonly Counter _testSuitesCounter = _meter.CreateCounter("test_suites_count"); private static readonly Counter _testCasesCounter = _meter.CreateCounter("test_cases_count"); - public TestPlansAndSuitesMigrationProcessor(IOptions options, TfsCommonTools tfsCommonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsCommonTools, processorEnrichers, services, telemetry, logger) + public TfsTestPlansAndSuitesMigrationProcessor(IOptions options, TfsCommonTools tfsCommonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsCommonTools, processorEnrichers, services, telemetry, logger) { } - new TestPlansAndSuitesMigrationProcessorOptions Options => (TestPlansAndSuitesMigrationProcessorOptions)base.Options; + new TfsTestPlansAndSuitesMigrationProcessorOptions Options => (TfsTestPlansAndSuitesMigrationProcessorOptions)base.Options; new TfsTeamProjectEndpoint Source => (TfsTeamProjectEndpoint)base.Source; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TestPlansAndSuitesMigrationProcessorOptions.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TestPlansAndSuitesMigrationProcessorOptions.cs index 7c06075e8..0be09af58 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/TestPlansAndSuitesMigrationProcessorOptions.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/TestPlansAndSuitesMigrationProcessorOptions.cs @@ -5,7 +5,7 @@ namespace MigrationTools._EngineV1.Configuration.Processing { - public class TestPlansAndSuitesMigrationProcessorOptions : ProcessorOptions + public class TfsTestPlansAndSuitesMigrationProcessorOptions : ProcessorOptions { /// /// The tag name that is present on all elements that must be migrated. If this option isn't present this processor will migrate all. @@ -49,7 +49,7 @@ public bool IsProcessorCompatible(IReadOnlyList otherProcessor return true; } - public TestPlansAndSuitesMigrationProcessorOptions() + public TfsTestPlansAndSuitesMigrationProcessorOptions() { MigrationDelay = 0; RemoveAllLinks = false; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TestVariablesMigrationProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TestVariablesMigrationProcessor.cs index ced183087..ff1cfffb5 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/TestVariablesMigrationProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/TestVariablesMigrationProcessor.cs @@ -20,13 +20,13 @@ namespace MigrationTools.Processors /// /// Beta /// Suites & Plans - public class TestVariablesMigrationProcessor : Processor + public class TfsTestVariablesMigrationProcessor : Processor { - public TestVariablesMigrationProcessor(IOptions options, CommonTools commonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, commonTools, processorEnrichers, services, telemetry, logger) + public TfsTestVariablesMigrationProcessor(IOptions options, CommonTools commonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, commonTools, processorEnrichers, services, telemetry, logger) { } - new TestVariablesMigrationProcessorOptions Options => (TestVariablesMigrationProcessorOptions)base.Options; + new TfsTestVariablesMigrationProcessorOptions Options => (TfsTestVariablesMigrationProcessorOptions)base.Options; new TfsTeamProjectEndpoint Source => (TfsTeamProjectEndpoint)base.Source; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TestVariablesMigrationProcessorOptions.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TestVariablesMigrationProcessorOptions.cs index 1156ff32e..991a1cfc5 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/TestVariablesMigrationProcessorOptions.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/TestVariablesMigrationProcessorOptions.cs @@ -5,7 +5,7 @@ namespace MigrationTools.Processors { - public class TestVariablesMigrationProcessorOptions : ProcessorOptions + public class TfsTestVariablesMigrationProcessorOptions : ProcessorOptions { /// public bool Enabled { get; set; } diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessor.cs index da2ce389b..acfb56a2f 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessor.cs @@ -60,12 +60,12 @@ public class TfsWorkItemMigrationProcessor : TfsProcessor private ILogger workItemLog; private List _itemsInError; - public TfsWorkItemMigrationProcessor(IOptions options, TfsCommonTools tfsCommonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsCommonTools, processorEnrichers, services, telemetry, logger) + public TfsWorkItemMigrationProcessor(IOptions options, TfsCommonTools tfsCommonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsCommonTools, processorEnrichers, services, telemetry, logger) { contextLog = Serilog.Log.ForContext(); } - new TfsWorkItemMigrationProcessorOptions Options => (TfsWorkItemMigrationProcessorOptions)base.Options; + new TfsWorkItemOverwriteProcessorOptions Options => (TfsWorkItemOverwriteProcessorOptions)base.Options; new TfsTeamProjectEndpoint Source => (TfsTeamProjectEndpoint)base.Source; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessorOptions.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessorOptions.cs index e20be9559..9a0ac5789 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessorOptions.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessorOptions.cs @@ -8,7 +8,7 @@ namespace MigrationTools.Processors { - public class TfsWorkItemMigrationProcessorOptions : ProcessorOptions, IWorkItemProcessorConfig + public class TfsWorkItemOverwriteProcessorOptions : ProcessorOptions, IWorkItemProcessorConfig { diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemBulkEditProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemBulkEditProcessor.cs index d7b10976d..1684e2cbf 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemBulkEditProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemBulkEditProcessor.cs @@ -19,10 +19,10 @@ namespace MigrationTools.Processors /// This processor allows you to make changes in place where we load from teh Target and update the Target. This is used for bulk updates with the most common reason being a process template change. /// /// WorkItem - public class WorkItemBulkEditProcessor : TfsProcessor + public class TfsWorkItemBulkEditProcessor : TfsProcessor { - public WorkItemBulkEditProcessor(IOptions options, TfsCommonTools tfsCommonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsCommonTools, processorEnrichers, services, telemetry, logger) + public TfsWorkItemBulkEditProcessor(IOptions options, TfsCommonTools tfsCommonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsCommonTools, processorEnrichers, services, telemetry, logger) { } diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemDeleteProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemDeleteProcessor.cs index 2b34e2415..efdcce57a 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemDeleteProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemDeleteProcessor.cs @@ -23,14 +23,14 @@ namespace MigrationTools.Processors /// /// ready /// WorkItem - public class WorkItemDeleteProcessor : TfsProcessor + public class TfsWorkItemDeleteProcessor : TfsProcessor { - public WorkItemDeleteProcessor(IOptions options, TfsCommonTools tfsCommonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsCommonTools, processorEnrichers, services, telemetry, logger) + public TfsWorkItemDeleteProcessor(IOptions options, TfsCommonTools tfsCommonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsCommonTools, processorEnrichers, services, telemetry, logger) { } - new WorkItemDeleteProcessorOptions Options => (WorkItemDeleteProcessorOptions)base.Options; + new TfsWorkItemDeleteProcessorOptions Options => (TfsWorkItemDeleteProcessorOptions)base.Options; new TfsTeamProjectEndpoint Source => (TfsTeamProjectEndpoint)base.Source; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemDeleteProcessorOptions.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemDeleteProcessorOptions.cs index 9c785e61d..5f82e1e53 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemDeleteProcessorOptions.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemDeleteProcessorOptions.cs @@ -6,11 +6,11 @@ namespace MigrationTools.Processors { - public class WorkItemDeleteProcessorOptions : ProcessorOptions, IWorkItemProcessorConfig + public class TfsWorkItemDeleteProcessorOptions : ProcessorOptions, IWorkItemProcessorConfig { - public WorkItemDeleteProcessorOptions() + public TfsWorkItemDeleteProcessorOptions() { Enabled = false; WIQLQuery = @"SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc"; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemPostProcessingProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemPostProcessingProcessor.cs index d37d06881..1e25e932d 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemPostProcessingProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemPostProcessingProcessor.cs @@ -24,9 +24,9 @@ namespace MigrationTools.Processors /// /// preview /// Work Items - public class WorkItemPostProcessingProcessor : TfsProcessor + public class TfsWorkItemOverwriteProcessor : TfsProcessor { - public WorkItemPostProcessingProcessor(IOptions options, TfsCommonTools tfsStaticTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsStaticTools, processorEnrichers, services, telemetry, logger) + public TfsWorkItemOverwriteProcessor(IOptions options, TfsCommonTools tfsStaticTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsStaticTools, processorEnrichers, services, telemetry, logger) { } diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemUpdateAreasAsTagsProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemUpdateAreasAsTagsProcessor.cs index c06c3cb64..c1a1443e3 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemUpdateAreasAsTagsProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemUpdateAreasAsTagsProcessor.cs @@ -22,16 +22,16 @@ namespace MigrationTools.Processors /// /// Beta /// Work Item - public class WorkItemUpdateAreasAsTagsProcessor : TfsProcessor + public class TfsWorkItemOverwriteAreasAsTagsProcessor : TfsProcessor { - private WorkItemUpdateAreasAsTagsProcessorOptions _config; + private TfsWorkItemOverwriteAreasAsTagsProcessorOptions _config; - public WorkItemUpdateAreasAsTagsProcessor(IOptions options, TfsCommonTools tfsStaticTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsStaticTools, processorEnrichers, services, telemetry, logger) + public TfsWorkItemOverwriteAreasAsTagsProcessor(IOptions options, TfsCommonTools tfsStaticTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsStaticTools, processorEnrichers, services, telemetry, logger) { } - new WorkItemUpdateAreasAsTagsProcessorOptions Options => (WorkItemUpdateAreasAsTagsProcessorOptions)base.Options; + new TfsWorkItemOverwriteAreasAsTagsProcessorOptions Options => (TfsWorkItemOverwriteAreasAsTagsProcessorOptions)base.Options; new TfsTeamProjectEndpoint Source => (TfsTeamProjectEndpoint)base.Source; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemUpdateAreasAsTagsProcessorOptions.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemUpdateAreasAsTagsProcessorOptions.cs index 14851cae4..afed404a2 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemUpdateAreasAsTagsProcessorOptions.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemUpdateAreasAsTagsProcessorOptions.cs @@ -7,7 +7,7 @@ namespace MigrationTools.Processors { - public class WorkItemUpdateAreasAsTagsProcessorOptions : ProcessorOptions + public class TfsWorkItemOverwriteAreasAsTagsProcessorOptions : ProcessorOptions { /// diff --git a/src/MigrationTools.Clients.TfsObjectModel/ServiceCollectionExtensions.cs b/src/MigrationTools.Clients.TfsObjectModel/ServiceCollectionExtensions.cs index 73e0f3aa2..e5c2eec37 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/ServiceCollectionExtensions.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/ServiceCollectionExtensions.cs @@ -36,18 +36,18 @@ public static void AddMigrationToolServicesForClientTfs_Tools(this IServiceColle public static void AddMigrationToolServicesForClientLegacyCore(this IServiceCollection context) { context.AddSingleton(); - context.AddSingleton(); - context.AddSingleton(); - context.AddSingleton(); - context.AddSingleton(); - context.AddSingleton(); - context.AddSingleton(); - context.AddSingleton(); - context.AddSingleton(); - context.AddSingleton(); - context.AddSingleton(); - context.AddSingleton(); - context.AddSingleton(); + context.AddSingleton(); + context.AddSingleton(); + context.AddSingleton(); + context.AddSingleton(); + context.AddSingleton(); + context.AddSingleton(); + context.AddSingleton(); + context.AddSingleton(); + context.AddSingleton(); + context.AddSingleton(); + context.AddSingleton(); + context.AddSingleton(); } diff --git a/src/MigrationTools.Host/Commands/UpgradeConfigCommand.cs b/src/MigrationTools.Host/Commands/UpgradeConfigCommand.cs index 19b6841bc..58dc67c61 100644 --- a/src/MigrationTools.Host/Commands/UpgradeConfigCommand.cs +++ b/src/MigrationTools.Host/Commands/UpgradeConfigCommand.cs @@ -66,6 +66,32 @@ internal override async Task ExecuteInternalAsync(CommandContext context, U classNameChangeLog.Add("TfsTeamProjectConfig", "TfsTeamProjectEndpoint"); classNameChangeLog.Add("WorkItemGitRepoMappingTool", "TfsGitRepositoryTool"); classNameChangeLog.Add("WorkItemFieldMappingTool", "FieldMappingTool"); + classNameChangeLog.Add("CreateTeamFolders", "TfsCreateTeamFoldersProcessor"); + classNameChangeLog.Add("ExportProfilePicture", "TfsExportProfilePictureFromADProcessor"); + classNameChangeLog.Add("ExportProfilePictureFromAD", "TfsExportProfilePictureFromADProcessor"); + classNameChangeLog.Add("ImportProfilePicture", "TfsImportProfilePictureProcessor"); + classNameChangeLog.Add("ImportProfilePictureFromAD", "TfsImportProfilePictureProcessor"); + classNameChangeLog.Add("ExportUsersForMapping", "TfsExportUsersForMappingProcessor"); + classNameChangeLog.Add("ExportUsersForMappingContext", "TfsExportUsersForMappingProcessor"); + classNameChangeLog.Add("ExportTeamListProcessor", "TfsExportTeamListProcessor"); + classNameChangeLog.Add("ExportTeamList", "TfsExportTeamListProcessor"); + classNameChangeLog.Add("ExportUsersForMappingProcessor", "TfsExportUsersForMappingProcessor"); + classNameChangeLog.Add("ExportUsersForMapping", "TfsExportUsersForMappingProcessor"); + classNameChangeLog.Add("TestConfigurationsMigrationProcessor", "TfsTestConfigurationsMigrationProcessor"); + classNameChangeLog.Add("TestConfigurationsMigrationContext", "TfsTestConfigurationsMigrationProcessor"); + classNameChangeLog.Add("TestPlansAndSuitesMigrationProcessor", "TfsTestPlansAndSuitesMigrationProcessor"); + classNameChangeLog.Add("TestPlansAndSuitesMigrationContext", "TfsTestPlansAndSuitesMigrationProcessor"); + classNameChangeLog.Add("TestVariablesMigrationProcessor", "TfsTestVariablesMigrationProcessor"); + classNameChangeLog.Add("TestVariablesMigrationContext", "TfsTestVariablesMigrationProcessor"); + classNameChangeLog.Add("WorkItemBulkEditProcessor", "TfsWorkItemBulkEditProcessor"); + classNameChangeLog.Add("WorkItemUpdate", "TfsWorkItemBulkEditProcessor"); + classNameChangeLog.Add("WorkItemDelete", "TfsWorkItemDeleteProcessor"); + classNameChangeLog.Add("WorkItemDeleteProcessor", "TfsWorkItemDeleteProcessor"); + classNameChangeLog.Add("WorkItemPostProcessingContext", "TfsWorkItemOverwriteProcessor"); + classNameChangeLog.Add("WorkItemPostProcessingProcessor", "TfsWorkItemOverwriteProcessor"); + + classNameChangeLog.Add("WorkItemUpdateAreasAsTagsContext", "TfsWorkItemOverwriteProcessor"); + classNameChangeLog.Add("WorkItemUpdateAreasAsTagsProcessor", "TfsWorkItemOverwriteProcessor"); OptionsConfiguration optionsBuilder = Services.GetService(); From 5b2d772cb4668684ea0130f673ea27ef972f7c5f Mon Sep 17 00:00:00 2001 From: "Martin Hinshelwood nkdAgility.com" Date: Tue, 3 Sep 2024 15:09:22 +0100 Subject: [PATCH 05/11] Rename processor files to match class. --- ...teTeamFoldersProcessor.cs => TfsCreateTeamFoldersProcessor.cs} | 0 .../{EmptyProcessorOptions.cs => TfsEmptyProcessorOptions.cs} | 0 ...omADProcessor.cs => TfsExportProfilePictureFromADProcessor.cs} | 0 ...ptions.cs => TfsExportProfilePictureFromADProcessorOptions.cs} | 0 .../{ExportTeamListProcessor.cs => TfsExportTeamListProcessor.cs} | 0 ...orMappingProcessor.cs => TfsExportUsersForMappingProcessor.cs} | 0 ...ssorOptions.cs => TfsExportUsersForMappingProcessorOptions.cs} | 0 .../Processors/{FakeProcessor.cs => TfsFakeProcessor.cs} | 0 ...ilePictureProcessor.cs => TfsImportProfilePictureProcessor.cs} | 0 ...essorOptions.cs => TfsImportProfilePictureProcessorOptions.cs} | 0 ...ionProcessor.cs => TfsTestConfigurationsMigrationProcessor.cs} | 0 ...tions.cs => TfsTestConfigurationsMigrationProcessorOptions.cs} | 0 ...ionProcessor.cs => TfsTestPlansAndSuitesMigrationProcessor.cs} | 0 ...tions.cs => TfsTestPlansAndSuitesMigrationProcessorOptions.cs} | 0 ...igrationProcessor.cs => TfsTestVariablesMigrationProcessor.cs} | 0 ...sorOptions.cs => TfsTestVariablesMigrationProcessorOptions.cs} | 0 ...rkItemBulkEditProcessor.cs => TfsWorkItemBulkEditProcessor.cs} | 0 ...ProcessorOptions.cs => TfsWorkItemBulkEditProcessorOptions.cs} | 0 .../{WorkItemDeleteProcessor.cs => TfsWorkItemDeleteProcessor.cs} | 0 ...teProcessorOptions.cs => TfsWorkItemDeleteProcessorOptions.cs} | 0 ...gsProcessor.cs => TfsWorkItemOverwriteAreasAsTagsProcessor.cs} | 0 ...ions.cs => TfsWorkItemOverwriteAreasAsTagsProcessorOptions.cs} | 0 ...ostProcessingProcessor.cs => TfsWorkItemOverwriteProcessor.cs} | 0 ...rocessorOptions.cs => TfsWorkItemOverwriteProcessorOptions.cs} | 0 24 files changed, 0 insertions(+), 0 deletions(-) rename src/MigrationTools.Clients.TfsObjectModel/Processors/{CreateTeamFoldersProcessor.cs => TfsCreateTeamFoldersProcessor.cs} (100%) rename src/MigrationTools.Clients.TfsObjectModel/Processors/{EmptyProcessorOptions.cs => TfsEmptyProcessorOptions.cs} (100%) rename src/MigrationTools.Clients.TfsObjectModel/Processors/{ExportProfilePictureFromADProcessor.cs => TfsExportProfilePictureFromADProcessor.cs} (100%) rename src/MigrationTools.Clients.TfsObjectModel/Processors/{ExportProfilePictureFromADProcessorOptions.cs => TfsExportProfilePictureFromADProcessorOptions.cs} (100%) rename src/MigrationTools.Clients.TfsObjectModel/Processors/{ExportTeamListProcessor.cs => TfsExportTeamListProcessor.cs} (100%) rename src/MigrationTools.Clients.TfsObjectModel/Processors/{ExportUsersForMappingProcessor.cs => TfsExportUsersForMappingProcessor.cs} (100%) rename src/MigrationTools.Clients.TfsObjectModel/Processors/{ExportUsersForMappingProcessorOptions.cs => TfsExportUsersForMappingProcessorOptions.cs} (100%) rename src/MigrationTools.Clients.TfsObjectModel/Processors/{FakeProcessor.cs => TfsFakeProcessor.cs} (100%) rename src/MigrationTools.Clients.TfsObjectModel/Processors/{ImportProfilePictureProcessor.cs => TfsImportProfilePictureProcessor.cs} (100%) rename src/MigrationTools.Clients.TfsObjectModel/Processors/{ImportProfilePictureProcessorOptions.cs => TfsImportProfilePictureProcessorOptions.cs} (100%) rename src/MigrationTools.Clients.TfsObjectModel/Processors/{TestConfigurationsMigrationProcessor.cs => TfsTestConfigurationsMigrationProcessor.cs} (100%) rename src/MigrationTools.Clients.TfsObjectModel/Processors/{TestConfigurationsMigrationProcessorOptions.cs => TfsTestConfigurationsMigrationProcessorOptions.cs} (100%) rename src/MigrationTools.Clients.TfsObjectModel/Processors/{TestPlansAndSuitesMigrationProcessor.cs => TfsTestPlansAndSuitesMigrationProcessor.cs} (100%) rename src/MigrationTools.Clients.TfsObjectModel/Processors/{TestPlansAndSuitesMigrationProcessorOptions.cs => TfsTestPlansAndSuitesMigrationProcessorOptions.cs} (100%) rename src/MigrationTools.Clients.TfsObjectModel/Processors/{TestVariablesMigrationProcessor.cs => TfsTestVariablesMigrationProcessor.cs} (100%) rename src/MigrationTools.Clients.TfsObjectModel/Processors/{TestVariablesMigrationProcessorOptions.cs => TfsTestVariablesMigrationProcessorOptions.cs} (100%) rename src/MigrationTools.Clients.TfsObjectModel/Processors/{WorkItemBulkEditProcessor.cs => TfsWorkItemBulkEditProcessor.cs} (100%) rename src/MigrationTools.Clients.TfsObjectModel/Processors/{WorkItemBulkEditProcessorOptions.cs => TfsWorkItemBulkEditProcessorOptions.cs} (100%) rename src/MigrationTools.Clients.TfsObjectModel/Processors/{WorkItemDeleteProcessor.cs => TfsWorkItemDeleteProcessor.cs} (100%) rename src/MigrationTools.Clients.TfsObjectModel/Processors/{WorkItemDeleteProcessorOptions.cs => TfsWorkItemDeleteProcessorOptions.cs} (100%) rename src/MigrationTools.Clients.TfsObjectModel/Processors/{WorkItemUpdateAreasAsTagsProcessor.cs => TfsWorkItemOverwriteAreasAsTagsProcessor.cs} (100%) rename src/MigrationTools.Clients.TfsObjectModel/Processors/{WorkItemUpdateAreasAsTagsProcessorOptions.cs => TfsWorkItemOverwriteAreasAsTagsProcessorOptions.cs} (100%) rename src/MigrationTools.Clients.TfsObjectModel/Processors/{WorkItemPostProcessingProcessor.cs => TfsWorkItemOverwriteProcessor.cs} (100%) rename src/MigrationTools.Clients.TfsObjectModel/Processors/{WorkItemPostProcessingProcessorOptions.cs => TfsWorkItemOverwriteProcessorOptions.cs} (100%) diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/CreateTeamFoldersProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsCreateTeamFoldersProcessor.cs similarity index 100% rename from src/MigrationTools.Clients.TfsObjectModel/Processors/CreateTeamFoldersProcessor.cs rename to src/MigrationTools.Clients.TfsObjectModel/Processors/TfsCreateTeamFoldersProcessor.cs diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/EmptyProcessorOptions.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsEmptyProcessorOptions.cs similarity index 100% rename from src/MigrationTools.Clients.TfsObjectModel/Processors/EmptyProcessorOptions.cs rename to src/MigrationTools.Clients.TfsObjectModel/Processors/TfsEmptyProcessorOptions.cs diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportProfilePictureFromADProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsExportProfilePictureFromADProcessor.cs similarity index 100% rename from src/MigrationTools.Clients.TfsObjectModel/Processors/ExportProfilePictureFromADProcessor.cs rename to src/MigrationTools.Clients.TfsObjectModel/Processors/TfsExportProfilePictureFromADProcessor.cs diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportProfilePictureFromADProcessorOptions.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsExportProfilePictureFromADProcessorOptions.cs similarity index 100% rename from src/MigrationTools.Clients.TfsObjectModel/Processors/ExportProfilePictureFromADProcessorOptions.cs rename to src/MigrationTools.Clients.TfsObjectModel/Processors/TfsExportProfilePictureFromADProcessorOptions.cs diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportTeamListProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsExportTeamListProcessor.cs similarity index 100% rename from src/MigrationTools.Clients.TfsObjectModel/Processors/ExportTeamListProcessor.cs rename to src/MigrationTools.Clients.TfsObjectModel/Processors/TfsExportTeamListProcessor.cs diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportUsersForMappingProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsExportUsersForMappingProcessor.cs similarity index 100% rename from src/MigrationTools.Clients.TfsObjectModel/Processors/ExportUsersForMappingProcessor.cs rename to src/MigrationTools.Clients.TfsObjectModel/Processors/TfsExportUsersForMappingProcessor.cs diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/ExportUsersForMappingProcessorOptions.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsExportUsersForMappingProcessorOptions.cs similarity index 100% rename from src/MigrationTools.Clients.TfsObjectModel/Processors/ExportUsersForMappingProcessorOptions.cs rename to src/MigrationTools.Clients.TfsObjectModel/Processors/TfsExportUsersForMappingProcessorOptions.cs diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/FakeProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsFakeProcessor.cs similarity index 100% rename from src/MigrationTools.Clients.TfsObjectModel/Processors/FakeProcessor.cs rename to src/MigrationTools.Clients.TfsObjectModel/Processors/TfsFakeProcessor.cs diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/ImportProfilePictureProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsImportProfilePictureProcessor.cs similarity index 100% rename from src/MigrationTools.Clients.TfsObjectModel/Processors/ImportProfilePictureProcessor.cs rename to src/MigrationTools.Clients.TfsObjectModel/Processors/TfsImportProfilePictureProcessor.cs diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/ImportProfilePictureProcessorOptions.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsImportProfilePictureProcessorOptions.cs similarity index 100% rename from src/MigrationTools.Clients.TfsObjectModel/Processors/ImportProfilePictureProcessorOptions.cs rename to src/MigrationTools.Clients.TfsObjectModel/Processors/TfsImportProfilePictureProcessorOptions.cs diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TestConfigurationsMigrationProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestConfigurationsMigrationProcessor.cs similarity index 100% rename from src/MigrationTools.Clients.TfsObjectModel/Processors/TestConfigurationsMigrationProcessor.cs rename to src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestConfigurationsMigrationProcessor.cs diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TestConfigurationsMigrationProcessorOptions.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestConfigurationsMigrationProcessorOptions.cs similarity index 100% rename from src/MigrationTools.Clients.TfsObjectModel/Processors/TestConfigurationsMigrationProcessorOptions.cs rename to src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestConfigurationsMigrationProcessorOptions.cs diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TestPlansAndSuitesMigrationProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestPlansAndSuitesMigrationProcessor.cs similarity index 100% rename from src/MigrationTools.Clients.TfsObjectModel/Processors/TestPlansAndSuitesMigrationProcessor.cs rename to src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestPlansAndSuitesMigrationProcessor.cs diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TestPlansAndSuitesMigrationProcessorOptions.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestPlansAndSuitesMigrationProcessorOptions.cs similarity index 100% rename from src/MigrationTools.Clients.TfsObjectModel/Processors/TestPlansAndSuitesMigrationProcessorOptions.cs rename to src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestPlansAndSuitesMigrationProcessorOptions.cs diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TestVariablesMigrationProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestVariablesMigrationProcessor.cs similarity index 100% rename from src/MigrationTools.Clients.TfsObjectModel/Processors/TestVariablesMigrationProcessor.cs rename to src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestVariablesMigrationProcessor.cs diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TestVariablesMigrationProcessorOptions.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestVariablesMigrationProcessorOptions.cs similarity index 100% rename from src/MigrationTools.Clients.TfsObjectModel/Processors/TestVariablesMigrationProcessorOptions.cs rename to src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestVariablesMigrationProcessorOptions.cs diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemBulkEditProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemBulkEditProcessor.cs similarity index 100% rename from src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemBulkEditProcessor.cs rename to src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemBulkEditProcessor.cs diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemBulkEditProcessorOptions.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemBulkEditProcessorOptions.cs similarity index 100% rename from src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemBulkEditProcessorOptions.cs rename to src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemBulkEditProcessorOptions.cs diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemDeleteProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemDeleteProcessor.cs similarity index 100% rename from src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemDeleteProcessor.cs rename to src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemDeleteProcessor.cs diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemDeleteProcessorOptions.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemDeleteProcessorOptions.cs similarity index 100% rename from src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemDeleteProcessorOptions.cs rename to src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemDeleteProcessorOptions.cs diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemUpdateAreasAsTagsProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemOverwriteAreasAsTagsProcessor.cs similarity index 100% rename from src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemUpdateAreasAsTagsProcessor.cs rename to src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemOverwriteAreasAsTagsProcessor.cs diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemUpdateAreasAsTagsProcessorOptions.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemOverwriteAreasAsTagsProcessorOptions.cs similarity index 100% rename from src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemUpdateAreasAsTagsProcessorOptions.cs rename to src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemOverwriteAreasAsTagsProcessorOptions.cs diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemPostProcessingProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemOverwriteProcessor.cs similarity index 100% rename from src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemPostProcessingProcessor.cs rename to src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemOverwriteProcessor.cs diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemPostProcessingProcessorOptions.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemOverwriteProcessorOptions.cs similarity index 100% rename from src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemPostProcessingProcessorOptions.cs rename to src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemOverwriteProcessorOptions.cs From 029d4a0780da70d7858b3a8e525862f026f4ad20 Mon Sep 17 00:00:00 2001 From: "Martin Hinshelwood nkdAgility.com" Date: Tue, 3 Sep 2024 15:10:24 +0100 Subject: [PATCH 06/11] Update with full match --- .../MigrationTools.Clients.TfsObjectModel.xml | 178 +++++++++--------- .../TfsWorkItemBulkEditProcessor.cs | 4 +- .../TfsWorkItemBulkEditProcessorOptions.cs | 4 +- .../TfsWorkItemOverwriteProcessor.cs | 4 +- .../TfsWorkItemOverwriteProcessorOptions.cs | 4 +- .../Commands/UpgradeConfigCommand.cs | 3 +- 6 files changed, 99 insertions(+), 98 deletions(-) diff --git a/docs/Reference/Generated/MigrationTools.Clients.TfsObjectModel.xml b/docs/Reference/Generated/MigrationTools.Clients.TfsObjectModel.xml index b71bddac5..b649fe3d5 100644 --- a/docs/Reference/Generated/MigrationTools.Clients.TfsObjectModel.xml +++ b/docs/Reference/Generated/MigrationTools.Clients.TfsObjectModel.xml @@ -63,74 +63,6 @@ alpha Profiles - - - This processor can migrate `test configuration`. This should be run before `LinkMigrationConfig`. - - Beta - Suites & Plans - - - - Rebuilds Suits and plans for Test Cases migrated using the WorkItemMigration - - Beta - Suites & Plans - - - - Apply configurations to a single test case entry on the target, by copying from the source - - - - - - - Sets default configurations on migrated test suites. - - The test suite to take as a source. - The test suite to apply the default configurations to. - - - - Fix work item ID's in query based suites - - - - - Retrieve the target identity for a given source descriptor - - Source identity Descriptor - Target Identity - - - - Remove invalid links - - - VSTS cannot store some links which have an invalid URI Scheme. You will get errors like "The URL specified has a potentially unsafe URL protocol" - For myself, the issue were urls that pointed to TFVC: "vstfs:///VersionControl/Changeset/19415" - Unfortunately the API does not seem to allow access to the "raw" data, so there's nowhere to retrieve this as far as I can find. - Should take care of https://github.com/nkdAgility/azure-devops-migration-tools/issues/178 - - The plan to remove invalid links drom - - - - This processor can migrate test variables that are defined in the test plans / suites. This must run before `TestPlansAndSuitesMigrationConfig`. - - Beta - Suites & Plans - - - - - - - - - - The TfsSharedQueryProcessor enabled you to migrate queries from one locatio nto another. @@ -212,6 +144,88 @@ List of Teams to process. If this is `null` then all teams will be processed. + + + This processor can migrate `test configuration`. This should be run before `LinkMigrationConfig`. + + Beta + Suites & Plans + + + + Rebuilds Suits and plans for Test Cases migrated using the WorkItemMigration + + Beta + Suites & Plans + + + + Apply configurations to a single test case entry on the target, by copying from the source + + + + + + + Sets default configurations on migrated test suites. + + The test suite to take as a source. + The test suite to apply the default configurations to. + + + + Fix work item ID's in query based suites + + + + + Retrieve the target identity for a given source descriptor + + Source identity Descriptor + Target Identity + + + + Remove invalid links + + + VSTS cannot store some links which have an invalid URI Scheme. You will get errors like "The URL specified has a potentially unsafe URL protocol" + For myself, the issue were urls that pointed to TFVC: "vstfs:///VersionControl/Changeset/19415" + Unfortunately the API does not seem to allow access to the "raw" data, so there's nowhere to retrieve this as far as I can find. + Should take care of https://github.com/nkdAgility/azure-devops-migration-tools/issues/178 + + The plan to remove invalid links drom + + + + This processor can migrate test variables that are defined in the test plans / suites. This must run before `TestPlansAndSuitesMigrationConfig`. + + Beta + Suites & Plans + + + + + + + + + + + + + This processor allows you to make changes in place where we load from teh Target and update the Target. This is used for bulk updates with the most common reason being a process template change. + + WorkItem + + + + The `WorkItemDelete` processor allows you to delete any amount of work items that meet the query. + **DANGER:** This is not a recoverable action and should be use with extream caution. + + ready + WorkItem + WorkItemMigrationConfig is the main processor used to Migrate Work Items, Links, and Attachments. @@ -305,19 +319,18 @@ When set to true, this setting will skip a revision if the source area has not been migrated, has been deleted or is somehow invalid, etc. - + - This processor allows you to make changes in place where we load from teh Target and update the Target. This is used for bulk updates with the most common reason being a process template change. + A common issue with older *TFS/Azure DevOps* instances is the proliferation of `Area Paths`. With the use of `Area Path` for `Teams` and the addition of the `Node Name` column option these extensive tag hierarchies should instad be moved to tags. - WorkItem + Beta + Work Item - + - The `WorkItemDelete` processor allows you to delete any amount of work items that meet the query. - **DANGER:** This is not a recoverable action and should be use with extream caution. + This is a required parameter. That define the root path of the iteration. To get the full path use `\` - ready - WorkItem + \ @@ -358,19 +371,6 @@ 5 - - - A common issue with older *TFS/Azure DevOps* instances is the proliferation of `Area Paths`. With the use of `Area Path` for `Teams` and the addition of the `Node Name` column option these extensive tag hierarchies should instad be moved to tags. - - Beta - Work Item - - - - This is a required parameter. That define the root path of the iteration. To get the full path use `\` - - \ - The tag name that is present on all elements that must be migrated. If this option isn't present this processor will migrate all. diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemBulkEditProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemBulkEditProcessor.cs index 1684e2cbf..cfefa45e6 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemBulkEditProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemBulkEditProcessor.cs @@ -22,11 +22,11 @@ namespace MigrationTools.Processors public class TfsWorkItemBulkEditProcessor : TfsProcessor { - public TfsWorkItemBulkEditProcessor(IOptions options, TfsCommonTools tfsCommonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsCommonTools, processorEnrichers, services, telemetry, logger) + public TfsWorkItemBulkEditProcessor(IOptions options, TfsCommonTools tfsCommonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsCommonTools, processorEnrichers, services, telemetry, logger) { } - new WorkItemBulkEditProcessorOptions Options => (WorkItemBulkEditProcessorOptions)base.Options; + new TfsWorkItemBulkEditProcessorOptions Options => (TfsWorkItemBulkEditProcessorOptions)base.Options; new TfsTeamProjectEndpoint Source => (TfsTeamProjectEndpoint)base.Source; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemBulkEditProcessorOptions.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemBulkEditProcessorOptions.cs index bfa80dfee..936fc0889 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemBulkEditProcessorOptions.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemBulkEditProcessorOptions.cs @@ -6,7 +6,7 @@ namespace MigrationTools._EngineV1.Configuration.Processing { - public class WorkItemBulkEditProcessorOptions : ProcessorOptions, IWorkItemProcessorConfig + public class TfsWorkItemBulkEditProcessorOptions : ProcessorOptions, IWorkItemProcessorConfig { public bool WhatIf { get; set; } @@ -46,7 +46,7 @@ public class WorkItemBulkEditProcessorOptions : ProcessorOptions, IWorkItemProce public int WorkItemCreateRetryLimit { get; set; } - public WorkItemBulkEditProcessorOptions() + public TfsWorkItemBulkEditProcessorOptions() { WIQLQuery = @"SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [@ReflectedWorkItemIdFieldName] = '' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc"; } diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemOverwriteProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemOverwriteProcessor.cs index 1e25e932d..2a4825a24 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemOverwriteProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemOverwriteProcessor.cs @@ -26,11 +26,11 @@ namespace MigrationTools.Processors /// Work Items public class TfsWorkItemOverwriteProcessor : TfsProcessor { - public TfsWorkItemOverwriteProcessor(IOptions options, TfsCommonTools tfsStaticTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsStaticTools, processorEnrichers, services, telemetry, logger) + public TfsWorkItemOverwriteProcessor(IOptions options, TfsCommonTools tfsStaticTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsStaticTools, processorEnrichers, services, telemetry, logger) { } - new WorkItemPostProcessingProcessorOptions Options => (WorkItemPostProcessingProcessorOptions)base.Options; + new TfsWorkItemPostProcessingProcessorOptions Options => (TfsWorkItemPostProcessingProcessorOptions)base.Options; new TfsTeamProjectEndpoint Source => (TfsTeamProjectEndpoint)base.Source; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemOverwriteProcessorOptions.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemOverwriteProcessorOptions.cs index dded2f2b4..e11d57164 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemOverwriteProcessorOptions.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemOverwriteProcessorOptions.cs @@ -7,7 +7,7 @@ namespace MigrationTools.Processors { - public class WorkItemPostProcessingProcessorOptions : ProcessorOptions, IWorkItemProcessorConfig + public class TfsWorkItemPostProcessingProcessorOptions : ProcessorOptions, IWorkItemProcessorConfig { /// @@ -46,7 +46,7 @@ public class WorkItemPostProcessingProcessorOptions : ProcessorOptions, IWorkIte public int WorkItemCreateRetryLimit { get; set; } - public WorkItemPostProcessingProcessorOptions() + public TfsWorkItemPostProcessingProcessorOptions() { WIQLQuery = @"SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [@ReflectedWorkItemIdFieldName] = '' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc"; } diff --git a/src/MigrationTools.Host/Commands/UpgradeConfigCommand.cs b/src/MigrationTools.Host/Commands/UpgradeConfigCommand.cs index 58dc67c61..81112a230 100644 --- a/src/MigrationTools.Host/Commands/UpgradeConfigCommand.cs +++ b/src/MigrationTools.Host/Commands/UpgradeConfigCommand.cs @@ -89,10 +89,11 @@ internal override async Task ExecuteInternalAsync(CommandContext context, U classNameChangeLog.Add("WorkItemDeleteProcessor", "TfsWorkItemDeleteProcessor"); classNameChangeLog.Add("WorkItemPostProcessingContext", "TfsWorkItemOverwriteProcessor"); classNameChangeLog.Add("WorkItemPostProcessingProcessor", "TfsWorkItemOverwriteProcessor"); - classNameChangeLog.Add("WorkItemUpdateAreasAsTagsContext", "TfsWorkItemOverwriteProcessor"); classNameChangeLog.Add("WorkItemUpdateAreasAsTagsProcessor", "TfsWorkItemOverwriteProcessor"); + + OptionsConfiguration optionsBuilder = Services.GetService(); var schemaVersion = VersionOptions.ConfigureOptions.GetMigrationConfigVersion(Configuration); From 9da18171b9a1938f37b1bf62e4ac8a7e63e2706e Mon Sep 17 00:00:00 2001 From: "Martin Hinshelwood nkdAgility.com" Date: Tue, 3 Sep 2024 15:15:23 +0100 Subject: [PATCH 07/11] Update docs gen --- .../MigrationTools.Clients.TfsObjectModel.xml | 20 +- ...erence.endpoints.generictfsendpoint`1.yaml | 12 - .../reference.endpoints.tfsendpoint.yaml | 4 +- ...eference.endpoints.tfsmigrationclient.yaml | 102 ------ ...ence.endpoints.tfsteamprojectendpoint.yaml | 4 +- ...nce.endpoints.tfsteamsettingsendpoint.yaml | 4 +- ...ference.endpoints.tfsworkitemendpoint.yaml | 4 +- ...eference.fieldmaps.fieldvaluetotagmap.yaml | 69 ---- ...eference.processors.createteamfolders.yaml | 12 - ...ce.processors.exportteamlistprocessor.yaml | 12 - .../reference.processors.fakeprocessor.yaml | 12 - ...processors.fixgitcommitlinksprocessor.yaml | 81 ----- ...ssors.keepoutboundlinktargetprocessor.yaml | 2 +- ...sexportprofilepicturefromadprocessor.yaml} | 18 +- ...ors.tfsexportusersformappingprocessor.yaml | 62 ++++ ...ors.tfsimportprofilepictureprocessor.yaml} | 18 +- ...testconfigurationsmigrationprocessor.yaml} | 18 +- ...testplansandsuitesmigrationprocessor.yaml} | 18 +- ...s.tfstestvariablesmigrationprocessor.yaml} | 18 +- ...cessors.tfsworkitembulkeditprocessor.yaml} | 18 +- ...rocessors.tfsworkitemdeleteprocessor.yaml} | 18 +- ...orkitemoverwriteareasastagsprocessor.yaml} | 18 +- ...essors.tfsworkitemoverwriteprocessor.yaml} | 92 ++---- ...processors.workitemmigrationprocessor.yaml | 171 ---------- ...ssors.workitempostprocessingprocessor.yaml | 77 ----- .../reference.tools.gitrepomappingtool.yaml | 37 --- docs/_data/reference.tools.itool.yaml | 12 - ...eference.endpoints.generictfsendpoint`1.md | 34 -- .../reference.endpoints.tfsendpoint.md | 4 +- .../reference.endpoints.tfsmigrationclient.md | 123 -------- ...erence.endpoints.tfsteamprojectendpoint.md | 4 +- ...rence.endpoints.tfsteamsettingsendpoint.md | 4 +- ...reference.endpoints.tfsworkitemendpoint.md | 4 +- .../reference.fieldmaps.fieldvaluetotagmap.md | 91 ------ .../reference.processors.createteamfolders.md | 34 -- ...ence.processors.exportteamlistprocessor.md | 34 -- ...ocessors.exportusersformappingprocessor.md | 202 ------------ .../reference.processors.fakeprocessor.md | 34 -- ...e.processors.fixgitcommitlinksprocessor.md | 103 ------ ...cessors.keepoutboundlinktargetprocessor.md | 2 +- ...tfsexportprofilepicturefromadprocessor.md} | 28 +- ...sors.tfsexportusersformappingprocessor.md} | 64 ++-- ...ssors.tfsimportprofilepictureprocessor.md} | 28 +- ...fstestconfigurationsmigrationprocessor.md} | 28 +- ...fstestplansandsuitesmigrationprocessor.md} | 80 +---- ...ors.tfstestvariablesmigrationprocessor.md} | 28 +- ...rocessors.tfsworkitembulkeditprocessor.md} | 28 +- ....processors.tfsworkitemdeleteprocessor.md} | 28 +- ...sworkitemoverwriteareasastagsprocessor.md} | 28 +- ...ocessors.tfsworkitemoverwriteprocessor.md} | 102 ++---- ...e.processors.workitemmigrationprocessor.md | 297 ------------------ ...cessors.workitempostprocessingprocessor.md | 99 ------ .../reference.tools.gitrepomappingtool.md | 59 ---- .../_reference/reference.tools.itool.md | 34 -- 54 files changed, 359 insertions(+), 2178 deletions(-) delete mode 100644 docs/_data/reference.endpoints.generictfsendpoint`1.yaml delete mode 100644 docs/_data/reference.endpoints.tfsmigrationclient.yaml delete mode 100644 docs/_data/reference.fieldmaps.fieldvaluetotagmap.yaml delete mode 100644 docs/_data/reference.processors.createteamfolders.yaml delete mode 100644 docs/_data/reference.processors.exportteamlistprocessor.yaml delete mode 100644 docs/_data/reference.processors.fakeprocessor.yaml delete mode 100644 docs/_data/reference.processors.fixgitcommitlinksprocessor.yaml rename docs/_data/{reference.processors.exportprofilepicturefromadprocessor.yaml => reference.processors.tfsexportprofilepicturefromadprocessor.yaml} (78%) create mode 100644 docs/_data/reference.processors.tfsexportusersformappingprocessor.yaml rename docs/_data/{reference.processors.importprofilepictureprocessor.yaml => reference.processors.tfsimportprofilepictureprocessor.yaml} (73%) rename docs/_data/{reference.processors.testconfigurationsmigrationprocessor.yaml => reference.processors.tfstestconfigurationsmigrationprocessor.yaml} (71%) rename docs/_data/{reference.processors.testplansandsuitesmigrationprocessor.yaml => reference.processors.tfstestplansandsuitesmigrationprocessor.yaml} (87%) rename docs/_data/{reference.processors.testvariablesmigrationprocessor.yaml => reference.processors.tfstestvariablesmigrationprocessor.yaml} (75%) rename docs/_data/{reference.processors.workitembulkeditprocessor.yaml => reference.processors.tfsworkitembulkeditprocessor.yaml} (86%) rename docs/_data/{reference.processors.workitemdeleteprocessor.yaml => reference.processors.tfsworkitemdeleteprocessor.yaml} (84%) rename docs/_data/{reference.processors.workitemupdateareasastagsprocessor.yaml => reference.processors.tfsworkitemoverwriteareasastagsprocessor.yaml} (75%) rename docs/_data/{reference.processors.tfsworkitemmigrationprocessor.yaml => reference.processors.tfsworkitemoverwriteprocessor.yaml} (60%) delete mode 100644 docs/_data/reference.processors.workitemmigrationprocessor.yaml delete mode 100644 docs/_data/reference.processors.workitempostprocessingprocessor.yaml delete mode 100644 docs/_data/reference.tools.gitrepomappingtool.yaml delete mode 100644 docs/_data/reference.tools.itool.yaml delete mode 100644 docs/collections/_reference/reference.endpoints.generictfsendpoint`1.md delete mode 100644 docs/collections/_reference/reference.endpoints.tfsmigrationclient.md delete mode 100644 docs/collections/_reference/reference.fieldmaps.fieldvaluetotagmap.md delete mode 100644 docs/collections/_reference/reference.processors.createteamfolders.md delete mode 100644 docs/collections/_reference/reference.processors.exportteamlistprocessor.md delete mode 100644 docs/collections/_reference/reference.processors.exportusersformappingprocessor.md delete mode 100644 docs/collections/_reference/reference.processors.fakeprocessor.md delete mode 100644 docs/collections/_reference/reference.processors.fixgitcommitlinksprocessor.md rename docs/collections/_reference/{reference.processors.exportprofilepicturefromadprocessor.md => reference.processors.tfsexportprofilepicturefromadprocessor.md} (71%) rename docs/{_data/reference.processors.exportusersformappingprocessor.yaml => collections/_reference/reference.processors.tfsexportusersformappingprocessor.md} (55%) rename docs/collections/_reference/{reference.processors.importprofilepictureprocessor.md => reference.processors.tfsimportprofilepictureprocessor.md} (66%) rename docs/collections/_reference/{reference.processors.testconfigurationsmigrationprocessor.md => reference.processors.tfstestconfigurationsmigrationprocessor.md} (64%) rename docs/collections/_reference/{reference.processors.testplansandsuitesmigrationprocessor.md => reference.processors.tfstestplansandsuitesmigrationprocessor.md} (63%) rename docs/collections/_reference/{reference.processors.testvariablesmigrationprocessor.md => reference.processors.tfstestvariablesmigrationprocessor.md} (67%) rename docs/collections/_reference/{reference.processors.workitembulkeditprocessor.md => reference.processors.tfsworkitembulkeditprocessor.md} (81%) rename docs/collections/_reference/{reference.processors.workitemdeleteprocessor.md => reference.processors.tfsworkitemdeleteprocessor.md} (78%) rename docs/collections/_reference/{reference.processors.workitemupdateareasastagsprocessor.md => reference.processors.tfsworkitemoverwriteareasastagsprocessor.md} (68%) rename docs/collections/_reference/{reference.processors.tfsworkitemmigrationprocessor.md => reference.processors.tfsworkitemoverwriteprocessor.md} (59%) delete mode 100644 docs/collections/_reference/reference.processors.workitemmigrationprocessor.md delete mode 100644 docs/collections/_reference/reference.processors.workitempostprocessingprocessor.md delete mode 100644 docs/collections/_reference/reference.tools.gitrepomappingtool.md delete mode 100644 docs/collections/_reference/reference.tools.itool.md diff --git a/docs/Reference/Generated/MigrationTools.Clients.TfsObjectModel.xml b/docs/Reference/Generated/MigrationTools.Clients.TfsObjectModel.xml index b649fe3d5..85083cf5c 100644 --- a/docs/Reference/Generated/MigrationTools.Clients.TfsObjectModel.xml +++ b/docs/Reference/Generated/MigrationTools.Clients.TfsObjectModel.xml @@ -339,32 +339,32 @@ preview Work Items - + A list of work items to import [] - + A work item query based on WIQL to select only important work items. To migrate all leave this empty. See [WIQL Query Bits](#wiql-query-bits) AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') - + This loads all of the work items already saved to the Target and removes them from the Source work item list prior to commencing the run. While this may take some time in large data sets it reduces the time of the overall migration significantly if you need to restart. true - + Pause after each work item is migrated false - + **beta** If set to a number greater than 0 work items that fail to save will retry after a number of seconds equal to the retry count. This allows for periodic network glitches not to end the process. @@ -407,32 +407,32 @@ - + A work item query based on WIQL to select only important work items. To migrate all leave this empty. See [WIQL Query Bits](#wiql-query-bits) AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') - + A list of work items to import [] - + This loads all of the work items already saved to the Target and removes them from the Source work item list prior to commencing the run. While this may take some time in large data sets it reduces the time of the overall migration significantly if you need to restart. true - + Pause after each work item is migrated false - + **beta** If set to a number greater than 0 work items that fail to save will retry after a number of seconds equal to the retry count. This allows for periodic network glitches not to end the process. diff --git a/docs/_data/reference.endpoints.generictfsendpoint`1.yaml b/docs/_data/reference.endpoints.generictfsendpoint`1.yaml deleted file mode 100644 index 2b782f85e..000000000 --- a/docs/_data/reference.endpoints.generictfsendpoint`1.yaml +++ /dev/null @@ -1,12 +0,0 @@ -optionsClassName: -optionsClassFullName: -configurationSamples: [] -description: missng XML code comments -className: GenericTfsEndpoint`1 -typeName: Endpoints -architecture: v2 -options: [] -status: missng XML code comments -processingTarget: missng XML code comments -classFile: '' -optionsClassFile: diff --git a/docs/_data/reference.endpoints.tfsendpoint.yaml b/docs/_data/reference.endpoints.tfsendpoint.yaml index c9b619c39..928643c5a 100644 --- a/docs/_data/reference.endpoints.tfsendpoint.yaml +++ b/docs/_data/reference.endpoints.tfsendpoint.yaml @@ -58,5 +58,5 @@ options: defaultValue: missng XML code comments status: missng XML code comments processingTarget: missng XML code comments -classFile: /src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsEndpoint.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsEndpointOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/EndPoints/TfsEndpoint.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/EndPoints/TfsEndpointOptions.cs diff --git a/docs/_data/reference.endpoints.tfsmigrationclient.yaml b/docs/_data/reference.endpoints.tfsmigrationclient.yaml deleted file mode 100644 index 913071072..000000000 --- a/docs/_data/reference.endpoints.tfsmigrationclient.yaml +++ /dev/null @@ -1,102 +0,0 @@ -optionsClassName: TfsMigrationClient -optionsClassFullName: MigrationTools.Clients.TfsMigrationClient -configurationSamples: -- name: defaults - description: - code: >- - { - "MigrationTools": { - "EndpointDefaults": { - "TfsMigrationClient": [] - } - } - } - sampleFor: MigrationTools.Clients.TfsMigrationClient -- name: sample - description: - code: >- - { - "MigrationTools": { - "EndpointDefaults": { - "TfsMigrationClient": [] - } - } - } - sampleFor: MigrationTools.Clients.TfsMigrationClient -- name: classic - description: - code: >- - { - "$type": "TfsMigrationClient", - "Enabled": false, - "TfsConfig": null, - "Config": null, - "WorkItems": null, - "TestPlans": null, - "Credentials": { - "PromptType": 0, - "Federated": null, - "Windows": { - "Credentials": { - "UserName": "", - "Password": "", - "SecurePassword": { - "Length": 0 - }, - "Domain": "" - }, - "CredentialType": 0, - "UseDefaultCredentials": true - }, - "Storage": null - }, - "InternalCollection": null, - "Name": null, - "EndpointEnrichers": null - } - sampleFor: MigrationTools.Clients.TfsMigrationClient -description: missng XML code comments -className: TfsMigrationClient -typeName: Endpoints -architecture: -options: -- parameterName: Config - type: IEndpointOptions - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: Credentials - type: VssCredentials - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: Enabled - type: Boolean - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: EndpointEnrichers - type: List - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: InternalCollection - type: Object - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: Name - type: String - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: TestPlans - type: ITestPlanMigrationClient - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: TfsConfig - type: TfsTeamProjectEndpointOptions - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: WorkItems - type: IWorkItemMigrationClient - description: missng XML code comments - defaultValue: missng XML code comments -status: missng XML code comments -processingTarget: missng XML code comments -classFile: /src/MigrationTools.Clients.TfsObjectModel/Clients/TfsMigrationClient.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Clients/TfsMigrationClient.cs diff --git a/docs/_data/reference.endpoints.tfsteamprojectendpoint.yaml b/docs/_data/reference.endpoints.tfsteamprojectendpoint.yaml index 7c50bfd18..7ad9db615 100644 --- a/docs/_data/reference.endpoints.tfsteamprojectendpoint.yaml +++ b/docs/_data/reference.endpoints.tfsteamprojectendpoint.yaml @@ -124,5 +124,5 @@ options: defaultValue: missng XML code comments status: missng XML code comments processingTarget: missng XML code comments -classFile: /src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsTeamProjectEndpoint.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsTeamProjectEndPointOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/EndPoints/TfsTeamProjectEndpoint.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/EndPoints/TfsTeamProjectEndPointOptions.cs diff --git a/docs/_data/reference.endpoints.tfsteamsettingsendpoint.yaml b/docs/_data/reference.endpoints.tfsteamsettingsendpoint.yaml index 74be988db..d7aca2cd7 100644 --- a/docs/_data/reference.endpoints.tfsteamsettingsendpoint.yaml +++ b/docs/_data/reference.endpoints.tfsteamsettingsendpoint.yaml @@ -58,5 +58,5 @@ options: defaultValue: missng XML code comments status: missng XML code comments processingTarget: missng XML code comments -classFile: /src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsTeamSettingsEndpoint.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsTeamSettingsEndpointOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/EndPoints/TfsTeamSettingsEndpoint.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/EndPoints/TfsTeamSettingsEndpointOptions.cs diff --git a/docs/_data/reference.endpoints.tfsworkitemendpoint.yaml b/docs/_data/reference.endpoints.tfsworkitemendpoint.yaml index 30ab7a52c..2e177daed 100644 --- a/docs/_data/reference.endpoints.tfsworkitemendpoint.yaml +++ b/docs/_data/reference.endpoints.tfsworkitemendpoint.yaml @@ -63,5 +63,5 @@ options: defaultValue: missng XML code comments status: missng XML code comments processingTarget: missng XML code comments -classFile: /src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsWorkItemEndpoint.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsWorkItemEndpointOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/EndPoints/TfsWorkItemEndpoint.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/EndPoints/TfsWorkItemEndpointOptions.cs diff --git a/docs/_data/reference.fieldmaps.fieldvaluetotagmap.yaml b/docs/_data/reference.fieldmaps.fieldvaluetotagmap.yaml deleted file mode 100644 index 55180bd55..000000000 --- a/docs/_data/reference.fieldmaps.fieldvaluetotagmap.yaml +++ /dev/null @@ -1,69 +0,0 @@ -optionsClassName: FieldValuetoTagMapOptions -optionsClassFullName: MigrationTools.Tools.FieldValuetoTagMapOptions -configurationSamples: -- name: defaults - description: - code: >- - { - "MigrationTools": { - "CommonTools": { - "FieldMappingTool": { - "FieldMapDefaults": { - "FieldValuetoTagMap": [] - } - } - } - } - } - sampleFor: MigrationTools.Tools.FieldValuetoTagMapOptions -- name: sample - description: - code: >- - { - "MigrationTools": { - "CommonTools": { - "FieldMappingTool": { - "FieldMapDefaults": { - "FieldValuetoTagMap": [] - } - } - } - } - } - sampleFor: MigrationTools.Tools.FieldValuetoTagMapOptions -- name: classic - description: - code: >- - { - "$type": "FieldValuetoTagMapOptions", - "sourceField": null, - "pattern": null, - "formatExpression": null, - "ApplyTo": [] - } - sampleFor: MigrationTools.Tools.FieldValuetoTagMapOptions -description: missng XML code comments -className: FieldValuetoTagMap -typeName: FieldMaps -architecture: -options: -- parameterName: ApplyTo - type: List - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: formatExpression - type: String - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: pattern - type: String - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: sourceField - type: String - description: missng XML code comments - defaultValue: missng XML code comments -status: missng XML code comments -processingTarget: missng XML code comments -classFile: /src/MigrationTools.Clients.TfsObjectModel/Tools/FieldMappingTool/FieldMaps/FieldValuetoTagMap.cs -optionsClassFile: /src/MigrationTools/Tools/FieldMappingTool/FieldMaps/FieldValuetoTagMapOptions.cs diff --git a/docs/_data/reference.processors.createteamfolders.yaml b/docs/_data/reference.processors.createteamfolders.yaml deleted file mode 100644 index ff59dc80f..000000000 --- a/docs/_data/reference.processors.createteamfolders.yaml +++ /dev/null @@ -1,12 +0,0 @@ -optionsClassName: -optionsClassFullName: -configurationSamples: [] -description: Creates folders in Sared Queries for each Team -className: CreateTeamFolders -typeName: Processors -architecture: v1 -options: [] -status: alpha -processingTarget: Shared Queries -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/CreateTeamFoldersProcessor.cs -optionsClassFile: diff --git a/docs/_data/reference.processors.exportteamlistprocessor.yaml b/docs/_data/reference.processors.exportteamlistprocessor.yaml deleted file mode 100644 index c08227006..000000000 --- a/docs/_data/reference.processors.exportteamlistprocessor.yaml +++ /dev/null @@ -1,12 +0,0 @@ -optionsClassName: -optionsClassFullName: -configurationSamples: [] -description: missng XML code comments -className: ExportTeamListProcessor -typeName: Processors -architecture: v1 -options: [] -status: missng XML code comments -processingTarget: missng XML code comments -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/ExportTeamListProcessor.cs -optionsClassFile: diff --git a/docs/_data/reference.processors.fakeprocessor.yaml b/docs/_data/reference.processors.fakeprocessor.yaml deleted file mode 100644 index 955df4866..000000000 --- a/docs/_data/reference.processors.fakeprocessor.yaml +++ /dev/null @@ -1,12 +0,0 @@ -optionsClassName: -optionsClassFullName: -configurationSamples: [] -description: "Note: this is only for internal usage. Don't use this in your configurations." -className: FakeProcessor -typeName: Processors -architecture: v1 -options: [] -status: missng XML code comments -processingTarget: missng XML code comments -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/FakeProcessor.cs -optionsClassFile: diff --git a/docs/_data/reference.processors.fixgitcommitlinksprocessor.yaml b/docs/_data/reference.processors.fixgitcommitlinksprocessor.yaml deleted file mode 100644 index 877fa7fc9..000000000 --- a/docs/_data/reference.processors.fixgitcommitlinksprocessor.yaml +++ /dev/null @@ -1,81 +0,0 @@ -optionsClassName: FixGitCommitLinksProcessorOptions -optionsClassFullName: MigrationTools.Processors.FixGitCommitLinksProcessorOptions -configurationSamples: -- name: defaults - description: - code: >- - { - "MigrationTools": { - "ProcessorDefaults": { - "FixGitCommitLinksProcessor": [] - } - } - } - sampleFor: MigrationTools.Processors.FixGitCommitLinksProcessorOptions -- name: sample - description: - code: >- - { - "MigrationTools": { - "ProcessorDefaults": { - "FixGitCommitLinksProcessor": [] - } - } - } - sampleFor: MigrationTools.Processors.FixGitCommitLinksProcessorOptions -- name: classic - description: - code: >- - { - "$type": "FixGitCommitLinksProcessorOptions", - "Enabled": false, - "TargetRepository": null, - "Query": null, - "Enrichers": null, - "ProcessorEnrichers": null, - "SourceName": null, - "TargetName": null, - "RefName": null - } - sampleFor: MigrationTools.Processors.FixGitCommitLinksProcessorOptions -description: missng XML code comments -className: FixGitCommitLinksProcessor -typeName: Processors -architecture: -options: -- parameterName: Enabled - type: Boolean - description: If set to `true` then the processor will run. Set to `false` and the processor will not run. - defaultValue: missng XML code comments -- parameterName: Enrichers - type: List - description: A list of enrichers that can augment the proccessing of the data - defaultValue: missng XML code comments -- parameterName: ProcessorEnrichers - type: List - description: List of Enrichers that can be used to add more features to this processor. Only works with Native Processors and not legacy Processors. - defaultValue: missng XML code comments -- parameterName: Query - type: String - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: RefName - type: String - description: '`Refname` will be used in the future to allow for using named Options without the need to copy all of the options.' - defaultValue: missng XML code comments -- parameterName: SourceName - type: String - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: TargetName - type: String - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: TargetRepository - type: String - description: missng XML code comments - defaultValue: missng XML code comments -status: missng XML code comments -processingTarget: missng XML code comments -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/FixGitCommitLinksProcessor.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/FixGitCommitLinksProcessorOptions.cs diff --git a/docs/_data/reference.processors.keepoutboundlinktargetprocessor.yaml b/docs/_data/reference.processors.keepoutboundlinktargetprocessor.yaml index 0ceeb7ae0..a83abc285 100644 --- a/docs/_data/reference.processors.keepoutboundlinktargetprocessor.yaml +++ b/docs/_data/reference.processors.keepoutboundlinktargetprocessor.yaml @@ -17,7 +17,7 @@ configurationSamples: "Enabled": false, "WIQLQuery": "Select [System.Id] From WorkItems Where [System.TeamProject] = @project and not [System.WorkItemType] contains 'Test Suite, Test Plan,Shared Steps,Shared Parameter,Feedback Request'", "TargetLinksToKeepOrganization": "https://dev.azure.com/nkdagility", - "TargetLinksToKeepProject": "7dd43083-3ca7-4e5f-8ec6-f0544ed80445", + "TargetLinksToKeepProject": "9fe99d20-153f-4861-9eee-c0cc7ab8de4d", "CleanupFileName": "c:/temp/OutboundLinkTargets.bat", "PrependCommand": "start", "DryRun": true, diff --git a/docs/_data/reference.processors.exportprofilepicturefromadprocessor.yaml b/docs/_data/reference.processors.tfsexportprofilepicturefromadprocessor.yaml similarity index 78% rename from docs/_data/reference.processors.exportprofilepicturefromadprocessor.yaml rename to docs/_data/reference.processors.tfsexportprofilepicturefromadprocessor.yaml index de6a78cdd..36ae4f056 100644 --- a/docs/_data/reference.processors.exportprofilepicturefromadprocessor.yaml +++ b/docs/_data/reference.processors.tfsexportprofilepicturefromadprocessor.yaml @@ -1,19 +1,19 @@ -optionsClassName: ExportProfilePictureFromADProcessorOptions -optionsClassFullName: MigrationTools.Processors.ExportProfilePictureFromADProcessorOptions +optionsClassName: TfsExportProfilePictureFromADProcessorOptions +optionsClassFullName: MigrationTools.Processors.TfsExportProfilePictureFromADProcessorOptions configurationSamples: - name: defaults description: code: There are no defaults! Check the sample for options! - sampleFor: MigrationTools.Processors.ExportProfilePictureFromADProcessorOptions + sampleFor: MigrationTools.Processors.TfsExportProfilePictureFromADProcessorOptions - name: sample description: code: There is no sample, but you can check the classic below for a general feel. - sampleFor: MigrationTools.Processors.ExportProfilePictureFromADProcessorOptions + sampleFor: MigrationTools.Processors.TfsExportProfilePictureFromADProcessorOptions - name: classic description: code: >- { - "$type": "ExportProfilePictureFromADProcessorOptions", + "$type": "TfsExportProfilePictureFromADProcessorOptions", "Enabled": false, "Domain": null, "Username": null, @@ -24,9 +24,9 @@ configurationSamples: "TargetName": null, "RefName": null } - sampleFor: MigrationTools.Processors.ExportProfilePictureFromADProcessorOptions + sampleFor: MigrationTools.Processors.TfsExportProfilePictureFromADProcessorOptions description: Downloads corporate images and updates TFS/Azure DevOps profiles -className: ExportProfilePictureFromADProcessor +className: TfsExportProfilePictureFromADProcessor typeName: Processors architecture: options: @@ -68,5 +68,5 @@ options: defaultValue: String.Empty status: alpha processingTarget: Profiles -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/ExportProfilePictureFromADProcessor.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/ExportProfilePictureFromADProcessorOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsExportProfilePictureFromADProcessor.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsExportProfilePictureFromADProcessorOptions.cs diff --git a/docs/_data/reference.processors.tfsexportusersformappingprocessor.yaml b/docs/_data/reference.processors.tfsexportusersformappingprocessor.yaml new file mode 100644 index 000000000..1250888a5 --- /dev/null +++ b/docs/_data/reference.processors.tfsexportusersformappingprocessor.yaml @@ -0,0 +1,62 @@ +optionsClassName: TfsExportUsersForMappingProcessorOptions +optionsClassFullName: MigrationTools.Processors.TfsExportUsersForMappingProcessorOptions +configurationSamples: +- name: defaults + description: + code: There are no defaults! Check the sample for options! + sampleFor: MigrationTools.Processors.TfsExportUsersForMappingProcessorOptions +- name: sample + description: + code: There is no sample, but you can check the classic below for a general feel. + sampleFor: MigrationTools.Processors.TfsExportUsersForMappingProcessorOptions +- name: classic + description: + code: >- + { + "$type": "TfsExportUsersForMappingProcessorOptions", + "Enabled": false, + "WIQLQuery": null, + "OnlyListUsersInWorkItems": true, + "Enrichers": null, + "SourceName": null, + "TargetName": null, + "RefName": null + } + sampleFor: MigrationTools.Processors.TfsExportUsersForMappingProcessorOptions +description: ExportUsersForMappingContext is a tool used to create a starter mapping file for users between the source and target systems. Use `ExportUsersForMappingConfig` to configure. +className: TfsExportUsersForMappingProcessor +typeName: Processors +architecture: +options: +- parameterName: Enabled + type: Boolean + description: If set to `true` then the processor will run. Set to `false` and the processor will not run. + defaultValue: missng XML code comments +- parameterName: Enrichers + type: List + description: List of Enrichers that can be used to add more features to this processor. Only works with Native Processors and not legacy Processors. + defaultValue: missng XML code comments +- parameterName: OnlyListUsersInWorkItems + type: Boolean + description: missng XML code comments + defaultValue: missng XML code comments +- parameterName: RefName + type: String + description: '`Refname` will be used in the future to allow for using named Options without the need to copy all of the options.' + defaultValue: missng XML code comments +- parameterName: SourceName + type: String + description: missng XML code comments + defaultValue: missng XML code comments +- parameterName: TargetName + type: String + description: missng XML code comments + defaultValue: missng XML code comments +- parameterName: WIQLQuery + type: String + description: missng XML code comments + defaultValue: missng XML code comments +status: ready +processingTarget: Work Items +classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsExportUsersForMappingProcessor.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsExportUsersForMappingProcessorOptions.cs diff --git a/docs/_data/reference.processors.importprofilepictureprocessor.yaml b/docs/_data/reference.processors.tfsimportprofilepictureprocessor.yaml similarity index 73% rename from docs/_data/reference.processors.importprofilepictureprocessor.yaml rename to docs/_data/reference.processors.tfsimportprofilepictureprocessor.yaml index 2886bfc5d..ce1e374bf 100644 --- a/docs/_data/reference.processors.importprofilepictureprocessor.yaml +++ b/docs/_data/reference.processors.tfsimportprofilepictureprocessor.yaml @@ -1,28 +1,28 @@ -optionsClassName: ImportProfilePictureProcessorOptions -optionsClassFullName: MigrationTools.Processors.ImportProfilePictureProcessorOptions +optionsClassName: TfsImportProfilePictureProcessorOptions +optionsClassFullName: MigrationTools.Processors.TfsImportProfilePictureProcessorOptions configurationSamples: - name: defaults description: code: There are no defaults! Check the sample for options! - sampleFor: MigrationTools.Processors.ImportProfilePictureProcessorOptions + sampleFor: MigrationTools.Processors.TfsImportProfilePictureProcessorOptions - name: sample description: code: There is no sample, but you can check the classic below for a general feel. - sampleFor: MigrationTools.Processors.ImportProfilePictureProcessorOptions + sampleFor: MigrationTools.Processors.TfsImportProfilePictureProcessorOptions - name: classic description: code: >- { - "$type": "ImportProfilePictureProcessorOptions", + "$type": "TfsImportProfilePictureProcessorOptions", "Enabled": false, "Enrichers": null, "SourceName": null, "TargetName": null, "RefName": null } - sampleFor: MigrationTools.Processors.ImportProfilePictureProcessorOptions + sampleFor: MigrationTools.Processors.TfsImportProfilePictureProcessorOptions description: Downloads corporate images and updates TFS/Azure DevOps profiles -className: ImportProfilePictureProcessor +className: TfsImportProfilePictureProcessor typeName: Processors architecture: options: @@ -48,5 +48,5 @@ options: defaultValue: missng XML code comments status: alpha processingTarget: Profiles -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/ImportProfilePictureProcessor.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/ImportProfilePictureProcessorOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsImportProfilePictureProcessor.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsImportProfilePictureProcessorOptions.cs diff --git a/docs/_data/reference.processors.testconfigurationsmigrationprocessor.yaml b/docs/_data/reference.processors.tfstestconfigurationsmigrationprocessor.yaml similarity index 71% rename from docs/_data/reference.processors.testconfigurationsmigrationprocessor.yaml rename to docs/_data/reference.processors.tfstestconfigurationsmigrationprocessor.yaml index 012860c0d..3f079a03b 100644 --- a/docs/_data/reference.processors.testconfigurationsmigrationprocessor.yaml +++ b/docs/_data/reference.processors.tfstestconfigurationsmigrationprocessor.yaml @@ -1,28 +1,28 @@ -optionsClassName: TestConfigurationsMigrationProcessorOptions -optionsClassFullName: MigrationTools.Processors.TestConfigurationsMigrationProcessorOptions +optionsClassName: TfsTestConfigurationsMigrationProcessorOptions +optionsClassFullName: MigrationTools.Processors.TfsTestConfigurationsMigrationProcessorOptions configurationSamples: - name: defaults description: code: There are no defaults! Check the sample for options! - sampleFor: MigrationTools.Processors.TestConfigurationsMigrationProcessorOptions + sampleFor: MigrationTools.Processors.TfsTestConfigurationsMigrationProcessorOptions - name: sample description: code: There is no sample, but you can check the classic below for a general feel. - sampleFor: MigrationTools.Processors.TestConfigurationsMigrationProcessorOptions + sampleFor: MigrationTools.Processors.TfsTestConfigurationsMigrationProcessorOptions - name: classic description: code: >- { - "$type": "TestConfigurationsMigrationProcessorOptions", + "$type": "TfsTestConfigurationsMigrationProcessorOptions", "Enabled": false, "Enrichers": null, "SourceName": null, "TargetName": null, "RefName": null } - sampleFor: MigrationTools.Processors.TestConfigurationsMigrationProcessorOptions + sampleFor: MigrationTools.Processors.TfsTestConfigurationsMigrationProcessorOptions description: This processor can migrate `test configuration`. This should be run before `LinkMigrationConfig`. -className: TestConfigurationsMigrationProcessor +className: TfsTestConfigurationsMigrationProcessor typeName: Processors architecture: options: @@ -48,5 +48,5 @@ options: defaultValue: missng XML code comments status: Beta processingTarget: Suites & Plans -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TestConfigurationsMigrationProcessor.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TestConfigurationsMigrationProcessorOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestConfigurationsMigrationProcessor.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestConfigurationsMigrationProcessorOptions.cs diff --git a/docs/_data/reference.processors.testplansandsuitesmigrationprocessor.yaml b/docs/_data/reference.processors.tfstestplansandsuitesmigrationprocessor.yaml similarity index 87% rename from docs/_data/reference.processors.testplansandsuitesmigrationprocessor.yaml rename to docs/_data/reference.processors.tfstestplansandsuitesmigrationprocessor.yaml index e54e0da61..aa5d6f2be 100644 --- a/docs/_data/reference.processors.testplansandsuitesmigrationprocessor.yaml +++ b/docs/_data/reference.processors.tfstestplansandsuitesmigrationprocessor.yaml @@ -1,19 +1,19 @@ -optionsClassName: TestPlansAndSuitesMigrationProcessorOptions -optionsClassFullName: MigrationTools._EngineV1.Configuration.Processing.TestPlansAndSuitesMigrationProcessorOptions +optionsClassName: TfsTestPlansAndSuitesMigrationProcessorOptions +optionsClassFullName: MigrationTools._EngineV1.Configuration.Processing.TfsTestPlansAndSuitesMigrationProcessorOptions configurationSamples: - name: defaults description: code: There are no defaults! Check the sample for options! - sampleFor: MigrationTools._EngineV1.Configuration.Processing.TestPlansAndSuitesMigrationProcessorOptions + sampleFor: MigrationTools._EngineV1.Configuration.Processing.TfsTestPlansAndSuitesMigrationProcessorOptions - name: sample description: code: There is no sample, but you can check the classic below for a general feel. - sampleFor: MigrationTools._EngineV1.Configuration.Processing.TestPlansAndSuitesMigrationProcessorOptions + sampleFor: MigrationTools._EngineV1.Configuration.Processing.TfsTestPlansAndSuitesMigrationProcessorOptions - name: classic description: code: >- { - "$type": "TestPlansAndSuitesMigrationProcessorOptions", + "$type": "TfsTestPlansAndSuitesMigrationProcessorOptions", "Enabled": false, "OnlyElementsWithTag": null, "TestPlanQuery": null, @@ -26,9 +26,9 @@ configurationSamples: "TargetName": null, "RefName": null } - sampleFor: MigrationTools._EngineV1.Configuration.Processing.TestPlansAndSuitesMigrationProcessorOptions + sampleFor: MigrationTools._EngineV1.Configuration.Processing.TfsTestPlansAndSuitesMigrationProcessorOptions description: Rebuilds Suits and plans for Test Cases migrated using the WorkItemMigration -className: TestPlansAndSuitesMigrationProcessor +className: TfsTestPlansAndSuitesMigrationProcessor typeName: Processors architecture: options: @@ -78,5 +78,5 @@ options: defaultValue: '`String.Empty`' status: Beta processingTarget: Suites & Plans -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TestPlansAndSuitesMigrationProcessor.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TestPlansAndSuitesMigrationProcessorOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestPlansAndSuitesMigrationProcessor.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestPlansAndSuitesMigrationProcessorOptions.cs diff --git a/docs/_data/reference.processors.testvariablesmigrationprocessor.yaml b/docs/_data/reference.processors.tfstestvariablesmigrationprocessor.yaml similarity index 75% rename from docs/_data/reference.processors.testvariablesmigrationprocessor.yaml rename to docs/_data/reference.processors.tfstestvariablesmigrationprocessor.yaml index 95eaf95c9..aa7f0a1a4 100644 --- a/docs/_data/reference.processors.testvariablesmigrationprocessor.yaml +++ b/docs/_data/reference.processors.tfstestvariablesmigrationprocessor.yaml @@ -1,19 +1,19 @@ -optionsClassName: TestVariablesMigrationProcessorOptions -optionsClassFullName: MigrationTools.Processors.TestVariablesMigrationProcessorOptions +optionsClassName: TfsTestVariablesMigrationProcessorOptions +optionsClassFullName: MigrationTools.Processors.TfsTestVariablesMigrationProcessorOptions configurationSamples: - name: defaults description: code: There are no defaults! Check the sample for options! - sampleFor: MigrationTools.Processors.TestVariablesMigrationProcessorOptions + sampleFor: MigrationTools.Processors.TfsTestVariablesMigrationProcessorOptions - name: sample description: code: There is no sample, but you can check the classic below for a general feel. - sampleFor: MigrationTools.Processors.TestVariablesMigrationProcessorOptions + sampleFor: MigrationTools.Processors.TfsTestVariablesMigrationProcessorOptions - name: classic description: code: >- { - "$type": "TestVariablesMigrationProcessorOptions", + "$type": "TfsTestVariablesMigrationProcessorOptions", "Enabled": false, "Processor": "TestVariablesMigrationContext", "Enrichers": null, @@ -21,9 +21,9 @@ configurationSamples: "TargetName": null, "RefName": null } - sampleFor: MigrationTools.Processors.TestVariablesMigrationProcessorOptions + sampleFor: MigrationTools.Processors.TfsTestVariablesMigrationProcessorOptions description: This processor can migrate test variables that are defined in the test plans / suites. This must run before `TestPlansAndSuitesMigrationConfig`. -className: TestVariablesMigrationProcessor +className: TfsTestVariablesMigrationProcessor typeName: Processors architecture: options: @@ -53,5 +53,5 @@ options: defaultValue: missng XML code comments status: Beta processingTarget: Suites & Plans -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TestVariablesMigrationProcessor.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TestVariablesMigrationProcessorOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestVariablesMigrationProcessor.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestVariablesMigrationProcessorOptions.cs diff --git a/docs/_data/reference.processors.workitembulkeditprocessor.yaml b/docs/_data/reference.processors.tfsworkitembulkeditprocessor.yaml similarity index 86% rename from docs/_data/reference.processors.workitembulkeditprocessor.yaml rename to docs/_data/reference.processors.tfsworkitembulkeditprocessor.yaml index b46fb88db..a0c7252b4 100644 --- a/docs/_data/reference.processors.workitembulkeditprocessor.yaml +++ b/docs/_data/reference.processors.tfsworkitembulkeditprocessor.yaml @@ -1,19 +1,19 @@ -optionsClassName: WorkItemBulkEditProcessorOptions -optionsClassFullName: MigrationTools._EngineV1.Configuration.Processing.WorkItemBulkEditProcessorOptions +optionsClassName: TfsWorkItemBulkEditProcessorOptions +optionsClassFullName: MigrationTools._EngineV1.Configuration.Processing.TfsWorkItemBulkEditProcessorOptions configurationSamples: - name: defaults description: code: There are no defaults! Check the sample for options! - sampleFor: MigrationTools._EngineV1.Configuration.Processing.WorkItemBulkEditProcessorOptions + sampleFor: MigrationTools._EngineV1.Configuration.Processing.TfsWorkItemBulkEditProcessorOptions - name: sample description: code: There is no sample, but you can check the classic below for a general feel. - sampleFor: MigrationTools._EngineV1.Configuration.Processing.WorkItemBulkEditProcessorOptions + sampleFor: MigrationTools._EngineV1.Configuration.Processing.TfsWorkItemBulkEditProcessorOptions - name: classic description: code: >- { - "$type": "WorkItemBulkEditProcessorOptions", + "$type": "TfsWorkItemBulkEditProcessorOptions", "Enabled": false, "WhatIf": false, "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [@ReflectedWorkItemIdFieldName] = '' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc", @@ -26,9 +26,9 @@ configurationSamples: "TargetName": null, "RefName": null } - sampleFor: MigrationTools._EngineV1.Configuration.Processing.WorkItemBulkEditProcessorOptions + sampleFor: MigrationTools._EngineV1.Configuration.Processing.TfsWorkItemBulkEditProcessorOptions description: This processor allows you to make changes in place where we load from teh Target and update the Target. This is used for bulk updates with the most common reason being a process template change. -className: WorkItemBulkEditProcessor +className: TfsWorkItemBulkEditProcessor typeName: Processors architecture: options: @@ -78,5 +78,5 @@ options: defaultValue: '[]' status: missng XML code comments processingTarget: WorkItem -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemBulkEditProcessor.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemBulkEditProcessorOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemBulkEditProcessor.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemBulkEditProcessorOptions.cs diff --git a/docs/_data/reference.processors.workitemdeleteprocessor.yaml b/docs/_data/reference.processors.tfsworkitemdeleteprocessor.yaml similarity index 84% rename from docs/_data/reference.processors.workitemdeleteprocessor.yaml rename to docs/_data/reference.processors.tfsworkitemdeleteprocessor.yaml index 8e0f10e13..f90421d83 100644 --- a/docs/_data/reference.processors.workitemdeleteprocessor.yaml +++ b/docs/_data/reference.processors.tfsworkitemdeleteprocessor.yaml @@ -1,19 +1,19 @@ -optionsClassName: WorkItemDeleteProcessorOptions -optionsClassFullName: MigrationTools.Processors.WorkItemDeleteProcessorOptions +optionsClassName: TfsWorkItemDeleteProcessorOptions +optionsClassFullName: MigrationTools.Processors.TfsWorkItemDeleteProcessorOptions configurationSamples: - name: defaults description: code: There are no defaults! Check the sample for options! - sampleFor: MigrationTools.Processors.WorkItemDeleteProcessorOptions + sampleFor: MigrationTools.Processors.TfsWorkItemDeleteProcessorOptions - name: sample description: code: There is no sample, but you can check the classic below for a general feel. - sampleFor: MigrationTools.Processors.WorkItemDeleteProcessorOptions + sampleFor: MigrationTools.Processors.TfsWorkItemDeleteProcessorOptions - name: classic description: code: >- { - "$type": "WorkItemDeleteProcessorOptions", + "$type": "TfsWorkItemDeleteProcessorOptions", "Enabled": false, "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc", "WorkItemIDs": null, @@ -25,9 +25,9 @@ configurationSamples: "TargetName": null, "RefName": null } - sampleFor: MigrationTools.Processors.WorkItemDeleteProcessorOptions + sampleFor: MigrationTools.Processors.TfsWorkItemDeleteProcessorOptions description: The `WorkItemDelete` processor allows you to delete any amount of work items that meet the query. **DANGER:** This is not a recoverable action and should be use with extream caution. -className: WorkItemDeleteProcessor +className: TfsWorkItemDeleteProcessor typeName: Processors architecture: options: @@ -73,5 +73,5 @@ options: defaultValue: missng XML code comments status: ready processingTarget: WorkItem -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemDeleteProcessor.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemDeleteProcessorOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemDeleteProcessor.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemDeleteProcessorOptions.cs diff --git a/docs/_data/reference.processors.workitemupdateareasastagsprocessor.yaml b/docs/_data/reference.processors.tfsworkitemoverwriteareasastagsprocessor.yaml similarity index 75% rename from docs/_data/reference.processors.workitemupdateareasastagsprocessor.yaml rename to docs/_data/reference.processors.tfsworkitemoverwriteareasastagsprocessor.yaml index 1f92d2030..b0622c17d 100644 --- a/docs/_data/reference.processors.workitemupdateareasastagsprocessor.yaml +++ b/docs/_data/reference.processors.tfsworkitemoverwriteareasastagsprocessor.yaml @@ -1,19 +1,19 @@ -optionsClassName: WorkItemUpdateAreasAsTagsProcessorOptions -optionsClassFullName: MigrationTools.Processors.WorkItemUpdateAreasAsTagsProcessorOptions +optionsClassName: TfsWorkItemOverwriteAreasAsTagsProcessorOptions +optionsClassFullName: MigrationTools.Processors.TfsWorkItemOverwriteAreasAsTagsProcessorOptions configurationSamples: - name: defaults description: code: There are no defaults! Check the sample for options! - sampleFor: MigrationTools.Processors.WorkItemUpdateAreasAsTagsProcessorOptions + sampleFor: MigrationTools.Processors.TfsWorkItemOverwriteAreasAsTagsProcessorOptions - name: sample description: code: There is no sample, but you can check the classic below for a general feel. - sampleFor: MigrationTools.Processors.WorkItemUpdateAreasAsTagsProcessorOptions + sampleFor: MigrationTools.Processors.TfsWorkItemOverwriteAreasAsTagsProcessorOptions - name: classic description: code: >- { - "$type": "WorkItemUpdateAreasAsTagsProcessorOptions", + "$type": "TfsWorkItemOverwriteAreasAsTagsProcessorOptions", "Enabled": false, "AreaIterationPath": null, "Enrichers": null, @@ -21,9 +21,9 @@ configurationSamples: "TargetName": null, "RefName": null } - sampleFor: MigrationTools.Processors.WorkItemUpdateAreasAsTagsProcessorOptions + sampleFor: MigrationTools.Processors.TfsWorkItemOverwriteAreasAsTagsProcessorOptions description: A common issue with older *TFS/Azure DevOps* instances is the proliferation of `Area Paths`. With the use of `Area Path` for `Teams` and the addition of the `Node Name` column option these extensive tag hierarchies should instad be moved to tags. -className: WorkItemUpdateAreasAsTagsProcessor +className: TfsWorkItemOverwriteAreasAsTagsProcessor typeName: Processors architecture: options: @@ -53,5 +53,5 @@ options: defaultValue: missng XML code comments status: Beta processingTarget: Work Item -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemUpdateAreasAsTagsProcessor.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemUpdateAreasAsTagsProcessorOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemOverwriteAreasAsTagsProcessor.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemOverwriteAreasAsTagsProcessorOptions.cs diff --git a/docs/_data/reference.processors.tfsworkitemmigrationprocessor.yaml b/docs/_data/reference.processors.tfsworkitemoverwriteprocessor.yaml similarity index 60% rename from docs/_data/reference.processors.tfsworkitemmigrationprocessor.yaml rename to docs/_data/reference.processors.tfsworkitemoverwriteprocessor.yaml index 59bd32bfb..fc6ca46dd 100644 --- a/docs/_data/reference.processors.tfsworkitemmigrationprocessor.yaml +++ b/docs/_data/reference.processors.tfsworkitemoverwriteprocessor.yaml @@ -1,91 +1,41 @@ -optionsClassName: TfsWorkItemMigrationProcessorOptions -optionsClassFullName: MigrationTools.Processors.TfsWorkItemMigrationProcessorOptions +optionsClassName: TfsWorkItemOverwriteProcessorOptions +optionsClassFullName: MigrationTools.Processors.TfsWorkItemOverwriteProcessorOptions configurationSamples: - name: defaults description: - code: >- - { - "MigrationTools": { - "Processors": [ - { - "ProcessorType": "TfsWorkItemMigrationProcessor", - "AttachRevisionHistory": "False", - "Enabled": "False", - "FilterWorkItemsThatAlreadyExistInTarget": "False", - "FixHtmlAttachmentLinks": "True", - "GenerateMigrationComment": "True", - "MaxGracefulFailures": "0", - "PauseAfterEachWorkItem": "False", - "SkipRevisionWithInvalidAreaPath": "False", - "SkipRevisionWithInvalidIterationPath": "False", - "SourceName": "Source", - "TargetName": "Target", - "UpdateCreatedBy": "True", - "UpdateCreatedDate": "True", - "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc", - "WorkItemCreateRetryLimit": "5", - "WorkItemIDs": null - } - ] - } - } - sampleFor: MigrationTools.Processors.TfsWorkItemMigrationProcessorOptions + code: There are no defaults! Check the sample for options! + sampleFor: MigrationTools.Processors.TfsWorkItemOverwriteProcessorOptions - name: sample description: - code: >- - { - "MigrationTools": { - "Processors": [ - { - "ProcessorType": "TfsWorkItemMigrationProcessor", - "AttachRevisionHistory": "False", - "Enabled": "False", - "FilterWorkItemsThatAlreadyExistInTarget": "False", - "FixHtmlAttachmentLinks": "True", - "GenerateMigrationComment": "True", - "MaxGracefulFailures": "0", - "PauseAfterEachWorkItem": "False", - "SkipRevisionWithInvalidAreaPath": "False", - "SkipRevisionWithInvalidIterationPath": "False", - "SourceName": "Source", - "TargetName": "Target", - "UpdateCreatedBy": "True", - "UpdateCreatedDate": "True", - "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc", - "WorkItemCreateRetryLimit": "5", - "WorkItemIDs": null - } - ] - } - } - sampleFor: MigrationTools.Processors.TfsWorkItemMigrationProcessorOptions + code: There is no sample, but you can check the classic below for a general feel. + sampleFor: MigrationTools.Processors.TfsWorkItemOverwriteProcessorOptions - name: classic description: code: >- { - "$type": "TfsWorkItemMigrationProcessorOptions", + "$type": "TfsWorkItemOverwriteProcessorOptions", "Enabled": false, - "UpdateCreatedDate": true, - "UpdateCreatedBy": true, - "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc", - "FixHtmlAttachmentLinks": true, - "WorkItemCreateRetryLimit": 5, + "UpdateCreatedDate": false, + "UpdateCreatedBy": false, + "WIQLQuery": null, + "FixHtmlAttachmentLinks": false, + "WorkItemCreateRetryLimit": 0, "FilterWorkItemsThatAlreadyExistInTarget": false, "PauseAfterEachWorkItem": false, "AttachRevisionHistory": false, - "GenerateMigrationComment": true, + "GenerateMigrationComment": false, "WorkItemIDs": null, "MaxGracefulFailures": 0, "SkipRevisionWithInvalidIterationPath": false, "SkipRevisionWithInvalidAreaPath": false, "Enrichers": null, - "SourceName": "Source", - "TargetName": "Target", + "SourceName": null, + "TargetName": null, "RefName": null } - sampleFor: MigrationTools.Processors.TfsWorkItemMigrationProcessorOptions -description: WorkItemMigrationConfig is the main processor used to Migrate Work Items, Links, and Attachments. Use `WorkItemMigrationConfig` to configure. -className: TfsWorkItemMigrationProcessor + sampleFor: MigrationTools.Processors.TfsWorkItemOverwriteProcessorOptions +description: Reapply field mappings after a migration. Does not migtate Work Items, only reapplied changes to filed mappings. +className: TfsWorkItemOverwriteProcessor typeName: Processors architecture: options: @@ -161,7 +111,7 @@ options: type: IList description: A list of work items to import defaultValue: '[]' -status: ready +status: preview processingTarget: Work Items -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessor.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessorOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemOverwriteProcessor.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemOverwriteProcessorOptions.cs diff --git a/docs/_data/reference.processors.workitemmigrationprocessor.yaml b/docs/_data/reference.processors.workitemmigrationprocessor.yaml deleted file mode 100644 index 1bb9ebc06..000000000 --- a/docs/_data/reference.processors.workitemmigrationprocessor.yaml +++ /dev/null @@ -1,171 +0,0 @@ -optionsClassName: WorkItemMigrationProcessorOptions -optionsClassFullName: MigrationTools.Processors.WorkItemMigrationProcessorOptions -configurationSamples: -- name: confinguration.json - description: - code: >- - { - "MigrationTools": { - "Processors": [ - { - "ProcessorType": "WorkItemMigrationProcessor", - "Enabled": false, - "UpdateCreatedDate": true, - "UpdateCreatedBy": true, - "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc", - "FixHtmlAttachmentLinks": true, - "WorkItemCreateRetryLimit": 5, - "FilterWorkItemsThatAlreadyExistInTarget": false, - "PauseAfterEachWorkItem": false, - "AttachRevisionHistory": false, - "GenerateMigrationComment": true, - "WorkItemIDs": null, - "MaxGracefulFailures": 0, - "SkipRevisionWithInvalidIterationPath": false, - "SkipRevisionWithInvalidAreaPath": false, - "Enrichers": null, - "ProcessorEnrichers": null, - "SourceName": null, - "TargetName": null, - "RefName": null - } - ] - } - } - sampleFor: MigrationTools.Processors.WorkItemMigrationProcessorOptions -- name: defaults - description: - code: >- - { - "MigrationTools": { - "ProcessorDefaults": { - "WorkItemMigrationProcessor": { - "AttachRevisionHistory": "False", - "Enabled": "False", - "FilterWorkItemsThatAlreadyExistInTarget": "False", - "FixHtmlAttachmentLinks": "True", - "GenerateMigrationComment": "True", - "MaxGracefulFailures": "0", - "PauseAfterEachWorkItem": "False", - "SkipRevisionWithInvalidAreaPath": "False", - "SkipRevisionWithInvalidIterationPath": "False", - "UpdateCreatedBy": "True", - "UpdateCreatedDate": "True", - "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc", - "WorkItemCreateRetryLimit": "5", - "WorkItemIDs": null - } - } - } - } - sampleFor: MigrationTools.Processors.WorkItemMigrationProcessorOptions -- name: Classic - description: - code: >- - { - "$type": "WorkItemMigrationProcessorOptions", - "Enabled": false, - "UpdateCreatedDate": true, - "UpdateCreatedBy": true, - "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc", - "FixHtmlAttachmentLinks": true, - "WorkItemCreateRetryLimit": 5, - "FilterWorkItemsThatAlreadyExistInTarget": false, - "PauseAfterEachWorkItem": false, - "AttachRevisionHistory": false, - "GenerateMigrationComment": true, - "WorkItemIDs": null, - "MaxGracefulFailures": 0, - "SkipRevisionWithInvalidIterationPath": false, - "SkipRevisionWithInvalidAreaPath": false, - "Enrichers": null, - "ProcessorEnrichers": null, - "SourceName": null, - "TargetName": null - } - sampleFor: MigrationTools.Processors.WorkItemMigrationProcessorOptions -description: WorkItemMigrationConfig is the main processor used to Migrate Work Items, Links, and Attachments. Use `WorkItemMigrationConfig` to configure. -className: WorkItemMigrationProcessor -typeName: Processors -architecture: -options: -- parameterName: AttachRevisionHistory - type: Boolean - description: This will create a json file with the revision history and attach it to the work item. Best used with `MaxRevisions` or `ReplayRevisions`. - defaultValue: '?' -- parameterName: Enabled - type: Boolean - description: If set to `true` then the processor will run. Set to `false` and the processor will not run. - defaultValue: missng XML code comments -- parameterName: Enrichers - type: List - description: A list of enrichers that can augment the proccessing of the data - defaultValue: missng XML code comments -- parameterName: FilterWorkItemsThatAlreadyExistInTarget - type: Boolean - description: This loads all of the work items already saved to the Target and removes them from the Source work item list prior to commencing the run. While this may take some time in large data sets it reduces the time of the overall migration significantly if you need to restart. - defaultValue: true -- parameterName: FixHtmlAttachmentLinks - type: Boolean - description: "**beta** If enabled this will fix any image attachments URL's, work item mention URL's or user mentions in the HTML fields as well as discussion comments. You must specify a PersonalAccessToken in the Source project for Azure DevOps; TFS should use integrated authentication." - defaultValue: '?' -- parameterName: GenerateMigrationComment - type: Boolean - description: If enabled, adds a comment recording the migration - defaultValue: false -- parameterName: MaxGracefulFailures - type: Int32 - description: The maximum number of failures to tolerate before the migration fails. When set above zero, a work item migration error is logged but the migration will continue until the number of failed items reaches the configured value, after which the migration fails. - defaultValue: 0 -- parameterName: PauseAfterEachWorkItem - type: Boolean - description: Pause after each work item is migrated - defaultValue: false -- parameterName: ProcessorEnrichers - type: List - description: List of Enrichers that can be used to add more features to this processor. Only works with Native Processors and not legacy Processors. - defaultValue: missng XML code comments -- parameterName: RefName - type: String - description: '`Refname` will be used in the future to allow for using named Options without the need to copy all of the options.' - defaultValue: missng XML code comments -- parameterName: SkipRevisionWithInvalidAreaPath - type: Boolean - description: When set to true, this setting will skip a revision if the source area has not been migrated, has been deleted or is somehow invalid, etc. - defaultValue: missng XML code comments -- parameterName: SkipRevisionWithInvalidIterationPath - type: Boolean - description: This will skip a revision if the source iteration has not been migrated i.e. it was deleted - defaultValue: missng XML code comments -- parameterName: SourceName - type: String - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: TargetName - type: String - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: UpdateCreatedBy - type: Boolean - description: "If this is enabled the creation process on the target project will create the items with the original creation date. (Important: The item history is always pointed to the date of the migration, it's change only the data column CreateDate, not the internal create date)" - defaultValue: true -- parameterName: UpdateCreatedDate - type: Boolean - description: "If this is enabled the creation process on the target project will create the items with the original creation date. (Important: The item history is always pointed to the date of the migration, it's change only the data column CreateDate, not the internal create date)" - defaultValue: true -- parameterName: WIQLQuery - type: String - description: A work item query based on WIQL to select only important work items. To migrate all leave this empty. See [WIQL Query Bits](#wiql-query-bits) - defaultValue: SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [[System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc -- parameterName: WorkItemCreateRetryLimit - type: Int32 - description: '**beta** If set to a number greater than 0 work items that fail to save will retry after a number of seconds equal to the retry count. This allows for periodic network glitches not to end the process.' - defaultValue: 5 -- parameterName: WorkItemIDs - type: IList - description: A list of work items to import - defaultValue: '[]' -status: ready -processingTarget: Work Items -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemMigrationProcessor.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemMigrationProcessorOptions.cs diff --git a/docs/_data/reference.processors.workitempostprocessingprocessor.yaml b/docs/_data/reference.processors.workitempostprocessingprocessor.yaml deleted file mode 100644 index c27916db1..000000000 --- a/docs/_data/reference.processors.workitempostprocessingprocessor.yaml +++ /dev/null @@ -1,77 +0,0 @@ -optionsClassName: WorkItemPostProcessingProcessorOptions -optionsClassFullName: MigrationTools.Processors.WorkItemPostProcessingProcessorOptions -configurationSamples: -- name: defaults - description: - code: There are no defaults! Check the sample for options! - sampleFor: MigrationTools.Processors.WorkItemPostProcessingProcessorOptions -- name: sample - description: - code: There is no sample, but you can check the classic below for a general feel. - sampleFor: MigrationTools.Processors.WorkItemPostProcessingProcessorOptions -- name: classic - description: - code: >- - { - "$type": "WorkItemPostProcessingProcessorOptions", - "Enabled": false, - "WorkItemIDs": null, - "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [@ReflectedWorkItemIdFieldName] = '' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc", - "FilterWorkItemsThatAlreadyExistInTarget": false, - "PauseAfterEachWorkItem": false, - "WorkItemCreateRetryLimit": 0, - "Enrichers": null, - "SourceName": null, - "TargetName": null, - "RefName": null - } - sampleFor: MigrationTools.Processors.WorkItemPostProcessingProcessorOptions -description: Reapply field mappings after a migration. Does not migtate Work Items, only reapplied changes to filed mappings. -className: WorkItemPostProcessingProcessor -typeName: Processors -architecture: -options: -- parameterName: Enabled - type: Boolean - description: If set to `true` then the processor will run. Set to `false` and the processor will not run. - defaultValue: missng XML code comments -- parameterName: Enrichers - type: List - description: List of Enrichers that can be used to add more features to this processor. Only works with Native Processors and not legacy Processors. - defaultValue: missng XML code comments -- parameterName: FilterWorkItemsThatAlreadyExistInTarget - type: Boolean - description: This loads all of the work items already saved to the Target and removes them from the Source work item list prior to commencing the run. While this may take some time in large data sets it reduces the time of the overall migration significantly if you need to restart. - defaultValue: true -- parameterName: PauseAfterEachWorkItem - type: Boolean - description: Pause after each work item is migrated - defaultValue: false -- parameterName: RefName - type: String - description: '`Refname` will be used in the future to allow for using named Options without the need to copy all of the options.' - defaultValue: missng XML code comments -- parameterName: SourceName - type: String - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: TargetName - type: String - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: WIQLQuery - type: String - description: A work item query based on WIQL to select only important work items. To migrate all leave this empty. See [WIQL Query Bits](#wiql-query-bits) - defaultValue: AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') -- parameterName: WorkItemCreateRetryLimit - type: Int32 - description: '**beta** If set to a number greater than 0 work items that fail to save will retry after a number of seconds equal to the retry count. This allows for periodic network glitches not to end the process.' - defaultValue: 5 -- parameterName: WorkItemIDs - type: IList - description: A list of work items to import - defaultValue: '[]' -status: preview -processingTarget: Work Items -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemPostProcessingProcessor.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemPostProcessingProcessorOptions.cs diff --git a/docs/_data/reference.tools.gitrepomappingtool.yaml b/docs/_data/reference.tools.gitrepomappingtool.yaml deleted file mode 100644 index 3e2806daf..000000000 --- a/docs/_data/reference.tools.gitrepomappingtool.yaml +++ /dev/null @@ -1,37 +0,0 @@ -optionsClassName: GitRepoMappingToolOptions -optionsClassFullName: MigrationTools.Tools.GitRepoMappingToolOptions -configurationSamples: -- name: defaults - description: - code: There are no defaults! Check the sample for options! - sampleFor: MigrationTools.Tools.GitRepoMappingToolOptions -- name: sample - description: - code: There is no sample, but you can check the classic below for a general feel. - sampleFor: MigrationTools.Tools.GitRepoMappingToolOptions -- name: classic - description: - code: >- - { - "$type": "GitRepoMappingToolOptions", - "Enabled": false, - "Mappings": null - } - sampleFor: MigrationTools.Tools.GitRepoMappingToolOptions -description: Used to process the String fields of a work item. This is useful for cleaning up data. It will limit fields to a max length and apply regex replacements based on what is configured. Each regex replacement is applied in order and can be enabled or disabled. -className: GitRepoMappingTool -typeName: Tools -architecture: -options: -- parameterName: Enabled - type: Boolean - description: If set to `true` then the tool will run. Set to `false` and the processor will not run. - defaultValue: missng XML code comments -- parameterName: Mappings - type: Dictionary - description: List of work item mappings. - defaultValue: '{}' -status: missng XML code comments -processingTarget: missng XML code comments -classFile: /src/MigrationTools/Tools/GitRepoMappingTool.cs -optionsClassFile: /src/MigrationTools/Tools/GitRepoMappingToolOptions.cs diff --git a/docs/_data/reference.tools.itool.yaml b/docs/_data/reference.tools.itool.yaml deleted file mode 100644 index 520ccf441..000000000 --- a/docs/_data/reference.tools.itool.yaml +++ /dev/null @@ -1,12 +0,0 @@ -optionsClassName: -optionsClassFullName: -configurationSamples: [] -description: missng XML code comments -className: ITool -typeName: Tools -architecture: v1 -options: [] -status: missng XML code comments -processingTarget: missng XML code comments -classFile: /src/MigrationTools/Tools/Infra/ITool.cs -optionsClassFile: diff --git a/docs/collections/_reference/reference.endpoints.generictfsendpoint`1.md b/docs/collections/_reference/reference.endpoints.generictfsendpoint`1.md deleted file mode 100644 index 4130f26bb..000000000 --- a/docs/collections/_reference/reference.endpoints.generictfsendpoint`1.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -optionsClassName: -optionsClassFullName: -configurationSamples: [] -description: missng XML code comments -className: GenericTfsEndpoint`1 -typeName: Endpoints -architecture: v2 -options: [] -status: missng XML code comments -processingTarget: missng XML code comments -classFile: '' -optionsClassFile: - -redirectFrom: -- /Reference/v2/Endpoints// -layout: reference -toc: true -permalink: /Reference/Endpoints/GenericTfsEndpoint`1/ -title: GenericTfsEndpoint`1 -categories: -- Endpoints -- v2 -topics: -- topic: notes - path: /Endpoints/GenericTfsEndpoint`1-notes.md - exists: false - markdown: '' -- topic: introduction - path: /Endpoints/GenericTfsEndpoint`1-introduction.md - exists: false - markdown: '' - ---- \ No newline at end of file diff --git a/docs/collections/_reference/reference.endpoints.tfsendpoint.md b/docs/collections/_reference/reference.endpoints.tfsendpoint.md index 27fc723f5..4d3d2cc77 100644 --- a/docs/collections/_reference/reference.endpoints.tfsendpoint.md +++ b/docs/collections/_reference/reference.endpoints.tfsendpoint.md @@ -59,8 +59,8 @@ options: defaultValue: missng XML code comments status: missng XML code comments processingTarget: missng XML code comments -classFile: /src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsEndpoint.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsEndpointOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/EndPoints/TfsEndpoint.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/EndPoints/TfsEndpointOptions.cs redirectFrom: - /Reference/Endpoints/TfsEndpointOptions/ diff --git a/docs/collections/_reference/reference.endpoints.tfsmigrationclient.md b/docs/collections/_reference/reference.endpoints.tfsmigrationclient.md deleted file mode 100644 index 11eb9ffed..000000000 --- a/docs/collections/_reference/reference.endpoints.tfsmigrationclient.md +++ /dev/null @@ -1,123 +0,0 @@ ---- -optionsClassName: TfsMigrationClient -optionsClassFullName: MigrationTools.Clients.TfsMigrationClient -configurationSamples: -- name: defaults - description: - code: >- - { - "MigrationTools": { - "EndpointDefaults": { - "TfsMigrationClient": [] - } - } - } - sampleFor: MigrationTools.Clients.TfsMigrationClient -- name: sample - description: - code: >- - { - "MigrationTools": { - "EndpointDefaults": { - "TfsMigrationClient": [] - } - } - } - sampleFor: MigrationTools.Clients.TfsMigrationClient -- name: classic - description: - code: >- - { - "$type": "TfsMigrationClient", - "Enabled": false, - "TfsConfig": null, - "Config": null, - "WorkItems": null, - "TestPlans": null, - "Credentials": { - "PromptType": 0, - "Federated": null, - "Windows": { - "Credentials": { - "UserName": "", - "Password": "", - "SecurePassword": { - "Length": 0 - }, - "Domain": "" - }, - "CredentialType": 0, - "UseDefaultCredentials": true - }, - "Storage": null - }, - "InternalCollection": null, - "Name": null, - "EndpointEnrichers": null - } - sampleFor: MigrationTools.Clients.TfsMigrationClient -description: missng XML code comments -className: TfsMigrationClient -typeName: Endpoints -architecture: -options: -- parameterName: Config - type: IEndpointOptions - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: Credentials - type: VssCredentials - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: Enabled - type: Boolean - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: EndpointEnrichers - type: List - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: InternalCollection - type: Object - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: Name - type: String - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: TestPlans - type: ITestPlanMigrationClient - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: TfsConfig - type: TfsTeamProjectEndpointOptions - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: WorkItems - type: IWorkItemMigrationClient - description: missng XML code comments - defaultValue: missng XML code comments -status: missng XML code comments -processingTarget: missng XML code comments -classFile: /src/MigrationTools.Clients.TfsObjectModel/Clients/TfsMigrationClient.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Clients/TfsMigrationClient.cs - -redirectFrom: [] -layout: reference -toc: true -permalink: /Reference/Endpoints/TfsMigrationClient/ -title: TfsMigrationClient -categories: -- Endpoints -- -topics: -- topic: notes - path: /docs/Reference/Endpoints/TfsMigrationClient-notes.md - exists: false - markdown: '' -- topic: introduction - path: /docs/Reference/Endpoints/TfsMigrationClient-introduction.md - exists: false - markdown: '' - ---- \ No newline at end of file diff --git a/docs/collections/_reference/reference.endpoints.tfsteamprojectendpoint.md b/docs/collections/_reference/reference.endpoints.tfsteamprojectendpoint.md index b4976fa03..1e735ef02 100644 --- a/docs/collections/_reference/reference.endpoints.tfsteamprojectendpoint.md +++ b/docs/collections/_reference/reference.endpoints.tfsteamprojectendpoint.md @@ -125,8 +125,8 @@ options: defaultValue: missng XML code comments status: missng XML code comments processingTarget: missng XML code comments -classFile: /src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsTeamProjectEndpoint.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsTeamProjectEndPointOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/EndPoints/TfsTeamProjectEndpoint.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/EndPoints/TfsTeamProjectEndPointOptions.cs redirectFrom: - /Reference/Endpoints/TfsTeamProjectEndpointOptions/ diff --git a/docs/collections/_reference/reference.endpoints.tfsteamsettingsendpoint.md b/docs/collections/_reference/reference.endpoints.tfsteamsettingsendpoint.md index 7b572b909..0f03e9859 100644 --- a/docs/collections/_reference/reference.endpoints.tfsteamsettingsendpoint.md +++ b/docs/collections/_reference/reference.endpoints.tfsteamsettingsendpoint.md @@ -59,8 +59,8 @@ options: defaultValue: missng XML code comments status: missng XML code comments processingTarget: missng XML code comments -classFile: /src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsTeamSettingsEndpoint.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsTeamSettingsEndpointOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/EndPoints/TfsTeamSettingsEndpoint.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/EndPoints/TfsTeamSettingsEndpointOptions.cs redirectFrom: - /Reference/Endpoints/TfsTeamSettingsEndpointOptions/ diff --git a/docs/collections/_reference/reference.endpoints.tfsworkitemendpoint.md b/docs/collections/_reference/reference.endpoints.tfsworkitemendpoint.md index 0e8031a2c..3abcce2e0 100644 --- a/docs/collections/_reference/reference.endpoints.tfsworkitemendpoint.md +++ b/docs/collections/_reference/reference.endpoints.tfsworkitemendpoint.md @@ -64,8 +64,8 @@ options: defaultValue: missng XML code comments status: missng XML code comments processingTarget: missng XML code comments -classFile: /src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsWorkItemEndpoint.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsWorkItemEndpointOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/EndPoints/TfsWorkItemEndpoint.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/EndPoints/TfsWorkItemEndpointOptions.cs redirectFrom: - /Reference/Endpoints/TfsWorkItemEndpointOptions/ diff --git a/docs/collections/_reference/reference.fieldmaps.fieldvaluetotagmap.md b/docs/collections/_reference/reference.fieldmaps.fieldvaluetotagmap.md deleted file mode 100644 index 9e7b2efb6..000000000 --- a/docs/collections/_reference/reference.fieldmaps.fieldvaluetotagmap.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -optionsClassName: FieldValuetoTagMapOptions -optionsClassFullName: MigrationTools.Tools.FieldValuetoTagMapOptions -configurationSamples: -- name: defaults - description: - code: >- - { - "MigrationTools": { - "CommonTools": { - "FieldMappingTool": { - "FieldMapDefaults": { - "FieldValuetoTagMap": [] - } - } - } - } - } - sampleFor: MigrationTools.Tools.FieldValuetoTagMapOptions -- name: sample - description: - code: >- - { - "MigrationTools": { - "CommonTools": { - "FieldMappingTool": { - "FieldMapDefaults": { - "FieldValuetoTagMap": [] - } - } - } - } - } - sampleFor: MigrationTools.Tools.FieldValuetoTagMapOptions -- name: classic - description: - code: >- - { - "$type": "FieldValuetoTagMapOptions", - "sourceField": null, - "pattern": null, - "formatExpression": null, - "ApplyTo": [] - } - sampleFor: MigrationTools.Tools.FieldValuetoTagMapOptions -description: missng XML code comments -className: FieldValuetoTagMap -typeName: FieldMaps -architecture: -options: -- parameterName: ApplyTo - type: List - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: formatExpression - type: String - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: pattern - type: String - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: sourceField - type: String - description: missng XML code comments - defaultValue: missng XML code comments -status: missng XML code comments -processingTarget: missng XML code comments -classFile: /src/MigrationTools.Clients.TfsObjectModel/Tools/FieldMappingTool/FieldMaps/FieldValuetoTagMap.cs -optionsClassFile: /src/MigrationTools/Tools/FieldMappingTool/FieldMaps/FieldValuetoTagMapOptions.cs - -redirectFrom: -- /Reference/FieldMaps/FieldValuetoTagMapOptions/ -layout: reference -toc: true -permalink: /Reference/FieldMaps/FieldValuetoTagMap/ -title: FieldValuetoTagMap -categories: -- FieldMaps -- -topics: -- topic: notes - path: /docs/Reference/FieldMaps/FieldValuetoTagMap-notes.md - exists: false - markdown: '' -- topic: introduction - path: /docs/Reference/FieldMaps/FieldValuetoTagMap-introduction.md - exists: false - markdown: '' - ---- \ No newline at end of file diff --git a/docs/collections/_reference/reference.processors.createteamfolders.md b/docs/collections/_reference/reference.processors.createteamfolders.md deleted file mode 100644 index 17c88acee..000000000 --- a/docs/collections/_reference/reference.processors.createteamfolders.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -optionsClassName: -optionsClassFullName: -configurationSamples: [] -description: Creates folders in Sared Queries for each Team -className: CreateTeamFolders -typeName: Processors -architecture: v1 -options: [] -status: alpha -processingTarget: Shared Queries -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/CreateTeamFoldersProcessor.cs -optionsClassFile: - -redirectFrom: -- /Reference/v1/Processors// -layout: reference -toc: true -permalink: /Reference/Processors/CreateTeamFolders/ -title: CreateTeamFolders -categories: -- Processors -- v1 -topics: -- topic: notes - path: /Processors/CreateTeamFolders-notes.md - exists: false - markdown: '' -- topic: introduction - path: /Processors/CreateTeamFolders-introduction.md - exists: false - markdown: '' - ---- \ No newline at end of file diff --git a/docs/collections/_reference/reference.processors.exportteamlistprocessor.md b/docs/collections/_reference/reference.processors.exportteamlistprocessor.md deleted file mode 100644 index d3e2dc84c..000000000 --- a/docs/collections/_reference/reference.processors.exportteamlistprocessor.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -optionsClassName: -optionsClassFullName: -configurationSamples: [] -description: missng XML code comments -className: ExportTeamListProcessor -typeName: Processors -architecture: v1 -options: [] -status: missng XML code comments -processingTarget: missng XML code comments -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/ExportTeamListProcessor.cs -optionsClassFile: - -redirectFrom: -- /Reference/v1/Processors// -layout: reference -toc: true -permalink: /Reference/Processors/ExportTeamListProcessor/ -title: ExportTeamListProcessor -categories: -- Processors -- v1 -topics: -- topic: notes - path: /Processors/ExportTeamListProcessor-notes.md - exists: false - markdown: '' -- topic: introduction - path: /Processors/ExportTeamListProcessor-introduction.md - exists: false - markdown: '' - ---- \ No newline at end of file diff --git a/docs/collections/_reference/reference.processors.exportusersformappingprocessor.md b/docs/collections/_reference/reference.processors.exportusersformappingprocessor.md deleted file mode 100644 index 2deeded6b..000000000 --- a/docs/collections/_reference/reference.processors.exportusersformappingprocessor.md +++ /dev/null @@ -1,202 +0,0 @@ ---- -optionsClassName: ExportUsersForMappingProcessorOptions -optionsClassFullName: MigrationTools.Processors.ExportUsersForMappingProcessorOptions -configurationSamples: -- name: defaults - description: - code: There are no defaults! Check the sample for options! - sampleFor: MigrationTools.Processors.ExportUsersForMappingProcessorOptions -- name: sample - description: - code: >- - { - "MigrationTools": { - "Processors": [ - { - "ProcessorType": "ExportUsersForMappingProcessor", - "Enabled": "True", - "OnlyListUsersInWorkItems": "True", - "SourceName": "Source", - "TargetName": "Target", - "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc" - } - ] - } - } - sampleFor: MigrationTools.Processors.ExportUsersForMappingProcessorOptions -- name: classic - description: - code: >- - { - "$type": "ExportUsersForMappingProcessorOptions", - "Enabled": true, - "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc", - "OnlyListUsersInWorkItems": true, - "Enrichers": null, - "SourceName": "Source", - "TargetName": "Target", - "RefName": null - } - sampleFor: MigrationTools.Processors.ExportUsersForMappingProcessorOptions -description: ExportUsersForMappingContext is a tool used to create a starter mapping file for users between the source and target systems. Use `ExportUsersForMappingConfig` to configure. -className: ExportUsersForMappingProcessor -typeName: Processors -architecture: -options: -- parameterName: Enabled - type: Boolean - description: If set to `true` then the processor will run. Set to `false` and the processor will not run. - defaultValue: missng XML code comments -- parameterName: Enrichers - type: List - description: List of Enrichers that can be used to add more features to this processor. Only works with Native Processors and not legacy Processors. - defaultValue: missng XML code comments -- parameterName: OnlyListUsersInWorkItems - type: Boolean - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: RefName - type: String - description: '`Refname` will be used in the future to allow for using named Options without the need to copy all of the options.' - defaultValue: missng XML code comments -- parameterName: SourceName - type: String - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: TargetName - type: String - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: WIQLQuery - type: String - description: missng XML code comments - defaultValue: missng XML code comments -status: ready -processingTarget: Work Items -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/ExportUsersForMappingProcessor.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/ExportUsersForMappingProcessorOptions.cs - -redirectFrom: -- /Reference/Processors/ExportUsersForMappingProcessorOptions/ -layout: reference -toc: true -permalink: /Reference/Processors/ExportUsersForMappingProcessor/ -title: ExportUsersForMappingProcessor -categories: -- Processors -- -topics: -- topic: notes - path: /docs/Reference/Processors/ExportUsersForMappingProcessor-notes.md - exists: true - markdown: >- - There was a request to have the ability to map users to try and maintain integrity across different systems. We added a `TfsUserMappingEnricher` that allows you to map users from Source to Target. - - - ##How it works - - - 1. Run `ExportUsersForMappingConfig` which will export all of the Users in Source Mapped or not to target. - - 2. Run `WorkItemMigrationConfig` which will run a validator by detail to warn you of missing users. If it finds a mapping it will convert the field... - - - ## ExportUsersForMappingConfig - - - Running the `ExportUsersForMappingConfig` to get the list of users will produce something like: - - - ``` - - [ - { - "Source": { - "FriendlyName": "Martin Hinshelwood nkdAgility.com", - "AccountName": "martin@nkdagility.com" - }, - "target": { - "FriendlyName": "Hinshelwood, Martin", - "AccountName": "martin@othercompany.com" - } - }, - { - "Source": { - "FriendlyName": "Rollup Bot", - "AccountName": "Bot@nkdagility.com" - }, - "target": { - "FriendlyName": "Service Account 4", - "AccountName": "randoaccount@somecompany.com" - } - }, - { - "Source": { - "FriendlyName": "Another non mapped Account", - "AccountName": "not-mapped@nkdagility.com" - }, - "target": null - } - ] - - ``` - - - Any `null` in the target field means that the user is not mapped. You can then use this to create a mapping file will all of your users. - - - IMPORTANT: The Friendly name in Azure DevOps / TFS is not nessesarily the AAD Friendly name as users can change this in the tool. We load all of the users from both systems, and match on "email" to ensure we only assume mapping for the same user. Non mapped users, or users listed as null, will not be mapped. - - - ### Notes - - - - On `ExportUsersForMappingConfig` you can set `OnlyListUsersInWorkItems` to filter the mapping based on the scope of the query. This is greater if you have many users. - - - Configured using the `TfsUserMappingEnricherOptions` setting in `CommonEnrichersConfig` - - - ## WorkItemMigrationConfig - - - When you run the `WorkItemMigrationContext` - - - - ``` - - ... - "LogLevel": "Debug", - "CommonEnrichersConfig": [ - { - "$type": "TfsUserMappingEnricherOptions", - "Enabled": true, - "UserMappingFile": "C:\\temp\\userExport.json", - "IdentityFieldsToCheck": [ - "System.AssignedTo", - "System.ChangedBy", - "System.CreatedBy", - "Microsoft.VSTS.Common.ActivatedBy", - "Microsoft.VSTS.Common.ResolvedBy", - "Microsoft.VSTS.Common.ClosedBy" - ] - } - ], - ... - - ``` - - - - ### Notes - - - - Configured using the `TfsUserMappingEnricherOptions` setting in `CommonEnrichersConfig` - - - Applies to all identity fields specified in the list -- topic: introduction - path: /docs/Reference/Processors/ExportUsersForMappingProcessor-introduction.md - exists: false - markdown: '' - ---- \ No newline at end of file diff --git a/docs/collections/_reference/reference.processors.fakeprocessor.md b/docs/collections/_reference/reference.processors.fakeprocessor.md deleted file mode 100644 index edf5b2dac..000000000 --- a/docs/collections/_reference/reference.processors.fakeprocessor.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -optionsClassName: -optionsClassFullName: -configurationSamples: [] -description: "Note: this is only for internal usage. Don't use this in your configurations." -className: FakeProcessor -typeName: Processors -architecture: v1 -options: [] -status: missng XML code comments -processingTarget: missng XML code comments -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/FakeProcessor.cs -optionsClassFile: - -redirectFrom: -- /Reference/v1/Processors// -layout: reference -toc: true -permalink: /Reference/Processors/FakeProcessor/ -title: FakeProcessor -categories: -- Processors -- v1 -topics: -- topic: notes - path: /Processors/FakeProcessor-notes.md - exists: false - markdown: '' -- topic: introduction - path: /Processors/FakeProcessor-introduction.md - exists: false - markdown: '' - ---- \ No newline at end of file diff --git a/docs/collections/_reference/reference.processors.fixgitcommitlinksprocessor.md b/docs/collections/_reference/reference.processors.fixgitcommitlinksprocessor.md deleted file mode 100644 index 2a5304e23..000000000 --- a/docs/collections/_reference/reference.processors.fixgitcommitlinksprocessor.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -optionsClassName: FixGitCommitLinksProcessorOptions -optionsClassFullName: MigrationTools.Processors.FixGitCommitLinksProcessorOptions -configurationSamples: -- name: defaults - description: - code: >- - { - "MigrationTools": { - "ProcessorDefaults": { - "FixGitCommitLinksProcessor": [] - } - } - } - sampleFor: MigrationTools.Processors.FixGitCommitLinksProcessorOptions -- name: sample - description: - code: >- - { - "MigrationTools": { - "ProcessorDefaults": { - "FixGitCommitLinksProcessor": [] - } - } - } - sampleFor: MigrationTools.Processors.FixGitCommitLinksProcessorOptions -- name: classic - description: - code: >- - { - "$type": "FixGitCommitLinksProcessorOptions", - "Enabled": false, - "TargetRepository": null, - "Query": null, - "Enrichers": null, - "ProcessorEnrichers": null, - "SourceName": null, - "TargetName": null, - "RefName": null - } - sampleFor: MigrationTools.Processors.FixGitCommitLinksProcessorOptions -description: missng XML code comments -className: FixGitCommitLinksProcessor -typeName: Processors -architecture: -options: -- parameterName: Enabled - type: Boolean - description: If set to `true` then the processor will run. Set to `false` and the processor will not run. - defaultValue: missng XML code comments -- parameterName: Enrichers - type: List - description: A list of enrichers that can augment the proccessing of the data - defaultValue: missng XML code comments -- parameterName: ProcessorEnrichers - type: List - description: List of Enrichers that can be used to add more features to this processor. Only works with Native Processors and not legacy Processors. - defaultValue: missng XML code comments -- parameterName: Query - type: String - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: RefName - type: String - description: '`Refname` will be used in the future to allow for using named Options without the need to copy all of the options.' - defaultValue: missng XML code comments -- parameterName: SourceName - type: String - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: TargetName - type: String - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: TargetRepository - type: String - description: missng XML code comments - defaultValue: missng XML code comments -status: missng XML code comments -processingTarget: missng XML code comments -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/FixGitCommitLinksProcessor.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/FixGitCommitLinksProcessorOptions.cs - -redirectFrom: -- /Reference/Processors/FixGitCommitLinksProcessorOptions/ -layout: reference -toc: true -permalink: /Reference/Processors/FixGitCommitLinksProcessor/ -title: FixGitCommitLinksProcessor -categories: -- Processors -- -topics: -- topic: notes - path: /docs/Reference/Processors/FixGitCommitLinksProcessor-notes.md - exists: false - markdown: '' -- topic: introduction - path: /docs/Reference/Processors/FixGitCommitLinksProcessor-introduction.md - exists: false - markdown: '' - ---- \ No newline at end of file diff --git a/docs/collections/_reference/reference.processors.keepoutboundlinktargetprocessor.md b/docs/collections/_reference/reference.processors.keepoutboundlinktargetprocessor.md index bdb777618..82a73d8f8 100644 --- a/docs/collections/_reference/reference.processors.keepoutboundlinktargetprocessor.md +++ b/docs/collections/_reference/reference.processors.keepoutboundlinktargetprocessor.md @@ -18,7 +18,7 @@ configurationSamples: "Enabled": false, "WIQLQuery": "Select [System.Id] From WorkItems Where [System.TeamProject] = @project and not [System.WorkItemType] contains 'Test Suite, Test Plan,Shared Steps,Shared Parameter,Feedback Request'", "TargetLinksToKeepOrganization": "https://dev.azure.com/nkdagility", - "TargetLinksToKeepProject": "7dd43083-3ca7-4e5f-8ec6-f0544ed80445", + "TargetLinksToKeepProject": "9fe99d20-153f-4861-9eee-c0cc7ab8de4d", "CleanupFileName": "c:/temp/OutboundLinkTargets.bat", "PrependCommand": "start", "DryRun": true, diff --git a/docs/collections/_reference/reference.processors.exportprofilepicturefromadprocessor.md b/docs/collections/_reference/reference.processors.tfsexportprofilepicturefromadprocessor.md similarity index 71% rename from docs/collections/_reference/reference.processors.exportprofilepicturefromadprocessor.md rename to docs/collections/_reference/reference.processors.tfsexportprofilepicturefromadprocessor.md index 8136e5895..1e9bd2f30 100644 --- a/docs/collections/_reference/reference.processors.exportprofilepicturefromadprocessor.md +++ b/docs/collections/_reference/reference.processors.tfsexportprofilepicturefromadprocessor.md @@ -1,20 +1,20 @@ --- -optionsClassName: ExportProfilePictureFromADProcessorOptions -optionsClassFullName: MigrationTools.Processors.ExportProfilePictureFromADProcessorOptions +optionsClassName: TfsExportProfilePictureFromADProcessorOptions +optionsClassFullName: MigrationTools.Processors.TfsExportProfilePictureFromADProcessorOptions configurationSamples: - name: defaults description: code: There are no defaults! Check the sample for options! - sampleFor: MigrationTools.Processors.ExportProfilePictureFromADProcessorOptions + sampleFor: MigrationTools.Processors.TfsExportProfilePictureFromADProcessorOptions - name: sample description: code: There is no sample, but you can check the classic below for a general feel. - sampleFor: MigrationTools.Processors.ExportProfilePictureFromADProcessorOptions + sampleFor: MigrationTools.Processors.TfsExportProfilePictureFromADProcessorOptions - name: classic description: code: >- { - "$type": "ExportProfilePictureFromADProcessorOptions", + "$type": "TfsExportProfilePictureFromADProcessorOptions", "Enabled": false, "Domain": null, "Username": null, @@ -25,9 +25,9 @@ configurationSamples: "TargetName": null, "RefName": null } - sampleFor: MigrationTools.Processors.ExportProfilePictureFromADProcessorOptions + sampleFor: MigrationTools.Processors.TfsExportProfilePictureFromADProcessorOptions description: Downloads corporate images and updates TFS/Azure DevOps profiles -className: ExportProfilePictureFromADProcessor +className: TfsExportProfilePictureFromADProcessor typeName: Processors architecture: options: @@ -69,25 +69,25 @@ options: defaultValue: String.Empty status: alpha processingTarget: Profiles -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/ExportProfilePictureFromADProcessor.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/ExportProfilePictureFromADProcessorOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsExportProfilePictureFromADProcessor.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsExportProfilePictureFromADProcessorOptions.cs redirectFrom: -- /Reference/Processors/ExportProfilePictureFromADProcessorOptions/ +- /Reference/Processors/TfsExportProfilePictureFromADProcessorOptions/ layout: reference toc: true -permalink: /Reference/Processors/ExportProfilePictureFromADProcessor/ -title: ExportProfilePictureFromADProcessor +permalink: /Reference/Processors/TfsExportProfilePictureFromADProcessor/ +title: TfsExportProfilePictureFromADProcessor categories: - Processors - topics: - topic: notes - path: /docs/Reference/Processors/ExportProfilePictureFromADProcessor-notes.md + path: /docs/Reference/Processors/TfsExportProfilePictureFromADProcessor-notes.md exists: false markdown: '' - topic: introduction - path: /docs/Reference/Processors/ExportProfilePictureFromADProcessor-introduction.md + path: /docs/Reference/Processors/TfsExportProfilePictureFromADProcessor-introduction.md exists: false markdown: '' diff --git a/docs/_data/reference.processors.exportusersformappingprocessor.yaml b/docs/collections/_reference/reference.processors.tfsexportusersformappingprocessor.md similarity index 55% rename from docs/_data/reference.processors.exportusersformappingprocessor.yaml rename to docs/collections/_reference/reference.processors.tfsexportusersformappingprocessor.md index 8df605acd..adf61063f 100644 --- a/docs/_data/reference.processors.exportusersformappingprocessor.yaml +++ b/docs/collections/_reference/reference.processors.tfsexportusersformappingprocessor.md @@ -1,44 +1,31 @@ -optionsClassName: ExportUsersForMappingProcessorOptions -optionsClassFullName: MigrationTools.Processors.ExportUsersForMappingProcessorOptions +--- +optionsClassName: TfsExportUsersForMappingProcessorOptions +optionsClassFullName: MigrationTools.Processors.TfsExportUsersForMappingProcessorOptions configurationSamples: - name: defaults description: code: There are no defaults! Check the sample for options! - sampleFor: MigrationTools.Processors.ExportUsersForMappingProcessorOptions + sampleFor: MigrationTools.Processors.TfsExportUsersForMappingProcessorOptions - name: sample description: - code: >- - { - "MigrationTools": { - "Processors": [ - { - "ProcessorType": "ExportUsersForMappingProcessor", - "Enabled": "True", - "OnlyListUsersInWorkItems": "True", - "SourceName": "Source", - "TargetName": "Target", - "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc" - } - ] - } - } - sampleFor: MigrationTools.Processors.ExportUsersForMappingProcessorOptions + code: There is no sample, but you can check the classic below for a general feel. + sampleFor: MigrationTools.Processors.TfsExportUsersForMappingProcessorOptions - name: classic description: code: >- { - "$type": "ExportUsersForMappingProcessorOptions", - "Enabled": true, - "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc", + "$type": "TfsExportUsersForMappingProcessorOptions", + "Enabled": false, + "WIQLQuery": null, "OnlyListUsersInWorkItems": true, "Enrichers": null, - "SourceName": "Source", - "TargetName": "Target", + "SourceName": null, + "TargetName": null, "RefName": null } - sampleFor: MigrationTools.Processors.ExportUsersForMappingProcessorOptions + sampleFor: MigrationTools.Processors.TfsExportUsersForMappingProcessorOptions description: ExportUsersForMappingContext is a tool used to create a starter mapping file for users between the source and target systems. Use `ExportUsersForMappingConfig` to configure. -className: ExportUsersForMappingProcessor +className: TfsExportUsersForMappingProcessor typeName: Processors architecture: options: @@ -72,5 +59,26 @@ options: defaultValue: missng XML code comments status: ready processingTarget: Work Items -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/ExportUsersForMappingProcessor.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/ExportUsersForMappingProcessorOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsExportUsersForMappingProcessor.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsExportUsersForMappingProcessorOptions.cs + +redirectFrom: +- /Reference/Processors/TfsExportUsersForMappingProcessorOptions/ +layout: reference +toc: true +permalink: /Reference/Processors/TfsExportUsersForMappingProcessor/ +title: TfsExportUsersForMappingProcessor +categories: +- Processors +- +topics: +- topic: notes + path: /docs/Reference/Processors/TfsExportUsersForMappingProcessor-notes.md + exists: false + markdown: '' +- topic: introduction + path: /docs/Reference/Processors/TfsExportUsersForMappingProcessor-introduction.md + exists: false + markdown: '' + +--- \ No newline at end of file diff --git a/docs/collections/_reference/reference.processors.importprofilepictureprocessor.md b/docs/collections/_reference/reference.processors.tfsimportprofilepictureprocessor.md similarity index 66% rename from docs/collections/_reference/reference.processors.importprofilepictureprocessor.md rename to docs/collections/_reference/reference.processors.tfsimportprofilepictureprocessor.md index fe2b81c82..497aab0e1 100644 --- a/docs/collections/_reference/reference.processors.importprofilepictureprocessor.md +++ b/docs/collections/_reference/reference.processors.tfsimportprofilepictureprocessor.md @@ -1,29 +1,29 @@ --- -optionsClassName: ImportProfilePictureProcessorOptions -optionsClassFullName: MigrationTools.Processors.ImportProfilePictureProcessorOptions +optionsClassName: TfsImportProfilePictureProcessorOptions +optionsClassFullName: MigrationTools.Processors.TfsImportProfilePictureProcessorOptions configurationSamples: - name: defaults description: code: There are no defaults! Check the sample for options! - sampleFor: MigrationTools.Processors.ImportProfilePictureProcessorOptions + sampleFor: MigrationTools.Processors.TfsImportProfilePictureProcessorOptions - name: sample description: code: There is no sample, but you can check the classic below for a general feel. - sampleFor: MigrationTools.Processors.ImportProfilePictureProcessorOptions + sampleFor: MigrationTools.Processors.TfsImportProfilePictureProcessorOptions - name: classic description: code: >- { - "$type": "ImportProfilePictureProcessorOptions", + "$type": "TfsImportProfilePictureProcessorOptions", "Enabled": false, "Enrichers": null, "SourceName": null, "TargetName": null, "RefName": null } - sampleFor: MigrationTools.Processors.ImportProfilePictureProcessorOptions + sampleFor: MigrationTools.Processors.TfsImportProfilePictureProcessorOptions description: Downloads corporate images and updates TFS/Azure DevOps profiles -className: ImportProfilePictureProcessor +className: TfsImportProfilePictureProcessor typeName: Processors architecture: options: @@ -49,25 +49,25 @@ options: defaultValue: missng XML code comments status: alpha processingTarget: Profiles -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/ImportProfilePictureProcessor.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/ImportProfilePictureProcessorOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsImportProfilePictureProcessor.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsImportProfilePictureProcessorOptions.cs redirectFrom: -- /Reference/Processors/ImportProfilePictureProcessorOptions/ +- /Reference/Processors/TfsImportProfilePictureProcessorOptions/ layout: reference toc: true -permalink: /Reference/Processors/ImportProfilePictureProcessor/ -title: ImportProfilePictureProcessor +permalink: /Reference/Processors/TfsImportProfilePictureProcessor/ +title: TfsImportProfilePictureProcessor categories: - Processors - topics: - topic: notes - path: /docs/Reference/Processors/ImportProfilePictureProcessor-notes.md + path: /docs/Reference/Processors/TfsImportProfilePictureProcessor-notes.md exists: false markdown: '' - topic: introduction - path: /docs/Reference/Processors/ImportProfilePictureProcessor-introduction.md + path: /docs/Reference/Processors/TfsImportProfilePictureProcessor-introduction.md exists: false markdown: '' diff --git a/docs/collections/_reference/reference.processors.testconfigurationsmigrationprocessor.md b/docs/collections/_reference/reference.processors.tfstestconfigurationsmigrationprocessor.md similarity index 64% rename from docs/collections/_reference/reference.processors.testconfigurationsmigrationprocessor.md rename to docs/collections/_reference/reference.processors.tfstestconfigurationsmigrationprocessor.md index 1f687336c..f051b92f2 100644 --- a/docs/collections/_reference/reference.processors.testconfigurationsmigrationprocessor.md +++ b/docs/collections/_reference/reference.processors.tfstestconfigurationsmigrationprocessor.md @@ -1,29 +1,29 @@ --- -optionsClassName: TestConfigurationsMigrationProcessorOptions -optionsClassFullName: MigrationTools.Processors.TestConfigurationsMigrationProcessorOptions +optionsClassName: TfsTestConfigurationsMigrationProcessorOptions +optionsClassFullName: MigrationTools.Processors.TfsTestConfigurationsMigrationProcessorOptions configurationSamples: - name: defaults description: code: There are no defaults! Check the sample for options! - sampleFor: MigrationTools.Processors.TestConfigurationsMigrationProcessorOptions + sampleFor: MigrationTools.Processors.TfsTestConfigurationsMigrationProcessorOptions - name: sample description: code: There is no sample, but you can check the classic below for a general feel. - sampleFor: MigrationTools.Processors.TestConfigurationsMigrationProcessorOptions + sampleFor: MigrationTools.Processors.TfsTestConfigurationsMigrationProcessorOptions - name: classic description: code: >- { - "$type": "TestConfigurationsMigrationProcessorOptions", + "$type": "TfsTestConfigurationsMigrationProcessorOptions", "Enabled": false, "Enrichers": null, "SourceName": null, "TargetName": null, "RefName": null } - sampleFor: MigrationTools.Processors.TestConfigurationsMigrationProcessorOptions + sampleFor: MigrationTools.Processors.TfsTestConfigurationsMigrationProcessorOptions description: This processor can migrate `test configuration`. This should be run before `LinkMigrationConfig`. -className: TestConfigurationsMigrationProcessor +className: TfsTestConfigurationsMigrationProcessor typeName: Processors architecture: options: @@ -49,25 +49,25 @@ options: defaultValue: missng XML code comments status: Beta processingTarget: Suites & Plans -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TestConfigurationsMigrationProcessor.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TestConfigurationsMigrationProcessorOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestConfigurationsMigrationProcessor.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestConfigurationsMigrationProcessorOptions.cs redirectFrom: -- /Reference/Processors/TestConfigurationsMigrationProcessorOptions/ +- /Reference/Processors/TfsTestConfigurationsMigrationProcessorOptions/ layout: reference toc: true -permalink: /Reference/Processors/TestConfigurationsMigrationProcessor/ -title: TestConfigurationsMigrationProcessor +permalink: /Reference/Processors/TfsTestConfigurationsMigrationProcessor/ +title: TfsTestConfigurationsMigrationProcessor categories: - Processors - topics: - topic: notes - path: /docs/Reference/Processors/TestConfigurationsMigrationProcessor-notes.md + path: /docs/Reference/Processors/TfsTestConfigurationsMigrationProcessor-notes.md exists: false markdown: '' - topic: introduction - path: /docs/Reference/Processors/TestConfigurationsMigrationProcessor-introduction.md + path: /docs/Reference/Processors/TfsTestConfigurationsMigrationProcessor-introduction.md exists: false markdown: '' diff --git a/docs/collections/_reference/reference.processors.testplansandsuitesmigrationprocessor.md b/docs/collections/_reference/reference.processors.tfstestplansandsuitesmigrationprocessor.md similarity index 63% rename from docs/collections/_reference/reference.processors.testplansandsuitesmigrationprocessor.md rename to docs/collections/_reference/reference.processors.tfstestplansandsuitesmigrationprocessor.md index 265a7845a..5c890b348 100644 --- a/docs/collections/_reference/reference.processors.testplansandsuitesmigrationprocessor.md +++ b/docs/collections/_reference/reference.processors.tfstestplansandsuitesmigrationprocessor.md @@ -1,20 +1,20 @@ --- -optionsClassName: TestPlansAndSuitesMigrationProcessorOptions -optionsClassFullName: MigrationTools._EngineV1.Configuration.Processing.TestPlansAndSuitesMigrationProcessorOptions +optionsClassName: TfsTestPlansAndSuitesMigrationProcessorOptions +optionsClassFullName: MigrationTools._EngineV1.Configuration.Processing.TfsTestPlansAndSuitesMigrationProcessorOptions configurationSamples: - name: defaults description: code: There are no defaults! Check the sample for options! - sampleFor: MigrationTools._EngineV1.Configuration.Processing.TestPlansAndSuitesMigrationProcessorOptions + sampleFor: MigrationTools._EngineV1.Configuration.Processing.TfsTestPlansAndSuitesMigrationProcessorOptions - name: sample description: code: There is no sample, but you can check the classic below for a general feel. - sampleFor: MigrationTools._EngineV1.Configuration.Processing.TestPlansAndSuitesMigrationProcessorOptions + sampleFor: MigrationTools._EngineV1.Configuration.Processing.TfsTestPlansAndSuitesMigrationProcessorOptions - name: classic description: code: >- { - "$type": "TestPlansAndSuitesMigrationProcessorOptions", + "$type": "TfsTestPlansAndSuitesMigrationProcessorOptions", "Enabled": false, "OnlyElementsWithTag": null, "TestPlanQuery": null, @@ -27,9 +27,9 @@ configurationSamples: "TargetName": null, "RefName": null } - sampleFor: MigrationTools._EngineV1.Configuration.Processing.TestPlansAndSuitesMigrationProcessorOptions + sampleFor: MigrationTools._EngineV1.Configuration.Processing.TfsTestPlansAndSuitesMigrationProcessorOptions description: Rebuilds Suits and plans for Test Cases migrated using the WorkItemMigration -className: TestPlansAndSuitesMigrationProcessor +className: TfsTestPlansAndSuitesMigrationProcessor typeName: Processors architecture: options: @@ -79,73 +79,25 @@ options: defaultValue: '`String.Empty`' status: Beta processingTarget: Suites & Plans -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TestPlansAndSuitesMigrationProcessor.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TestPlansAndSuitesMigrationProcessorOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestPlansAndSuitesMigrationProcessor.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestPlansAndSuitesMigrationProcessorOptions.cs redirectFrom: -- /Reference/Processors/TestPlansAndSuitesMigrationProcessorOptions/ +- /Reference/Processors/TfsTestPlansAndSuitesMigrationProcessorOptions/ layout: reference toc: true -permalink: /Reference/Processors/TestPlansAndSuitesMigrationProcessor/ -title: TestPlansAndSuitesMigrationProcessor +permalink: /Reference/Processors/TfsTestPlansAndSuitesMigrationProcessor/ +title: TfsTestPlansAndSuitesMigrationProcessor categories: - Processors - topics: - topic: notes - path: /docs/Reference/Processors/TestPlansAndSuitesMigrationProcessor-notes.md - exists: true - markdown: >2- - - ## Additional Samples & Info - - - To run a full plans and suits you should run the three processors in this order below. `TestVariablesMigrationConfig` and `TestConfigurationsMigrationConfig` only need run once. - - - ```json - - "Processors": [ - { - "$type": "TestVariablesMigrationConfig", - "Enabled": false - }, - { - "$type": "TestConfigurationsMigrationConfig", - "Enabled": true - }, - { - "$type": "TestPlansAndSuitesMigrationConfig", - "Enabled": true, - "PrefixProjectToNodes": false, - "OnlyElementsWithTag": null, - "TestPlanQueryBit": null, - "RemoveAllLinks": false, - "MigrationDelay": 0, - "UseCommonNodeStructureEnricherConfig": false, - "NodeBasePaths": [], - "AreaMaps": null, - "IterationMaps": null, - "RemoveInvalidTestSuiteLinks": false, - "FilterCompleted": false - } - ] - - ``` - - ## Known working TestPlanQueryBit filter fields names - - - `AreaPath`, `PlanName` and `PlanState` - - - ```json - - "TestPlanQueryBit": "PlanName = 'ABC'" - - ``` + path: /docs/Reference/Processors/TfsTestPlansAndSuitesMigrationProcessor-notes.md + exists: false + markdown: '' - topic: introduction - path: /docs/Reference/Processors/TestPlansAndSuitesMigrationProcessor-introduction.md + path: /docs/Reference/Processors/TfsTestPlansAndSuitesMigrationProcessor-introduction.md exists: false markdown: '' diff --git a/docs/collections/_reference/reference.processors.testvariablesmigrationprocessor.md b/docs/collections/_reference/reference.processors.tfstestvariablesmigrationprocessor.md similarity index 67% rename from docs/collections/_reference/reference.processors.testvariablesmigrationprocessor.md rename to docs/collections/_reference/reference.processors.tfstestvariablesmigrationprocessor.md index 4b93533dd..905a9c749 100644 --- a/docs/collections/_reference/reference.processors.testvariablesmigrationprocessor.md +++ b/docs/collections/_reference/reference.processors.tfstestvariablesmigrationprocessor.md @@ -1,20 +1,20 @@ --- -optionsClassName: TestVariablesMigrationProcessorOptions -optionsClassFullName: MigrationTools.Processors.TestVariablesMigrationProcessorOptions +optionsClassName: TfsTestVariablesMigrationProcessorOptions +optionsClassFullName: MigrationTools.Processors.TfsTestVariablesMigrationProcessorOptions configurationSamples: - name: defaults description: code: There are no defaults! Check the sample for options! - sampleFor: MigrationTools.Processors.TestVariablesMigrationProcessorOptions + sampleFor: MigrationTools.Processors.TfsTestVariablesMigrationProcessorOptions - name: sample description: code: There is no sample, but you can check the classic below for a general feel. - sampleFor: MigrationTools.Processors.TestVariablesMigrationProcessorOptions + sampleFor: MigrationTools.Processors.TfsTestVariablesMigrationProcessorOptions - name: classic description: code: >- { - "$type": "TestVariablesMigrationProcessorOptions", + "$type": "TfsTestVariablesMigrationProcessorOptions", "Enabled": false, "Processor": "TestVariablesMigrationContext", "Enrichers": null, @@ -22,9 +22,9 @@ configurationSamples: "TargetName": null, "RefName": null } - sampleFor: MigrationTools.Processors.TestVariablesMigrationProcessorOptions + sampleFor: MigrationTools.Processors.TfsTestVariablesMigrationProcessorOptions description: This processor can migrate test variables that are defined in the test plans / suites. This must run before `TestPlansAndSuitesMigrationConfig`. -className: TestVariablesMigrationProcessor +className: TfsTestVariablesMigrationProcessor typeName: Processors architecture: options: @@ -54,25 +54,25 @@ options: defaultValue: missng XML code comments status: Beta processingTarget: Suites & Plans -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TestVariablesMigrationProcessor.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TestVariablesMigrationProcessorOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestVariablesMigrationProcessor.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestVariablesMigrationProcessorOptions.cs redirectFrom: -- /Reference/Processors/TestVariablesMigrationProcessorOptions/ +- /Reference/Processors/TfsTestVariablesMigrationProcessorOptions/ layout: reference toc: true -permalink: /Reference/Processors/TestVariablesMigrationProcessor/ -title: TestVariablesMigrationProcessor +permalink: /Reference/Processors/TfsTestVariablesMigrationProcessor/ +title: TfsTestVariablesMigrationProcessor categories: - Processors - topics: - topic: notes - path: /docs/Reference/Processors/TestVariablesMigrationProcessor-notes.md + path: /docs/Reference/Processors/TfsTestVariablesMigrationProcessor-notes.md exists: false markdown: '' - topic: introduction - path: /docs/Reference/Processors/TestVariablesMigrationProcessor-introduction.md + path: /docs/Reference/Processors/TfsTestVariablesMigrationProcessor-introduction.md exists: false markdown: '' diff --git a/docs/collections/_reference/reference.processors.workitembulkeditprocessor.md b/docs/collections/_reference/reference.processors.tfsworkitembulkeditprocessor.md similarity index 81% rename from docs/collections/_reference/reference.processors.workitembulkeditprocessor.md rename to docs/collections/_reference/reference.processors.tfsworkitembulkeditprocessor.md index fc0bab405..0bb30ebcb 100644 --- a/docs/collections/_reference/reference.processors.workitembulkeditprocessor.md +++ b/docs/collections/_reference/reference.processors.tfsworkitembulkeditprocessor.md @@ -1,20 +1,20 @@ --- -optionsClassName: WorkItemBulkEditProcessorOptions -optionsClassFullName: MigrationTools._EngineV1.Configuration.Processing.WorkItemBulkEditProcessorOptions +optionsClassName: TfsWorkItemBulkEditProcessorOptions +optionsClassFullName: MigrationTools._EngineV1.Configuration.Processing.TfsWorkItemBulkEditProcessorOptions configurationSamples: - name: defaults description: code: There are no defaults! Check the sample for options! - sampleFor: MigrationTools._EngineV1.Configuration.Processing.WorkItemBulkEditProcessorOptions + sampleFor: MigrationTools._EngineV1.Configuration.Processing.TfsWorkItemBulkEditProcessorOptions - name: sample description: code: There is no sample, but you can check the classic below for a general feel. - sampleFor: MigrationTools._EngineV1.Configuration.Processing.WorkItemBulkEditProcessorOptions + sampleFor: MigrationTools._EngineV1.Configuration.Processing.TfsWorkItemBulkEditProcessorOptions - name: classic description: code: >- { - "$type": "WorkItemBulkEditProcessorOptions", + "$type": "TfsWorkItemBulkEditProcessorOptions", "Enabled": false, "WhatIf": false, "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [@ReflectedWorkItemIdFieldName] = '' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc", @@ -27,9 +27,9 @@ configurationSamples: "TargetName": null, "RefName": null } - sampleFor: MigrationTools._EngineV1.Configuration.Processing.WorkItemBulkEditProcessorOptions + sampleFor: MigrationTools._EngineV1.Configuration.Processing.TfsWorkItemBulkEditProcessorOptions description: This processor allows you to make changes in place where we load from teh Target and update the Target. This is used for bulk updates with the most common reason being a process template change. -className: WorkItemBulkEditProcessor +className: TfsWorkItemBulkEditProcessor typeName: Processors architecture: options: @@ -79,25 +79,25 @@ options: defaultValue: '[]' status: missng XML code comments processingTarget: WorkItem -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemBulkEditProcessor.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemBulkEditProcessorOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemBulkEditProcessor.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemBulkEditProcessorOptions.cs redirectFrom: -- /Reference/Processors/WorkItemBulkEditProcessorOptions/ +- /Reference/Processors/TfsWorkItemBulkEditProcessorOptions/ layout: reference toc: true -permalink: /Reference/Processors/WorkItemBulkEditProcessor/ -title: WorkItemBulkEditProcessor +permalink: /Reference/Processors/TfsWorkItemBulkEditProcessor/ +title: TfsWorkItemBulkEditProcessor categories: - Processors - topics: - topic: notes - path: /docs/Reference/Processors/WorkItemBulkEditProcessor-notes.md + path: /docs/Reference/Processors/TfsWorkItemBulkEditProcessor-notes.md exists: false markdown: '' - topic: introduction - path: /docs/Reference/Processors/WorkItemBulkEditProcessor-introduction.md + path: /docs/Reference/Processors/TfsWorkItemBulkEditProcessor-introduction.md exists: false markdown: '' diff --git a/docs/collections/_reference/reference.processors.workitemdeleteprocessor.md b/docs/collections/_reference/reference.processors.tfsworkitemdeleteprocessor.md similarity index 78% rename from docs/collections/_reference/reference.processors.workitemdeleteprocessor.md rename to docs/collections/_reference/reference.processors.tfsworkitemdeleteprocessor.md index c32ca6778..2537ca2ea 100644 --- a/docs/collections/_reference/reference.processors.workitemdeleteprocessor.md +++ b/docs/collections/_reference/reference.processors.tfsworkitemdeleteprocessor.md @@ -1,20 +1,20 @@ --- -optionsClassName: WorkItemDeleteProcessorOptions -optionsClassFullName: MigrationTools.Processors.WorkItemDeleteProcessorOptions +optionsClassName: TfsWorkItemDeleteProcessorOptions +optionsClassFullName: MigrationTools.Processors.TfsWorkItemDeleteProcessorOptions configurationSamples: - name: defaults description: code: There are no defaults! Check the sample for options! - sampleFor: MigrationTools.Processors.WorkItemDeleteProcessorOptions + sampleFor: MigrationTools.Processors.TfsWorkItemDeleteProcessorOptions - name: sample description: code: There is no sample, but you can check the classic below for a general feel. - sampleFor: MigrationTools.Processors.WorkItemDeleteProcessorOptions + sampleFor: MigrationTools.Processors.TfsWorkItemDeleteProcessorOptions - name: classic description: code: >- { - "$type": "WorkItemDeleteProcessorOptions", + "$type": "TfsWorkItemDeleteProcessorOptions", "Enabled": false, "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc", "WorkItemIDs": null, @@ -26,9 +26,9 @@ configurationSamples: "TargetName": null, "RefName": null } - sampleFor: MigrationTools.Processors.WorkItemDeleteProcessorOptions + sampleFor: MigrationTools.Processors.TfsWorkItemDeleteProcessorOptions description: The `WorkItemDelete` processor allows you to delete any amount of work items that meet the query. **DANGER:** This is not a recoverable action and should be use with extream caution. -className: WorkItemDeleteProcessor +className: TfsWorkItemDeleteProcessor typeName: Processors architecture: options: @@ -74,25 +74,25 @@ options: defaultValue: missng XML code comments status: ready processingTarget: WorkItem -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemDeleteProcessor.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemDeleteProcessorOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemDeleteProcessor.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemDeleteProcessorOptions.cs redirectFrom: -- /Reference/Processors/WorkItemDeleteProcessorOptions/ +- /Reference/Processors/TfsWorkItemDeleteProcessorOptions/ layout: reference toc: true -permalink: /Reference/Processors/WorkItemDeleteProcessor/ -title: WorkItemDeleteProcessor +permalink: /Reference/Processors/TfsWorkItemDeleteProcessor/ +title: TfsWorkItemDeleteProcessor categories: - Processors - topics: - topic: notes - path: /docs/Reference/Processors/WorkItemDeleteProcessor-notes.md + path: /docs/Reference/Processors/TfsWorkItemDeleteProcessor-notes.md exists: false markdown: '' - topic: introduction - path: /docs/Reference/Processors/WorkItemDeleteProcessor-introduction.md + path: /docs/Reference/Processors/TfsWorkItemDeleteProcessor-introduction.md exists: false markdown: '' diff --git a/docs/collections/_reference/reference.processors.workitemupdateareasastagsprocessor.md b/docs/collections/_reference/reference.processors.tfsworkitemoverwriteareasastagsprocessor.md similarity index 68% rename from docs/collections/_reference/reference.processors.workitemupdateareasastagsprocessor.md rename to docs/collections/_reference/reference.processors.tfsworkitemoverwriteareasastagsprocessor.md index 91df1e8c7..9be4f0a3c 100644 --- a/docs/collections/_reference/reference.processors.workitemupdateareasastagsprocessor.md +++ b/docs/collections/_reference/reference.processors.tfsworkitemoverwriteareasastagsprocessor.md @@ -1,20 +1,20 @@ --- -optionsClassName: WorkItemUpdateAreasAsTagsProcessorOptions -optionsClassFullName: MigrationTools.Processors.WorkItemUpdateAreasAsTagsProcessorOptions +optionsClassName: TfsWorkItemOverwriteAreasAsTagsProcessorOptions +optionsClassFullName: MigrationTools.Processors.TfsWorkItemOverwriteAreasAsTagsProcessorOptions configurationSamples: - name: defaults description: code: There are no defaults! Check the sample for options! - sampleFor: MigrationTools.Processors.WorkItemUpdateAreasAsTagsProcessorOptions + sampleFor: MigrationTools.Processors.TfsWorkItemOverwriteAreasAsTagsProcessorOptions - name: sample description: code: There is no sample, but you can check the classic below for a general feel. - sampleFor: MigrationTools.Processors.WorkItemUpdateAreasAsTagsProcessorOptions + sampleFor: MigrationTools.Processors.TfsWorkItemOverwriteAreasAsTagsProcessorOptions - name: classic description: code: >- { - "$type": "WorkItemUpdateAreasAsTagsProcessorOptions", + "$type": "TfsWorkItemOverwriteAreasAsTagsProcessorOptions", "Enabled": false, "AreaIterationPath": null, "Enrichers": null, @@ -22,9 +22,9 @@ configurationSamples: "TargetName": null, "RefName": null } - sampleFor: MigrationTools.Processors.WorkItemUpdateAreasAsTagsProcessorOptions + sampleFor: MigrationTools.Processors.TfsWorkItemOverwriteAreasAsTagsProcessorOptions description: A common issue with older *TFS/Azure DevOps* instances is the proliferation of `Area Paths`. With the use of `Area Path` for `Teams` and the addition of the `Node Name` column option these extensive tag hierarchies should instad be moved to tags. -className: WorkItemUpdateAreasAsTagsProcessor +className: TfsWorkItemOverwriteAreasAsTagsProcessor typeName: Processors architecture: options: @@ -54,25 +54,25 @@ options: defaultValue: missng XML code comments status: Beta processingTarget: Work Item -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemUpdateAreasAsTagsProcessor.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemUpdateAreasAsTagsProcessorOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemOverwriteAreasAsTagsProcessor.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemOverwriteAreasAsTagsProcessorOptions.cs redirectFrom: -- /Reference/Processors/WorkItemUpdateAreasAsTagsProcessorOptions/ +- /Reference/Processors/TfsWorkItemOverwriteAreasAsTagsProcessorOptions/ layout: reference toc: true -permalink: /Reference/Processors/WorkItemUpdateAreasAsTagsProcessor/ -title: WorkItemUpdateAreasAsTagsProcessor +permalink: /Reference/Processors/TfsWorkItemOverwriteAreasAsTagsProcessor/ +title: TfsWorkItemOverwriteAreasAsTagsProcessor categories: - Processors - topics: - topic: notes - path: /docs/Reference/Processors/WorkItemUpdateAreasAsTagsProcessor-notes.md + path: /docs/Reference/Processors/TfsWorkItemOverwriteAreasAsTagsProcessor-notes.md exists: false markdown: '' - topic: introduction - path: /docs/Reference/Processors/WorkItemUpdateAreasAsTagsProcessor-introduction.md + path: /docs/Reference/Processors/TfsWorkItemOverwriteAreasAsTagsProcessor-introduction.md exists: false markdown: '' diff --git a/docs/collections/_reference/reference.processors.tfsworkitemmigrationprocessor.md b/docs/collections/_reference/reference.processors.tfsworkitemoverwriteprocessor.md similarity index 59% rename from docs/collections/_reference/reference.processors.tfsworkitemmigrationprocessor.md rename to docs/collections/_reference/reference.processors.tfsworkitemoverwriteprocessor.md index 66fb11461..ce6e432df 100644 --- a/docs/collections/_reference/reference.processors.tfsworkitemmigrationprocessor.md +++ b/docs/collections/_reference/reference.processors.tfsworkitemoverwriteprocessor.md @@ -1,92 +1,42 @@ --- -optionsClassName: TfsWorkItemMigrationProcessorOptions -optionsClassFullName: MigrationTools.Processors.TfsWorkItemMigrationProcessorOptions +optionsClassName: TfsWorkItemOverwriteProcessorOptions +optionsClassFullName: MigrationTools.Processors.TfsWorkItemOverwriteProcessorOptions configurationSamples: - name: defaults description: - code: >- - { - "MigrationTools": { - "Processors": [ - { - "ProcessorType": "TfsWorkItemMigrationProcessor", - "AttachRevisionHistory": "False", - "Enabled": "False", - "FilterWorkItemsThatAlreadyExistInTarget": "False", - "FixHtmlAttachmentLinks": "True", - "GenerateMigrationComment": "True", - "MaxGracefulFailures": "0", - "PauseAfterEachWorkItem": "False", - "SkipRevisionWithInvalidAreaPath": "False", - "SkipRevisionWithInvalidIterationPath": "False", - "SourceName": "Source", - "TargetName": "Target", - "UpdateCreatedBy": "True", - "UpdateCreatedDate": "True", - "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc", - "WorkItemCreateRetryLimit": "5", - "WorkItemIDs": null - } - ] - } - } - sampleFor: MigrationTools.Processors.TfsWorkItemMigrationProcessorOptions + code: There are no defaults! Check the sample for options! + sampleFor: MigrationTools.Processors.TfsWorkItemOverwriteProcessorOptions - name: sample description: - code: >- - { - "MigrationTools": { - "Processors": [ - { - "ProcessorType": "TfsWorkItemMigrationProcessor", - "AttachRevisionHistory": "False", - "Enabled": "False", - "FilterWorkItemsThatAlreadyExistInTarget": "False", - "FixHtmlAttachmentLinks": "True", - "GenerateMigrationComment": "True", - "MaxGracefulFailures": "0", - "PauseAfterEachWorkItem": "False", - "SkipRevisionWithInvalidAreaPath": "False", - "SkipRevisionWithInvalidIterationPath": "False", - "SourceName": "Source", - "TargetName": "Target", - "UpdateCreatedBy": "True", - "UpdateCreatedDate": "True", - "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc", - "WorkItemCreateRetryLimit": "5", - "WorkItemIDs": null - } - ] - } - } - sampleFor: MigrationTools.Processors.TfsWorkItemMigrationProcessorOptions + code: There is no sample, but you can check the classic below for a general feel. + sampleFor: MigrationTools.Processors.TfsWorkItemOverwriteProcessorOptions - name: classic description: code: >- { - "$type": "TfsWorkItemMigrationProcessorOptions", + "$type": "TfsWorkItemOverwriteProcessorOptions", "Enabled": false, - "UpdateCreatedDate": true, - "UpdateCreatedBy": true, - "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc", - "FixHtmlAttachmentLinks": true, - "WorkItemCreateRetryLimit": 5, + "UpdateCreatedDate": false, + "UpdateCreatedBy": false, + "WIQLQuery": null, + "FixHtmlAttachmentLinks": false, + "WorkItemCreateRetryLimit": 0, "FilterWorkItemsThatAlreadyExistInTarget": false, "PauseAfterEachWorkItem": false, "AttachRevisionHistory": false, - "GenerateMigrationComment": true, + "GenerateMigrationComment": false, "WorkItemIDs": null, "MaxGracefulFailures": 0, "SkipRevisionWithInvalidIterationPath": false, "SkipRevisionWithInvalidAreaPath": false, "Enrichers": null, - "SourceName": "Source", - "TargetName": "Target", + "SourceName": null, + "TargetName": null, "RefName": null } - sampleFor: MigrationTools.Processors.TfsWorkItemMigrationProcessorOptions -description: WorkItemMigrationConfig is the main processor used to Migrate Work Items, Links, and Attachments. Use `WorkItemMigrationConfig` to configure. -className: TfsWorkItemMigrationProcessor + sampleFor: MigrationTools.Processors.TfsWorkItemOverwriteProcessorOptions +description: Reapply field mappings after a migration. Does not migtate Work Items, only reapplied changes to filed mappings. +className: TfsWorkItemOverwriteProcessor typeName: Processors architecture: options: @@ -162,27 +112,27 @@ options: type: IList description: A list of work items to import defaultValue: '[]' -status: ready +status: preview processingTarget: Work Items -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessor.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessorOptions.cs +classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemOverwriteProcessor.cs +optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemOverwriteProcessorOptions.cs redirectFrom: -- /Reference/Processors/TfsWorkItemMigrationProcessorOptions/ +- /Reference/Processors/TfsWorkItemOverwriteProcessorOptions/ layout: reference toc: true -permalink: /Reference/Processors/TfsWorkItemMigrationProcessor/ -title: TfsWorkItemMigrationProcessor +permalink: /Reference/Processors/TfsWorkItemOverwriteProcessor/ +title: TfsWorkItemOverwriteProcessor categories: - Processors - topics: - topic: notes - path: /docs/Reference/Processors/TfsWorkItemMigrationProcessor-notes.md + path: /docs/Reference/Processors/TfsWorkItemOverwriteProcessor-notes.md exists: false markdown: '' - topic: introduction - path: /docs/Reference/Processors/TfsWorkItemMigrationProcessor-introduction.md + path: /docs/Reference/Processors/TfsWorkItemOverwriteProcessor-introduction.md exists: false markdown: '' diff --git a/docs/collections/_reference/reference.processors.workitemmigrationprocessor.md b/docs/collections/_reference/reference.processors.workitemmigrationprocessor.md deleted file mode 100644 index 814154d30..000000000 --- a/docs/collections/_reference/reference.processors.workitemmigrationprocessor.md +++ /dev/null @@ -1,297 +0,0 @@ ---- -optionsClassName: WorkItemMigrationProcessorOptions -optionsClassFullName: MigrationTools.Processors.WorkItemMigrationProcessorOptions -configurationSamples: -- name: confinguration.json - description: - code: >- - { - "MigrationTools": { - "Processors": [ - { - "ProcessorType": "WorkItemMigrationProcessor", - "Enabled": false, - "UpdateCreatedDate": true, - "UpdateCreatedBy": true, - "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc", - "FixHtmlAttachmentLinks": true, - "WorkItemCreateRetryLimit": 5, - "FilterWorkItemsThatAlreadyExistInTarget": false, - "PauseAfterEachWorkItem": false, - "AttachRevisionHistory": false, - "GenerateMigrationComment": true, - "WorkItemIDs": null, - "MaxGracefulFailures": 0, - "SkipRevisionWithInvalidIterationPath": false, - "SkipRevisionWithInvalidAreaPath": false, - "Enrichers": null, - "ProcessorEnrichers": null, - "SourceName": null, - "TargetName": null, - "RefName": null - } - ] - } - } - sampleFor: MigrationTools.Processors.WorkItemMigrationProcessorOptions -- name: defaults - description: - code: >- - { - "MigrationTools": { - "ProcessorDefaults": { - "WorkItemMigrationProcessor": { - "AttachRevisionHistory": "False", - "Enabled": "False", - "FilterWorkItemsThatAlreadyExistInTarget": "False", - "FixHtmlAttachmentLinks": "True", - "GenerateMigrationComment": "True", - "MaxGracefulFailures": "0", - "PauseAfterEachWorkItem": "False", - "SkipRevisionWithInvalidAreaPath": "False", - "SkipRevisionWithInvalidIterationPath": "False", - "UpdateCreatedBy": "True", - "UpdateCreatedDate": "True", - "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc", - "WorkItemCreateRetryLimit": "5", - "WorkItemIDs": null - } - } - } - } - sampleFor: MigrationTools.Processors.WorkItemMigrationProcessorOptions -- name: Classic - description: - code: >- - { - "$type": "WorkItemMigrationProcessorOptions", - "Enabled": false, - "UpdateCreatedDate": true, - "UpdateCreatedBy": true, - "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc", - "FixHtmlAttachmentLinks": true, - "WorkItemCreateRetryLimit": 5, - "FilterWorkItemsThatAlreadyExistInTarget": false, - "PauseAfterEachWorkItem": false, - "AttachRevisionHistory": false, - "GenerateMigrationComment": true, - "WorkItemIDs": null, - "MaxGracefulFailures": 0, - "SkipRevisionWithInvalidIterationPath": false, - "SkipRevisionWithInvalidAreaPath": false, - "Enrichers": null, - "ProcessorEnrichers": null, - "SourceName": null, - "TargetName": null - } - sampleFor: MigrationTools.Processors.WorkItemMigrationProcessorOptions -description: WorkItemMigrationConfig is the main processor used to Migrate Work Items, Links, and Attachments. Use `WorkItemMigrationConfig` to configure. -className: WorkItemMigrationProcessor -typeName: Processors -architecture: -options: -- parameterName: AttachRevisionHistory - type: Boolean - description: This will create a json file with the revision history and attach it to the work item. Best used with `MaxRevisions` or `ReplayRevisions`. - defaultValue: '?' -- parameterName: Enabled - type: Boolean - description: If set to `true` then the processor will run. Set to `false` and the processor will not run. - defaultValue: missng XML code comments -- parameterName: Enrichers - type: List - description: A list of enrichers that can augment the proccessing of the data - defaultValue: missng XML code comments -- parameterName: FilterWorkItemsThatAlreadyExistInTarget - type: Boolean - description: This loads all of the work items already saved to the Target and removes them from the Source work item list prior to commencing the run. While this may take some time in large data sets it reduces the time of the overall migration significantly if you need to restart. - defaultValue: true -- parameterName: FixHtmlAttachmentLinks - type: Boolean - description: "**beta** If enabled this will fix any image attachments URL's, work item mention URL's or user mentions in the HTML fields as well as discussion comments. You must specify a PersonalAccessToken in the Source project for Azure DevOps; TFS should use integrated authentication." - defaultValue: '?' -- parameterName: GenerateMigrationComment - type: Boolean - description: If enabled, adds a comment recording the migration - defaultValue: false -- parameterName: MaxGracefulFailures - type: Int32 - description: The maximum number of failures to tolerate before the migration fails. When set above zero, a work item migration error is logged but the migration will continue until the number of failed items reaches the configured value, after which the migration fails. - defaultValue: 0 -- parameterName: PauseAfterEachWorkItem - type: Boolean - description: Pause after each work item is migrated - defaultValue: false -- parameterName: ProcessorEnrichers - type: List - description: List of Enrichers that can be used to add more features to this processor. Only works with Native Processors and not legacy Processors. - defaultValue: missng XML code comments -- parameterName: RefName - type: String - description: '`Refname` will be used in the future to allow for using named Options without the need to copy all of the options.' - defaultValue: missng XML code comments -- parameterName: SkipRevisionWithInvalidAreaPath - type: Boolean - description: When set to true, this setting will skip a revision if the source area has not been migrated, has been deleted or is somehow invalid, etc. - defaultValue: missng XML code comments -- parameterName: SkipRevisionWithInvalidIterationPath - type: Boolean - description: This will skip a revision if the source iteration has not been migrated i.e. it was deleted - defaultValue: missng XML code comments -- parameterName: SourceName - type: String - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: TargetName - type: String - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: UpdateCreatedBy - type: Boolean - description: "If this is enabled the creation process on the target project will create the items with the original creation date. (Important: The item history is always pointed to the date of the migration, it's change only the data column CreateDate, not the internal create date)" - defaultValue: true -- parameterName: UpdateCreatedDate - type: Boolean - description: "If this is enabled the creation process on the target project will create the items with the original creation date. (Important: The item history is always pointed to the date of the migration, it's change only the data column CreateDate, not the internal create date)" - defaultValue: true -- parameterName: WIQLQuery - type: String - description: A work item query based on WIQL to select only important work items. To migrate all leave this empty. See [WIQL Query Bits](#wiql-query-bits) - defaultValue: SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [[System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc -- parameterName: WorkItemCreateRetryLimit - type: Int32 - description: '**beta** If set to a number greater than 0 work items that fail to save will retry after a number of seconds equal to the retry count. This allows for periodic network glitches not to end the process.' - defaultValue: 5 -- parameterName: WorkItemIDs - type: IList - description: A list of work items to import - defaultValue: '[]' -status: ready -processingTarget: Work Items -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemMigrationProcessor.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemMigrationProcessorOptions.cs - -redirectFrom: -- /Reference/Processors/WorkItemMigrationProcessorOptions/ -layout: reference -toc: true -permalink: /Reference/Processors/WorkItemMigrationProcessor/ -title: WorkItemMigrationProcessor -categories: -- Processors -- -topics: -- topic: notes - path: /docs/Reference/Processors/WorkItemMigrationProcessor-notes.md - exists: true - markdown: >+ - ## WIQL Query Bits - - - The Work Item queries are all built using Work Item [Query Language (WIQL)](https://docs.microsoft.com/en-us/azure/devops/boards/queries/wiql-syntax). - - - > Note: A useful Azure DevOps Extension to explore WIQL is the [WIQL Editor](https://marketplace.visualstudio.com/items?itemName=ottostreifel.wiql-editor) - - - ### Examples - - - You can use the [WIQL Editor](https://marketplace.visualstudio.com/items?itemName=ottostreifel.wiql-editor) to craft a query in Azure DevOps. - - - A simple example config: - - - ``` - - "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc" - - ``` - - Scope to Area Path (Team data): - - - ``` - - "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.AreaPath] UNDER 'project\Team 1\' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc" - - ``` - - - ## NodeBasePath Configuration - - - Moved to the ProcessorEnricher [TfsNodeStructure](/Reference/v2/ProcessorEnrichers/TfsNodeStructure/) - - - # Iteration Maps and Area Maps - - - Moved to the ProcessorEnricher [TfsNodeStructure](/Reference/v2/ProcessorEnrichers/TfsNodeStructure/) - - - - - ## More Complex Team Migrations - - The above options allow you to bring over a sub-set of the WIs (using the `WIQLQueryBit`) and move their area or iteration path to a default location. However you may wish to do something more complex e.g. re-map the team structure. This can be done with addition of a `FieldMaps` block to configuration in addition to the `NodeBasePaths`. - - - Using the above sample structure, if you wanted to map the source project `Team 1` to target project `Team A` etc. you could add the field map as follows - - - A complete list of [FieldMaps](../Reference/v1/FieldMaps/index.md) are available. - - - ``` - "FieldMaps": [ - { - "$type": "FieldValueMapConfig", - "WorkItemTypeName": "*", - "sourceField": "System.AreaPath", - "targetField": "System.AreaPath", - "defaultValue": "TargetProg", - "valueMapping": { - "SampleProj\\Team 1": "TargetProg\\Team A", - "SampleProj\\Team 2": "TargetProg\\Team B" - "SampleProj\\Team 3": "TargetProg\\Team C" - } - }, - ], - - ``` - - - > Note: This mappings could also be achieved with other forms of Field mapper e.g. `RegexFieldMapConfig`, but the value mapper as an example is easy to understand - - - # Removed Properties - - - - PrefixProjectToNodes - This option was removed in favour of the Area and Iteration Maps on [TfsNodeStructure](/Reference/v2/ProcessorEnrichers/TfsNodeStructure/) -- topic: introduction - path: /docs/Reference/Processors/WorkItemMigrationProcessor-introduction.md - exists: true - markdown: >+ - The `WorkItemMigrationContext` processor is used for migrating work items from one Azure DevOps instance to another. This encompasses a variety of activities: - - - 1. **Transferring Work Items Between Instances**: The primary purpose of the processor is to transfer work items, including bugs, tasks, user stories, features, and more, from one Azure DevOps instance to another. - - - 2. **Migrating Work Item History**: The processor can also replicate the entire revision history of work items, providing continuity and maintaining a record of changes. - - - 3. **Migrating Attachments and Links**: The processor can transfer any attachments or links associated with work items. This includes both external links and internal links to other work items. - - - 4. **Updating Metadata**: If configured, the processor can update the "Created Date" and "Created By" fields on migrated work items to match the original items in the source instance. - - - 5. **Filtering Work Items**: The processor can be configured to only migrate certain work items based on their area or iteration paths. - - - Overall, the `WorkItemMigrationContext` processor is a comprehensive tool for transferring work items and their associated data and metadata between Azure DevOps instances. It should be used whenever there is a need to move work items between instances while preserving as much information as possible. - ---- \ No newline at end of file diff --git a/docs/collections/_reference/reference.processors.workitempostprocessingprocessor.md b/docs/collections/_reference/reference.processors.workitempostprocessingprocessor.md deleted file mode 100644 index 7dc2a71cd..000000000 --- a/docs/collections/_reference/reference.processors.workitempostprocessingprocessor.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -optionsClassName: WorkItemPostProcessingProcessorOptions -optionsClassFullName: MigrationTools.Processors.WorkItemPostProcessingProcessorOptions -configurationSamples: -- name: defaults - description: - code: There are no defaults! Check the sample for options! - sampleFor: MigrationTools.Processors.WorkItemPostProcessingProcessorOptions -- name: sample - description: - code: There is no sample, but you can check the classic below for a general feel. - sampleFor: MigrationTools.Processors.WorkItemPostProcessingProcessorOptions -- name: classic - description: - code: >- - { - "$type": "WorkItemPostProcessingProcessorOptions", - "Enabled": false, - "WorkItemIDs": null, - "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [@ReflectedWorkItemIdFieldName] = '' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc", - "FilterWorkItemsThatAlreadyExistInTarget": false, - "PauseAfterEachWorkItem": false, - "WorkItemCreateRetryLimit": 0, - "Enrichers": null, - "SourceName": null, - "TargetName": null, - "RefName": null - } - sampleFor: MigrationTools.Processors.WorkItemPostProcessingProcessorOptions -description: Reapply field mappings after a migration. Does not migtate Work Items, only reapplied changes to filed mappings. -className: WorkItemPostProcessingProcessor -typeName: Processors -architecture: -options: -- parameterName: Enabled - type: Boolean - description: If set to `true` then the processor will run. Set to `false` and the processor will not run. - defaultValue: missng XML code comments -- parameterName: Enrichers - type: List - description: List of Enrichers that can be used to add more features to this processor. Only works with Native Processors and not legacy Processors. - defaultValue: missng XML code comments -- parameterName: FilterWorkItemsThatAlreadyExistInTarget - type: Boolean - description: This loads all of the work items already saved to the Target and removes them from the Source work item list prior to commencing the run. While this may take some time in large data sets it reduces the time of the overall migration significantly if you need to restart. - defaultValue: true -- parameterName: PauseAfterEachWorkItem - type: Boolean - description: Pause after each work item is migrated - defaultValue: false -- parameterName: RefName - type: String - description: '`Refname` will be used in the future to allow for using named Options without the need to copy all of the options.' - defaultValue: missng XML code comments -- parameterName: SourceName - type: String - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: TargetName - type: String - description: missng XML code comments - defaultValue: missng XML code comments -- parameterName: WIQLQuery - type: String - description: A work item query based on WIQL to select only important work items. To migrate all leave this empty. See [WIQL Query Bits](#wiql-query-bits) - defaultValue: AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') -- parameterName: WorkItemCreateRetryLimit - type: Int32 - description: '**beta** If set to a number greater than 0 work items that fail to save will retry after a number of seconds equal to the retry count. This allows for periodic network glitches not to end the process.' - defaultValue: 5 -- parameterName: WorkItemIDs - type: IList - description: A list of work items to import - defaultValue: '[]' -status: preview -processingTarget: Work Items -classFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemPostProcessingProcessor.cs -optionsClassFile: /src/MigrationTools.Clients.TfsObjectModel/Processors/WorkItemPostProcessingProcessorOptions.cs - -redirectFrom: -- /Reference/Processors/WorkItemPostProcessingProcessorOptions/ -layout: reference -toc: true -permalink: /Reference/Processors/WorkItemPostProcessingProcessor/ -title: WorkItemPostProcessingProcessor -categories: -- Processors -- -topics: -- topic: notes - path: /docs/Reference/Processors/WorkItemPostProcessingProcessor-notes.md - exists: false - markdown: '' -- topic: introduction - path: /docs/Reference/Processors/WorkItemPostProcessingProcessor-introduction.md - exists: false - markdown: '' - ---- \ No newline at end of file diff --git a/docs/collections/_reference/reference.tools.gitrepomappingtool.md b/docs/collections/_reference/reference.tools.gitrepomappingtool.md deleted file mode 100644 index 10f7f621d..000000000 --- a/docs/collections/_reference/reference.tools.gitrepomappingtool.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -optionsClassName: GitRepoMappingToolOptions -optionsClassFullName: MigrationTools.Tools.GitRepoMappingToolOptions -configurationSamples: -- name: defaults - description: - code: There are no defaults! Check the sample for options! - sampleFor: MigrationTools.Tools.GitRepoMappingToolOptions -- name: sample - description: - code: There is no sample, but you can check the classic below for a general feel. - sampleFor: MigrationTools.Tools.GitRepoMappingToolOptions -- name: classic - description: - code: >- - { - "$type": "GitRepoMappingToolOptions", - "Enabled": false, - "Mappings": null - } - sampleFor: MigrationTools.Tools.GitRepoMappingToolOptions -description: Used to process the String fields of a work item. This is useful for cleaning up data. It will limit fields to a max length and apply regex replacements based on what is configured. Each regex replacement is applied in order and can be enabled or disabled. -className: GitRepoMappingTool -typeName: Tools -architecture: -options: -- parameterName: Enabled - type: Boolean - description: If set to `true` then the tool will run. Set to `false` and the processor will not run. - defaultValue: missng XML code comments -- parameterName: Mappings - type: Dictionary - description: List of work item mappings. - defaultValue: '{}' -status: missng XML code comments -processingTarget: missng XML code comments -classFile: /src/MigrationTools/Tools/GitRepoMappingTool.cs -optionsClassFile: /src/MigrationTools/Tools/GitRepoMappingToolOptions.cs - -redirectFrom: -- /Reference/Tools/GitRepoMappingToolOptions/ -layout: reference -toc: true -permalink: /Reference/Tools/GitRepoMappingTool/ -title: GitRepoMappingTool -categories: -- Tools -- -topics: -- topic: notes - path: /docs/Reference/Tools/GitRepoMappingTool-notes.md - exists: false - markdown: '' -- topic: introduction - path: /docs/Reference/Tools/GitRepoMappingTool-introduction.md - exists: false - markdown: '' - ---- \ No newline at end of file diff --git a/docs/collections/_reference/reference.tools.itool.md b/docs/collections/_reference/reference.tools.itool.md deleted file mode 100644 index 6032cefef..000000000 --- a/docs/collections/_reference/reference.tools.itool.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -optionsClassName: -optionsClassFullName: -configurationSamples: [] -description: missng XML code comments -className: ITool -typeName: Tools -architecture: v1 -options: [] -status: missng XML code comments -processingTarget: missng XML code comments -classFile: /src/MigrationTools/Tools/Infra/ITool.cs -optionsClassFile: - -redirectFrom: -- /Reference/v1/Tools// -layout: reference -toc: true -permalink: /Reference/Tools/ITool/ -title: ITool -categories: -- Tools -- v1 -topics: -- topic: notes - path: /Tools/ITool-notes.md - exists: false - markdown: '' -- topic: introduction - path: /Tools/ITool-introduction.md - exists: false - markdown: '' - ---- \ No newline at end of file From 8728530258ff3964905d8ce8f1de0fcc3b8c6540 Mon Sep 17 00:00:00 2001 From: "Martin Hinshelwood nkdAgility.com" Date: Tue, 3 Sep 2024 16:17:33 +0100 Subject: [PATCH 08/11] Update --- .../MigrationTools.Clients.TfsObjectModel.xml | 26 +++++++++---------- docs/Reference/Generated/MigrationTools.xml | 12 ++++----- .../TfsWorkItemMigrationProcessor.cs | 19 +++++++------- .../TfsWorkItemMigrationProcessorOptions.cs | 2 +- .../TfsExtensions.cs | 1 + .../Tools/TfsValidateRequiredFieldTool.cs | 3 ++- .../Services/TelemetryClientAdapter.cs | 7 ++++- 7 files changed, 38 insertions(+), 32 deletions(-) diff --git a/docs/Reference/Generated/MigrationTools.Clients.TfsObjectModel.xml b/docs/Reference/Generated/MigrationTools.Clients.TfsObjectModel.xml index 85083cf5c..1b9693a43 100644 --- a/docs/Reference/Generated/MigrationTools.Clients.TfsObjectModel.xml +++ b/docs/Reference/Generated/MigrationTools.Clients.TfsObjectModel.xml @@ -234,7 +234,7 @@ ready Work Items - + If this is enabled the creation process on the target project will create the items with the original creation date. (Important: The item history is always pointed to the date of the migration, it's change only the data column CreateDate, @@ -242,7 +242,7 @@ true - + If this is enabled the creation process on the target project will create the items with the original creation date. (Important: The item history is always pointed to the date of the migration, it's change only the data column CreateDate, @@ -250,13 +250,13 @@ true - + A work item query based on WIQL to select only important work items. To migrate all leave this empty. See [WIQL Query Bits](#wiql-query-bits) SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [[System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc - + **beta** If enabled this will fix any image attachments URL's, work item mention URL's or user mentions in the HTML fields as well as discussion comments. You must specify a PersonalAccessToken in the Source project for Azure DevOps; @@ -264,57 +264,57 @@ ? - + **beta** If set to a number greater than 0 work items that fail to save will retry after a number of seconds equal to the retry count. This allows for periodic network glitches not to end the process. 5 - + This loads all of the work items already saved to the Target and removes them from the Source work item list prior to commencing the run. While this may take some time in large data sets it reduces the time of the overall migration significantly if you need to restart. true - + Pause after each work item is migrated false - + This will create a json file with the revision history and attach it to the work item. Best used with `MaxRevisions` or `ReplayRevisions`. ? - + If enabled, adds a comment recording the migration false - + A list of work items to import [] - + The maximum number of failures to tolerate before the migration fails. When set above zero, a work item migration error is logged but the migration will continue until the number of failed items reaches the configured value, after which the migration fails. 0 - + This will skip a revision if the source iteration has not been migrated i.e. it was deleted - + When set to true, this setting will skip a revision if the source area has not been migrated, has been deleted or is somehow invalid, etc. diff --git a/docs/Reference/Generated/MigrationTools.xml b/docs/Reference/Generated/MigrationTools.xml index c4eff3a1b..852c1ecc6 100644 --- a/docs/Reference/Generated/MigrationTools.xml +++ b/docs/Reference/Generated/MigrationTools.xml @@ -263,27 +263,27 @@ - => @"98df924d" + => @"9da18171" - => @"98df924d09b8dc4a6119dc205362104fa34ebde5" + => @"9da18171b9a1938f37b1bf62e4ac8a7e63e2706e" - => @"2024-09-03T14:43:07+01:00" + => @"2024-09-03T15:15:23+01:00" - => @"2" + => @"7" - => @"v16.0.0-Preview.6-2-g98df924d" + => @"v16.0.0-Preview.6-7-g9da18171" @@ -318,7 +318,7 @@ - => @"2" + => @"7" diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessor.cs index acfb56a2f..26cbf2afa 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessor.cs @@ -37,6 +37,7 @@ using Serilog.Context; using Serilog.Events; using ILogger = Serilog.ILogger; +using MigrationTools.Tools.Interfaces; namespace MigrationTools.Processors { @@ -60,12 +61,12 @@ public class TfsWorkItemMigrationProcessor : TfsProcessor private ILogger workItemLog; private List _itemsInError; - public TfsWorkItemMigrationProcessor(IOptions options, TfsCommonTools tfsCommonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsCommonTools, processorEnrichers, services, telemetry, logger) + public TfsWorkItemMigrationProcessor(IOptions options, TfsCommonTools tfsCommonTools, ProcessorEnricherContainer processorEnrichers, IServiceProvider services, ITelemetryLogger telemetry, ILogger logger) : base(options, tfsCommonTools, processorEnrichers, services, telemetry, logger) { contextLog = Serilog.Log.ForContext(); } - new TfsWorkItemOverwriteProcessorOptions Options => (TfsWorkItemOverwriteProcessorOptions)base.Options; + new TfsWorkItemMigrationProcessorOptions Options => (TfsWorkItemMigrationProcessorOptions)base.Options; new TfsTeamProjectEndpoint Source => (TfsTeamProjectEndpoint)base.Source; @@ -277,8 +278,7 @@ private void ValidateAllWorkItemTypesHaveReflectedWorkItemIdField(List sourceWorkItems) { contextLog.Information("Validating::Check that all work item types needed in the Target exist or are mapped"); - var workItemTypeMappingTool = Services.GetRequiredService(); - // get list of all work item types + // get list of all work item types List sourceWorkItemTypes = sourceWorkItems.SelectMany(x => x.Revisions.Values) //.Where(x => x.Fields[fieldName].Value.ToString().Contains("\\")) .Select(x => x.Type) @@ -299,7 +299,7 @@ private void ValiddateWorkItemTypesExistInTarget(List sourceWorkIt foreach (var missingWorkItemType in missingWorkItemTypes) { bool thisTypeMapped = true; - if (!workItemTypeMappingTool.Mappings.ContainsKey(missingWorkItemType)) + if (!CommonTools.WorkItemTypeMapping.Mappings.ContainsKey(missingWorkItemType)) { thisTypeMapped = false; } @@ -664,7 +664,6 @@ private void ProcessWorkItemLinks(IWorkItemMigrationClient sourceStore, IWorkIte private WorkItemData ReplayRevisions(List revisionsToMigrate, WorkItemData sourceWorkItem, WorkItemData targetWorkItem) { - var workItemTypeMappingTool = Services.GetRequiredService(); try { //If work item hasn't been created yet, create a shell @@ -678,9 +677,9 @@ private WorkItemData ReplayRevisions(List revisionsToMigrate, Work TraceWriteLine(LogEventLevel.Information, $"WorkItem has changed type at one of the revisions, from {targetType} to {finalDestType}"); } - if (workItemTypeMappingTool.Mappings.ContainsKey(targetType)) + if (CommonTools.WorkItemTypeMapping.Mappings.ContainsKey(targetType)) { - targetType = workItemTypeMappingTool.Mappings[targetType]; + targetType = CommonTools.WorkItemTypeMapping.Mappings[targetType]; } targetWorkItem = CreateWorkItem_Shell(Target.WorkItems.Project, sourceWorkItem, targetType); } @@ -701,9 +700,9 @@ private WorkItemData ReplayRevisions(List revisionsToMigrate, Work // Decide on WIT var destType = currentRevisionWorkItem.Type; - if (workItemTypeMappingTool.Mappings.ContainsKey(destType)) + if (CommonTools.WorkItemTypeMapping.Mappings.ContainsKey(destType)) { - destType = workItemTypeMappingTool.Mappings[destType]; + destType = CommonTools.WorkItemTypeMapping.Mappings[destType]; } bool typeChange = (destType != targetWorkItem.Type); diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessorOptions.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessorOptions.cs index 9a0ac5789..e20be9559 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessorOptions.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessorOptions.cs @@ -8,7 +8,7 @@ namespace MigrationTools.Processors { - public class TfsWorkItemOverwriteProcessorOptions : ProcessorOptions, IWorkItemProcessorConfig + public class TfsWorkItemMigrationProcessorOptions : ProcessorOptions, IWorkItemProcessorConfig { diff --git a/src/MigrationTools.Clients.TfsObjectModel/TfsExtensions.cs b/src/MigrationTools.Clients.TfsObjectModel/TfsExtensions.cs index 28d4381cc..fb2b6aa3d 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/TfsExtensions.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/TfsExtensions.cs @@ -37,6 +37,7 @@ public static WorkItemData GetRevision(this WorkItemData context, int rev) { // internalObject = context.internalObject // TODO: Had to revert to calling revision load again untill WorkItemMigrationContext.PopulateWorkItem can be updated to pull from WorkItemData + internalObject = originalWi.Store.GetWorkItem(originalWi.Id, rev) }; diff --git a/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsValidateRequiredFieldTool.cs b/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsValidateRequiredFieldTool.cs index 149eaef5e..b5b9f0063 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsValidateRequiredFieldTool.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Tools/TfsValidateRequiredFieldTool.cs @@ -11,6 +11,7 @@ using MigrationTools.Processors; using MigrationTools.Processors.Infrastructure; using MigrationTools.Tools.Infrastructure; +using MigrationTools.Tools.Interfaces; namespace MigrationTools.Tools { @@ -27,7 +28,7 @@ public TfsValidateRequiredFieldTool(IOptions sourceWorkItems) { - var workItemTypeMappingTool = Services.GetRequiredService(); + var workItemTypeMappingTool = Services.GetRequiredService(); var sourceWorkItemTypes = sourceWorkItems.Select(wid => wid.ToWorkItem().Type).Distinct(); var targetTypes = processor.Target.WorkItems.Project.ToProject().WorkItemTypes; var result = true; diff --git a/src/MigrationTools/Services/TelemetryClientAdapter.cs b/src/MigrationTools/Services/TelemetryClientAdapter.cs index 393108398..17aaea2e5 100644 --- a/src/MigrationTools/Services/TelemetryClientAdapter.cs +++ b/src/MigrationTools/Services/TelemetryClientAdapter.cs @@ -17,7 +17,7 @@ public class TelemetryClientAdapter : ITelemetryLogger public TelemetryClientAdapter(IMigrationToolVersion migrationToolVersion) { - + _MigrationToolVersion = migrationToolVersion; elmahIoClient = ElmahioAPI.Create("7589821e832a4ae1a1170f8201def634", new ElmahIoOptions { Timeout = TimeSpan.FromSeconds(30), @@ -68,6 +68,11 @@ public void TrackException(Exception ex, IDictionary properties) public void TrackException(Exception ex, IEnumerable> properties = null) { + if (properties == null) + { + TrackException(ex, null); + return; + } TrackException(ex, properties.ToDictionary(k => k.Key, v => v.Value)); } From 11eae5fb062d1a7641b451da5a2b105a7d7f4288 Mon Sep 17 00:00:00 2001 From: "Martin Hinshelwood nkdAgility.com" Date: Tue, 3 Sep 2024 16:44:55 +0100 Subject: [PATCH 09/11] Update with new tst for endpoints. --- .../Endpoints/TfsWorkItemEndPointTests.cs | 82 +++++++++++++++++++ .../Clients/TfsWorkItemMigrationClient.cs | 20 +++-- .../WorkItemQueryBuilderFactoryFake.cs | 17 ++++ .../ServiceCollectionExtensions.cs | 3 + 4 files changed, 115 insertions(+), 7 deletions(-) create mode 100644 src/MigrationTools.Shadows/Clients/WorkItemQueryBuilderFactoryFake.cs diff --git a/src/MigrationTools.Clients.TfsObjectModel.Tests/Endpoints/TfsWorkItemEndPointTests.cs b/src/MigrationTools.Clients.TfsObjectModel.Tests/Endpoints/TfsWorkItemEndPointTests.cs index e73b78b76..fdb7240e0 100644 --- a/src/MigrationTools.Clients.TfsObjectModel.Tests/Endpoints/TfsWorkItemEndPointTests.cs +++ b/src/MigrationTools.Clients.TfsObjectModel.Tests/Endpoints/TfsWorkItemEndPointTests.cs @@ -15,6 +15,9 @@ using MigrationTools.Tools.Interfaces; using MigrationTools.Tools.Shadows; using MigrationTools.Shadows; +using Microsoft.Extensions.Configuration; +using System.IO; +using System.Text; namespace MigrationTools.Endpoints.Tests { @@ -97,5 +100,84 @@ protected TfsWorkItemEndpoint GetTfsWorkItemEndPoint(string key = "Source", TfsW return (TfsWorkItemEndpoint)services.BuildServiceProvider().GetRequiredKeyedService(key); } + + [TestMethod(), TestCategory("L1")] + public void TfsWorkItemEndPoint_EnvironmentOverrideTest() + { + Environment.SetEnvironmentVariable("MigrationTools__Endpoints__Source__Authentication__AccessToken", "654321"); + IConfigurationBuilder configBuilder = GetSourceTargetBasicConfig(); + var configuration = configBuilder.AddEnvironmentVariables().Build(); + // Create services + IServiceCollection serviceCollection = new ServiceCollection(); + serviceCollection.AddSingleton(); + serviceCollection.AddMigrationToolServicesForUnitTests(); + serviceCollection.AddConfiguredEndpoints(configuration); + // Create a service provider from the service collection + var serviceProvider = serviceCollection.BuildServiceProvider(); + var endpoint = serviceProvider.GetKeyedService("Source"); + Assert.IsNotNull(endpoint, "Endpoint not found."); + Endpoint endpoint1 = endpoint as Endpoint; + // Validate that the correct number of endpoints are registered + Assert.AreEqual("654321", endpoint1.Options.Authentication.AccessToken, "Token not passed."); + + } + + private static IConfigurationBuilder GetSourceTargetBasicConfig() + { + // Create Config + var json = @" + { + ""MigrationTools"": { + ""Version"": ""16.0"", + ""Endpoints"": { + ""Source"": { + ""EndpointType"": ""TfsTeamProjectEndpoint"", + ""Collection"": ""https://dev.azure.com/nkdagility-preview/"", + ""Project"": ""migrationSource1"", + ""AllowCrossProjectLinking"": false, + ""ReflectedWorkItemIDFieldName"": ""Custom.ReflectedWorkItemId"", + ""Authentication"": { + ""AuthenticationMode"": ""AccessToken"", + ""AccessToken"": ""123456"", + ""NetworkCredentials"": { + ""UserName"": """", + ""Password"": """", + ""Domain"": """" + } + }, + ""LanguageMaps"": { + ""AreaPath"": ""Area"", + ""IterationPath"": ""Iteration"" + } + }, + ""Target"": { + ""EndpointType"": ""TfsTeamProjectEndpoint"", + ""Collection"": ""https://dev.azure.com/nkdagility-preview/"", + ""Project"": ""migrationTest5"", + ""TfsVersion"": ""AzureDevOps"", + ""Authentication"": { + ""AuthenticationMode"": ""AccessToken"", + ""AccessToken"": ""none"", + ""NetworkCredentials"": { + ""UserName"": """", + ""Password"": """", + ""Domain"": """" + } + }, + ""ReflectedWorkItemIDFieldName"": ""nkdScrum.ReflectedWorkItemId"", + ""AllowCrossProjectLinking"": false, + ""LanguageMaps"": { + ""AreaPath"": ""Area"", + ""IterationPath"": ""Iteration"" + } + } + }, + } + }"; + var stream = new MemoryStream(Encoding.UTF8.GetBytes(json)); + var configBuilder = new ConfigurationBuilder().AddJsonStream(new MemoryStream(Encoding.UTF8.GetBytes(json))); + return configBuilder; + } + } } \ No newline at end of file diff --git a/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemMigrationClient.cs b/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemMigrationClient.cs index 1a5f91a71..95be6bc0e 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemMigrationClient.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemMigrationClient.cs @@ -31,7 +31,18 @@ public TfsWorkItemMigrationClient(IOptions option { _telemetry = telemetry; _workItemQueryBuilderFactory = workItemQueryBuilderFactory; - InnerConfigure(migrationClient); + _bypassRules = WorkItemStoreFlags.BypassRules; + + Lazy _wistore = new Lazy(() => + { + Console.WriteLine("Initializing expensive WorkItemStore..."); + return GetWorkItemStore(); + }); + Lazy _project = new Lazy(() => + { + Console.WriteLine("Initializing expensive ProjectData from WorkItemStore..."); + return GetProject(); + }); } new TfsTeamProjectEndpointOptions Options => (TfsTeamProjectEndpointOptions)base.Options; @@ -243,12 +254,7 @@ private Endpoints.IWorkItemQuery GetWorkItemQuery(string WIQLQuery) } } - protected void InnerConfigure(IMigrationClient migrationClient, bool bypassRules = true) - { - _bypassRules = bypassRules ? WorkItemStoreFlags.BypassRules : WorkItemStoreFlags.None; - _wistore = GetWorkItemStore(); - _project = GetProject(); - } + public override WorkItemData PersistWorkItem(WorkItemData workItem) { diff --git a/src/MigrationTools.Shadows/Clients/WorkItemQueryBuilderFactoryFake.cs b/src/MigrationTools.Shadows/Clients/WorkItemQueryBuilderFactoryFake.cs new file mode 100644 index 000000000..2b3a04fdc --- /dev/null +++ b/src/MigrationTools.Shadows/Clients/WorkItemQueryBuilderFactoryFake.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using MigrationTools.Clients; + +namespace MigrationTools.Clients.Shadows +{ + public class WorkItemQueryBuilderFactoryFake : IWorkItemQueryBuilderFactory + { + public IWorkItemQueryBuilder Create() + { + throw new NotImplementedException(); + } + } +} diff --git a/src/MigrationTools.Shadows/ServiceCollectionExtensions.cs b/src/MigrationTools.Shadows/ServiceCollectionExtensions.cs index e8d377aa3..fbdf13c7b 100644 --- a/src/MigrationTools.Shadows/ServiceCollectionExtensions.cs +++ b/src/MigrationTools.Shadows/ServiceCollectionExtensions.cs @@ -1,4 +1,6 @@ using Microsoft.Extensions.DependencyInjection; +using MigrationTools.Clients; +using MigrationTools.Clients.Shadows; using MigrationTools.Services; using MigrationTools.Services.Shadows; using Serilog; @@ -29,6 +31,7 @@ public static void AddMigrationToolServicesForUnitTests(this IServiceCollection // Add Telemitery Adapter context.AddSingleton(); context.AddSingleton(); + context.AddSingleton(); } } } From a9875affbe09a55a20ebb4fa6aa521a442feb0b5 Mon Sep 17 00:00:00 2001 From: "Martin Hinshelwood nkdAgility.com" Date: Tue, 3 Sep 2024 17:06:04 +0100 Subject: [PATCH 10/11] Fixing Lazy loading! --- .../Clients/TfsWorkItemMigrationClient.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemMigrationClient.cs b/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemMigrationClient.cs index 95be6bc0e..5e0fa7311 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemMigrationClient.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Clients/TfsWorkItemMigrationClient.cs @@ -23,8 +23,8 @@ public class TfsWorkItemMigrationClient : WorkItemMigrationClientBase private ITelemetryLogger _telemetry; private readonly IWorkItemQueryBuilderFactory _workItemQueryBuilderFactory; private WorkItemStoreFlags _bypassRules; - private ProjectData _project; - private WorkItemStore _wistore; + private Lazy _project; + private Lazy _wistore; public TfsWorkItemMigrationClient(IOptions options, IMigrationClient migrationClient, IWorkItemQueryBuilderFactory workItemQueryBuilderFactory, ITelemetryLogger telemetry) : base(options, migrationClient, telemetry) @@ -33,12 +33,12 @@ public TfsWorkItemMigrationClient(IOptions option _workItemQueryBuilderFactory = workItemQueryBuilderFactory; _bypassRules = WorkItemStoreFlags.BypassRules; - Lazy _wistore = new Lazy(() => + _wistore = new Lazy(() => { Console.WriteLine("Initializing expensive WorkItemStore..."); return GetWorkItemStore(); }); - Lazy _project = new Lazy(() => + _project = new Lazy(() => { Console.WriteLine("Initializing expensive ProjectData from WorkItemStore..."); return GetProject(); @@ -46,8 +46,8 @@ public TfsWorkItemMigrationClient(IOptions option } new TfsTeamProjectEndpointOptions Options => (TfsTeamProjectEndpointOptions)base.Options; - public override ProjectData Project { get { return _project; } } - public WorkItemStore Store { get { return _wistore; } } + public override ProjectData Project { get { return _project.Value; } } + public WorkItemStore Store { get { return _wistore.Value; } } public List FilterExistingWorkItems( List sourceWorkItems, From f706a3b5d8c1d62b55f9e02da5db21af9813c3d2 Mon Sep 17 00:00:00 2001 From: "Martin Hinshelwood nkdAgility.com" Date: Tue, 3 Sep 2024 17:15:45 +0100 Subject: [PATCH 11/11] updatet to track http! --- src/MigrationTools/MigrationTools.csproj | 1 + src/MigrationTools/Services/ActivitySourceProvider.cs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/MigrationTools/MigrationTools.csproj b/src/MigrationTools/MigrationTools.csproj index dbf559fe0..e80a3bcd5 100644 --- a/src/MigrationTools/MigrationTools.csproj +++ b/src/MigrationTools/MigrationTools.csproj @@ -50,6 +50,7 @@ + diff --git a/src/MigrationTools/Services/ActivitySourceProvider.cs b/src/MigrationTools/Services/ActivitySourceProvider.cs index f04df8d15..e8e9d585b 100644 --- a/src/MigrationTools/Services/ActivitySourceProvider.cs +++ b/src/MigrationTools/Services/ActivitySourceProvider.cs @@ -148,6 +148,7 @@ public static IHostBuilder UseOpenTelemitery(this IHostBuilder builder, string v .AddSource(ActivitySourceProvider.ActivitySourceName) // Register your custom ActivitySource //.AddConsoleExporter() // Export traces to console .AddProcessor(new ActivitySourceProvider.ActivityFilteringProcessor()) + .AddHttpClientInstrumentation() .SetErrorStatusOnException() .AddAzureMonitorTraceExporter(options => { @@ -159,6 +160,7 @@ public static IHostBuilder UseOpenTelemitery(this IHostBuilder builder, string v { builder .SetResourceBuilder(ResourceBuilder.CreateDefault().AddService(entryAssemblyName, serviceVersion: versionString)) + .AddHttpClientInstrumentation() .AddRuntimeInstrumentation() .AddProcessInstrumentation() //.AddConsoleExporter() // Export metrics to console