<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Naama Finer on Medium]]></title>
        <description><![CDATA[Stories by Naama Finer on Medium]]></description>
        <link>https://medium.com/@nsegev3?source=rss-3c9816ce3ea------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*mUv7a-b3Cva_0B9jQMR00A.png</url>
            <title>Stories by Naama Finer on Medium</title>
            <link>https://medium.com/@nsegev3?source=rss-3c9816ce3ea------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 18:22:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nsegev3/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How To Survive Legacy Trap — Part 2]]></title>
            <link>https://engineering.payoneer.com/how-to-survive-legacy-trap-part-2-2f882becfc76?source=rss-3c9816ce3ea------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f882becfc76</guid>
            <category><![CDATA[legacy]]></category>
            <category><![CDATA[infrastructure]]></category>
            <category><![CDATA[nuget]]></category>
            <category><![CDATA[dependencies]]></category>
            <dc:creator><![CDATA[Naama Finer]]></dc:creator>
            <pubDate>Tue, 22 Nov 2022 08:02:28 GMT</pubDate>
            <atom:updated>2022-11-27T15:03:55.791Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to survive the legacy trap - Part 2</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8_EAk1M0_R3szterBfprow.png" /></figure><p>Every company that’s been around for even a short while will have accumulated some legacy code. And, as the years pass, it gets harder and harder to maintain this code. When components depend on legacy code, upgrading can cause a cascading effect on a chain of dependencies, causing a legacy trap.</p><p><a href="https://engineering.payoneer.com/nuget-hell-how-to-survive-part-1-98ea7c17f52e">In part 1</a> we described how the decision to solve the dependency management trap was made. In this article, we will describe the technical solution for the legacy trap and the challenges we faced during this process.</p><p>Because the Payoneer system is large (containing more than 850 services), upgrading all of them requires a lot of thinking and utilities to help the developers handle it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*o5-IOjeevhWfws0HjnKFTw.png" /><figcaption>NuGets and Services Dependency Graph</figcaption></figure><p>Most of our technology stack is based on .NET, and therefore services have dependencies on <a href="https://www.nuget.org/">NuGets</a> which are external, or which were created by other teams, and these NuGets have dependencies on other NuGets, and so on. To help navigate this system, we needed a way to map this chain of dependencies so developers would know how they may affect others (and how others may affect them).</p><p>Before we could jump into upgrading packages in the different services, though, we had to check how many outdated dependencies there were, and how we could upgrade the code as easily as possible. To get a better sense of how big the problem was, we decided to check how many services can pass a build after upgrading their NuGets to the latest version.</p><p>To aid with that and make this process repeatable, we created the Orchestrator<em> </em>project.</p><h3>The Orchestrator</h3><p>The Orchestrator<em> </em>project builds a dependency graph between services and NuGets by iterating over all the R&amp;D repos and generating a Neo4j graph. For each repo there’s a node in the graph that represents it, and for each dependency on a NuGet package there is an edge.</p><p>After the graph is created, the Orchestrator will try to auto-upgrade NuGets in a repo using a pipeline that is created and runs for every repo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2HnjIx8BztzKBCfIVRkYZA.png" /><figcaption>The Orchestrator flow</figcaption></figure><p>The way the Orchestrator<em> </em>works looks like this:</p><p>1. It first scans the Neo4J graph and creates a list of all the least dependent repositories, or “leaves”, in the graph and removes those nodes from it. <br>2. It then iterates on the “leaves” list. On each iteration the process runs a pipeline that upgrades the dependent NuGets (if there are any) in the current repo to the latest version. <br>3. It checks the upgrade results. The pipeline contains steps that run unit and integration tests on the new, upgraded repo version. If the upgrade was a successful build, a pull request that contains the upgraded NuGet versions is created for that repo. If the build fails, we mark this repo as failed for the dependent repos ahead. <br>4. Once we run it on all the repositories list, we go back to step 1 until there are no more nodes in the graph and we’ve finished upgrading all the repos.</p><p>There are some additional features that will cause a failed build.</p><ol><li>If at least one project inside the repository depends on a NuGet that was marked as <em>failed</em> in previous iterations.</li><li>We manage a blocklist for NuGets where we want to enforce their deprecation, so the build step will fail if at least one project inside the repository depends on a NuGet from the blocklist</li></ol><h3>The pipeline</h3><p>The Orchestrator<em> </em>creates a generic pipeline for each repository in the organization. This is so we can always monitor the progress and status of each project separately.</p><p>The main purpose of the pipeline is to upgrade the internal NuGets in the projects inside a repository. If we succeed, we will create a pull request for that repo to be approved by the relevant team.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*0vYQzWCT9qh6pljmWuKAUQ.png" /><figcaption>The pipeline steps</figcaption></figure><p>The pipeline process starts by getting all the latest (stable!) NuGet versions. Then, we make sure there are no obsolete NuGets in the project, If there are none, we install the new NuGet versions in the project, build the solution, run unit and integration tests and if we pass all those steps, we create a new branch with a pull request.</p><p>Some personal preferences we added to the pipeline:<br>1. Make sure the project is in the new csproj version<br>2. Create a binding redirect in a project if necessary</p><p>To accomplish the target of successfully upgrading all the services, we created a project called the <em>NLN — Nightly Latest NuGet. </em>Once the NLN project started, each team in the R&amp;D began upgrading their NuGets. The Orchestrator<em> </em>build process started to run each night and created a daily report of the service upgrade status. Using Grafana dashboard, we created a visualization that reflected the repositories’ NuGet status for all the repos in R&amp;D.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tkB4e6SRKfp08ig6-bFzrQ.png" /><figcaption>Grafana Dashboard</figcaption></figure><p>To conclude, we’re surviving our legacy tangle thanks to the Orchestrator,<em> </em>which helps organize the process. The company will benefit from this process, but the next step for us is to maintain the services updated status and integrate the upgrade process on a day-to-day basis.</p><p><em>Author: Naama Finer</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f882becfc76" width="1" height="1" alt=""><hr><p><a href="https://engineering.payoneer.com/how-to-survive-legacy-trap-part-2-2f882becfc76">How To Survive Legacy Trap — Part 2</a> was originally published in <a href="https://engineering.payoneer.com/">Payoneer Engineering, Product &amp; AI Transformation</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Survive Legacy Trap: Part 1]]></title>
            <link>https://engineering.payoneer.com/nuget-hell-how-to-survive-part-1-98ea7c17f52e?source=rss-3c9816ce3ea------2</link>
            <guid isPermaLink="false">https://medium.com/p/98ea7c17f52e</guid>
            <category><![CDATA[dependencies]]></category>
            <category><![CDATA[infrastructure]]></category>
            <category><![CDATA[management]]></category>
            <category><![CDATA[nuget]]></category>
            <category><![CDATA[legacy]]></category>
            <dc:creator><![CDATA[Naama Finer]]></dc:creator>
            <pubDate>Mon, 20 Jun 2022 08:51:56 GMT</pubDate>
            <atom:updated>2022-11-27T15:04:29.180Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to survive the legacy trap - Part 1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eGBK-f-0r4AVVNFAlyvFrw.png" /></figure><p>Every company that’s passed a few miles on its road has accumulated legacy code. As the years pass, the maintenance of legacy code gets harder and harder, and as the company grows and creates more and more features that use or depend on legacy code, things get complex, and the programmers starts to compromise on the quality of their code.</p><p>One of the sources of pain and complexity is when the legacy code has dependencies on libraries created by other teams that have newer versions, but due to all kind of reasons (e.g., priorities), they were not upgraded in the legacy code. And when other components depend on the legacy code you start to get a chain of dependencies, where each upgrade can cause a cascading effect. This is how “<a href="https://www.nuget.org/">NuGet</a> hell” is created.</p><p>This article is about how we decided to manage the NuGet hell and develop the challenges into a strategic project in Payoneer.</p><p>Payoneer has been building its systems for more than a decade. Some of the services have legacy code, written in old frameworks, and nobody remembers exactly why there’s so much messy code.</p><p>The Payoneer system is large, containing more than 850 services. In a study we performed, we discovered that ~90% of the services need a NuGet upgrade. Some just need a minor version change, and some require massive code changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*o5-IOjeevhWfws0HjnKFTw.png" /><figcaption>NuGets and services dependency graph</figcaption></figure><p>Usually, no one wakes up one morning and decides to just upgrade all 850 services in a company. It’s even more unlikely that new feature development would be suspended so that the entire R&amp;D department could be free for this upgrading task. You can imagine our surprise when our CTO decided to do exactly this.</p><p>This decision was not made lightly. It was a process with a specific target in mind that justified the means.</p><p>It all began with a management initiative to improve the delivery process in the company. All the group leaders and directors sat with the CTO and prepared a list with all the reasons that they believed were holding them back and slowing their delivery process. The result was a list that contained 50 reasons. They voted on all of them, ranked them, and eventually came up with the top 10 reasons. After analyzing the top 10, we decided to focus our first phase effort on improving many old components that rely on legacy code and aren’t using known best practices.</p><p>The next step in expediting the delivery process was to check how many outdated dependencies there were, and how we could upgrade the code as easily as possible. To get a better sense of how big the problem is, we decided to check how many services can pass a build that upgraded its NuGets to the latest versions. For that reason, we created the “Orchestrator“.</p><p>The Orchestrator is a project that analyzes all the repositories in the company and checks if they contain internal NuGets that require an update. The result from the Orchestrator is saved in a database. Using Grafana, we created visualizations to monitor the repositories’ upgrade status at all times.</p><p>We had two quarters for the entire R&amp;D to update their NuGets. After the project time frame was set, there was a need to create a management authority to help with rising challenges and to monitor the progress of the upgrading project in all of the teams. A steering committee was founded that included managers from different departments, so we could get a full status overview from the teams in the R&amp;D department.</p><h3>Challenges</h3><p>We encountered some challenges during this process:</p><ol><li>The entire R&amp;D department started the upgrade task together, but there were NuGets that a lot of services were dependent on, and people couldn’t start their tasks until all the dependencies were resolved.</li><li>We encountered NuGets that should not be maintained anymore and instead should be deprecated. This revelation caused a lot of teams to reopen and modify their services multiple times.</li><li>Some of the deprecated NuGets contained code that was still helpful and needed by some teams.</li></ol><p>The steering committee was helpful when discussing, deciding, and resolving all the challenges. Here are some ways we handled the challenges:</p><ol><li>The deprecated NuGets were marked and added to a “rejected list” of NuGets. Once the committee approved this list, there were almost no changes mid-process. This list was also used inside the Orchestrator process, which reflected the development teams upgrade status each day.</li><li>To handle necessary code in deprecated NuGets, we created a tech-lead forum that finds replacement code and created a mapping list for each usage. This tech-lead group also gave support to their designated teams.</li><li>We defined a “sunset list” – a list of services that should be rewritten instead of upgraded. Each service was given a different timetable based on its complexity.</li><li>We used internal Stack Overflow and Azure wiki pages as tools for sharing knowledge and upgrading issues among the developers.</li></ol><p>Fixing and standardizing NuGet dependencies in a large-scale organization is not just a technical challenge. It requires an organizational and cultural change as well. Luckily, with the steps and decisions we made along the way, we managed to survive and excel at this big and ambitious project.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98ea7c17f52e" width="1" height="1" alt=""><hr><p><a href="https://engineering.payoneer.com/nuget-hell-how-to-survive-part-1-98ea7c17f52e">How To Survive Legacy Trap: Part 1</a> was originally published in <a href="https://engineering.payoneer.com/">Payoneer Engineering, Product &amp; AI Transformation</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>