Thursday, October 27, 2022

Err work item is not ready save - nkd azure devops migration tool

 

I am trying to migrate the workitems from one azure devops org to other azure devops org project.

ERR] System.InvalidOperationException: This path is not anchored in the source project name: it   at MigrationTools.Enrichers.TfsNodeStructure.GetNewNodeName(String sourceNodePath, TfsNodeStructureType nodeStructureType) in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.ObjectModel\ProcessorEnrichers\TfsNodeStructure.cs:line 99   at VstsSyncMigrator.Engine.WorkItemMigrationContext.PopulateWorkItem(WorkItemData oldWi, WorkItemData newwit, String destType) in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 402   at VstsSyncMigrator.Engine.WorkItemMigrationContext.ReplayRevisions(List`1 revisionsToMigrate, WorkItemData sourceWorkItem, WorkItemData targetWorkItem) in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 642[14:23:01 INF] ===============================================================[14:23:01 DBG] TfsExtensions::SaveToAzureDevOps

[14:23:01 DBG] TfsExtensions::SaveToAzureDevOps: ChangedBy: , AuthorisedBy: Nnkata[14:23:01 WRN] Work Item is not ready to save as it has some invalid fields. This may not result in an error. Enable LogLevel as 'Debug' in the config to see more.[14:23:01 DBG] --------------------------------------------------------------------------------------------------------------------

[14:23:01 DBG] --------------------------------------------------------------------------------------------------------------------

[14:23:01 DBG] TfsExtensions::ToJson

[14:23:01 DBG] Invalid Field Object:

{

  "WorkItemId": 0,

  "CurrentRevisionWorkItemRev": 0,

  "CurrentRevisionWorkItemTypeName": "Feature",

  "Name": "Area Path",

  "ReferenceName": "System.AreaPath",

  "Value": "i",

  "OriginalValue": "",

  "ValueWithServerDefault": "",

  "Status": 16,

  "IsRequired": true,

  "IsEditable": true,

  "IsDirty": true,

  "IsComputed": true,

  "IsChangedByUser": true,

  "IsChangedInRevision": true,

  "HasPatternMatch": false,

  "IsLimitedToAllowedValues": false,

  "HasAllowedValuesList": false,

  "AllowedValues": [],

  "IdentityFieldAllowedValues": [],

  "ProhibitedValues": []

}

[14:23:01 DBG] TfsExtensions::ToJson

[14:23:01 DBG] Invalid Field Object:

{

  "WorkItemId": 0,

  "CurrentRevisionWorkItemRev": 0,

  "CurrentRevisionWorkItemTypeName": "Feature",

  "Name": "Iteration Path",

  "ReferenceName": "System.IterationPath",

  "Value": "\\Admin Portal\\Sprint 14 Sep - 25 Sep",

  "OriginalValue": "",

  "ValueWithServerDefault": "\\Admin Portal\\Sprint 14 Sep - 25 Sep",

  "Status": 16,

  "IsRequired": true,

  "IsEditable": true,

  "IsDirty": true,

  "IsComputed": true,

  "IsChangedByUser": true,

  "IsChangedInRevision": true,

  "HasPatternMatch": false,

  "IsLimitedToAllowedValues": false,

  "HasAllowedValuesList": false,

  "AllowedValues": [],

  "IdentityFieldAllowedValues": [],

  "ProhibitedValues": []

}

[14:23:01 DBG] --------------------------------------------------------------------------------------------------------------------

[14:23:01 DBG] --------------------------------------------------------------------------------------------------------------------

[14:23:01 ERR] Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF237124: Work Item is not ready to save

   at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem.Save(SaveFlags saveFlags)

   at MigrationTools.TfsExtensions.SaveToAzureDevOps(WorkItemData context) in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.ObjectModel\TfsExtensions.cs:line 77

   at VstsSyncMigrator.Engine.WorkItemMigrationContext.<ProcessWorkItemAsync>d__35.MoveNext() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 505

Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF237124: Work Item is not ready to save

   at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem.Save(SaveFlags saveFlags)

   at MigrationTools.TfsExtensions.SaveToAzureDevOps(WorkItemData context) in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.ObjectModel\TfsExtensions.cs:line 77

   at VstsSyncMigrator.Engine.WorkItemMigrationContext.<ProcessWorkItemAsync>d__35.MoveNext() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 505

[14:23:01 ERR] Could not save migrated work item 696, an exception occurred.

System.AggregateException: One or more errors occurred. ---> Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF237124: Work Item is not ready to save

   at VstsSyncMigrator.Engine.WorkItemMigrationContext.<ProcessWorkItemAsync>d__35.MoveNext() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 550

   --- End of inner exception stack trace ---

   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)

   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)

   at VstsSyncMigrator.Engine.WorkItemMigrationContext.InternalExecute() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 205

---> (Inner Exception #0) Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF237124: Work Item is not ready to save

   at VstsSyncMigrator.Engine.WorkItemMigrationContext.<ProcessWorkItemAsync>d__35.MoveNext() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 550<---

[14:23:01 WRN] The following items could not be migrated: 696

[14:23:01 INF] DONE in 00:08:24.0134378

[14:23:01 FTL] Error while running WorkItemMigration

System.AggregateException: One or more errors occurred. ---> Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF237124: Work Item is not ready to save

   at VstsSyncMigrator.Engine.WorkItemMigrationContext.<ProcessWorkItemAsync>d__35.MoveNext() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 550

   --- End of inner exception stack trace ---

   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)

   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)

   at VstsSyncMigrator.Engine.WorkItemMigrationContext.InternalExecute() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 225

   at MigrationTools._EngineV1

Migrate the Azure DevOps workitems from One Azure Devops org project to another Azure DevOps Org project

When migrating found that the Area path is different at the time of creation , after few days we changed to different Area Path name.

Can anyone help how we can skip or take force migration for Target project?



SOLUTION:


Is this because you have the ReplayRevisions set to true In Configuration.json file, and it is replaying all the revisions

Wednesday, July 20, 2022

Kuberenetes Introduction - Part 1

 

What is Kubernetes?

  • Kubernetes is an open-source system for automating the deployment, scaling, and management of containerized applications.
  • Kubernetes helps to package and distribute apps using image format and container technologies.
  • It groups containers that make up an application into logical units for easy management and discovery.
  • Kubernetes builds upon 15 years of experience of running production workloads at Google, combined with best-of-breed ideas and practices from the community.
  • Kubernetes Features

    Automatic bin packing

    • Automatically places containers based on their resource requirements and other  constraints, while not sacrificing availability.

    • Mix critical and best-effort workloads in order to drive up utilization and save even more resources.

    Automated rollouts and rollbacks

    • Kubernetes progressively rolls out changes to your application or its configuration,  while monitoring application health to ensure it doesn't kill all your instances at the same time.

    • If something goes wrong, Kubernetes will roll back the change for you.

    • Take advantage of a growing ecosystem of deployment solutions.

    Horizontal scaling

    • Scale your application up and down with a simple command, with a UI, or automatically based on CPU usage.

    Service discovery and load balancing

    • No need to modify your application to use an unfamiliar service discovery mechanism.

    • Kubernetes gives containers their own IP addresses and a single DNS name for a set of containers and can load-balance across them.

    Storage orchestration

    • Automatically mount the storage system of your choice, whether from local storage, a  public cloud provider such as GCP or AWS, or a network storage system such as NFS,  iSCSI, Gluster, Ceph, Cinder, or Flocker.

    Self-healing

    • Restarts containers that fail, replace and reschedule containers when nodes die, kills  containers that don't respond to your user-defined health check, and doesn't advertise  them to clients until they are ready to serve.

    Secret and configuration management

    • Deploy and update secrets and application configuration without rebuilding your image and without exposing secrets in your stack configuration.

    Kubernetes Architecture

    Node Controller/ Master

    • The node controller is a Kubernetes master component that manages various aspects of nodes.

    • The node controller has multiple roles in a node’s life. (1). The first is assigning a CIDR block to the node when it is registered (if the CIDR  assignment is turned on).  (2). The second is keeping the node controller’s internal list of nodes up to date with the cloud provider’s list of available machines. (3).  The third is monitoring the nodes’ health.

    • The services on a Node Controller/Master Node include kube-api, kube-scheduler, kube-controller-manager and etcd.

    Node/Minions

    • A node is a worker machine in Kubernetes, previously known as a minion.

    • A node may be a VM or physical machine, depending on the cluster.

    • Each node has the services necessary to run pods and is managed by the node components.

    • The services on a Node include Docker, kubelet and kube-proxy, CNI.





    Node Controller/Master Components

    Kube-ApiServer

    • The Kubernetes API-server generally validates the configuration data store in ‘Etcd’ and the details of the deployed container that are in agreement.

    • It also provides a RESTful interface to make communication easy.

    Kube-Controller-Manager

    • It is generally responsible for handling the cluster level function such as replication controller.

    • Whenever the desired state of the cluster changes it is written to Etcd and then the controller manager tries to bring up the cluster in the desired state.

    Kube-Schedule Server

    • It is responsible for assigning tasks to nodes/minions in the cluster.

    Etcd

    • It is an open-source key-value store developed by the CoreOs team. Kubernetes uses  ‘Etcd’ to store the configuration data accessed by all nodes (minions and master) in the cluster.

    Node Components

    Kubelet

    • Host-level pod management.

    • It deals with pod specifications that are defined in YAML or JSON format.

    • It is responsible for managing pods and their containers.

    • It is an agent process that runs on each node.

    • Kubelet takes the pod specifications and checks whether the pods are running healthy or not.

    Kube-Proxy

    • Every node in the cluster runs a simple network proxy. Using a proxy node in cluster routes requests to the correct container in a node.

    • Manages the container network (IP addresses and ports) based on the network service manifests received  from the Kubernetes master.

    Docker

    • An API and framework built around Linux Containers (LXC) that allows for the easy management of containers and their images.

    CNI

    • A network overlay that will allow containers to communicate across multiple hosts.



    Setting Up Azure CLI on Linux for Seamless Azure Management

    Introduction

    The Azure CLI (Command-Line Interface) is a powerful tool that enables seamless interaction with Azure resources. In this blog post, we'll walk through the process of setting up Azure CLI on a Linux machine. Whether you are an administrator, developer, or an Azure enthusiast, having Azure CLI locally on your Linux computer allows you to execute administrative commands efficiently.

    Prerequisites

    Before we start, ensure you have the following prerequisites:

    • A Linux computer
    • Administrative privileges on the Linux machine

    Step-by-Step Guide

    Step 1: Import Microsoft Repository Key

    Open your terminal and run the following command to import the Microsoft repository key:

    bash
    $ sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
    Step 2: Create Local Azure-CLI Repository Information

    Create and configure the local Azure CLI repository information by running the following commands:

    bash
    $ sudo sh -c 'echo -e "[azure-cli]
    name=Azure CLI
    baseurl=https://packages.microsoft.com/yumrepos/azure-cli
    enabled=1
    gpgcheck=1
    gpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/azure-cli.repo'


    Step 3: Install Azure CLI

    Install Azure CLI using the yum install command:

    bash
    $ sudo yum install azure-cli -y

    Step 4: Check the Installed Version

    Verify the successful installation by checking the installed version of Azure CLI:

    bash
    $ az --version

    Conclusion

    Congratulations! You've successfully set up Azure CLI on your Linux machine. With Azure CLI, you can now execute a wide range of administrative commands, manage Azure resources, and streamline your interactions with Azure services directly from the command line.

    For more details and additional options, you can refer to the official documentation: Install Azure CLI on Linux.

    Now you're ready to explore and harness the power of Azure CLI for efficient Azure management on your Linux environment. Happy coding!

    Featured Post

    Ansible Tool Introduction

                                                                                                                                        Next ...