Yokyo Drift scans all repositories in use at Yelp, opens pull requests that upgrade outdated dependencies, and tracks their progress. Batch jobs index what each repository depends on; an upgrade job puts one payload per repository on a queue, and workers that scale with the queue make the change and submit the pull request.
Near: Yokyo Drift actively scans all repositories in use | Near: Batch jobs regularly collect and index a variety | Section: Scaling
Components
Component
Role
Where
Indexing batch jobs
Regularly collect and index information about Yelp repositories, including which dependencies each uses, so that the repositories affected by a vulnerable dependency can be identified at once.
Near: Batch jobs regularly collect and index a variety
Yokyo Drift UI
Shows the indexed information, lets a person start a targeted upgrade by hand, and tracks each task through its stages; from the progress screen an upgrade can be rerun on one repository, cancelled or reverted, and teams can be nudged.
Near: All indexed information is available in a simple | Section: Targeted Upgrades | Section: Progress Tracking
Yokyo Drift API
Lets other teams invoke targeted upgrades of specific libraries to specific minimal versions across the organisation.
Section: Targeted Upgrades
Upgrade queue
Holds one payload for each repository that a new upgrade job needs to upgrade.
Near: Creating a new upgrade job enqueues a payload
Workers
Take items off the queue, make the necessary changes and submit the pull requests. They scale up as the queue grows and back down when it clears.
Near: Workers are then responsible for taking items off
Curated package repositories
Hold the pre-vetted dependency versions; upgrades can only go to these versions.
Near: Yelp projects rely on curated package repositories, and
Ownership service
Tells Yokyo Drift which team is responsible for each repository, so the pull request can be assigned to one of its owners.
Near: We rely on the Ownership service to determine
Fan an upgrade job out as one queue item per repository, drained by workers that scale with queue size
yelp-2023-yokyo-drift-dependency-upgrades#d1at corpus version 26a1b3a7e3dd
Chosen
A new upgrade job puts one payload on a queue for every repository it has to touch. Workers pull those items, make the changes and submit the pull requests, and are configured to scale up automatically as the queue grows and back down when it clears.
Near: Creating a new upgrade job enqueues a payload | Near: Workers are configured to automatically scale up as
Reasoning
Updating dependencies on one repository can take a long time, since it may involve building the project, resolving dependencies and running some automated checks. The author says that is manageable for one repository but quickly becomes unusable for hundreds or thousands, so the service has to scale up and down as needed.
Near: Updating dependencies on one repository can be time-consuming.
Spread scheduled dependency upgrades randomly across the month instead of running them all on one day
yelp-2023-yokyo-drift-dependency-upgrades#d2at corpus version 26a1b3a7e3dd
Chosen
Scheduled upgrades, which repository owners can set the frequency of and which typically run monthly or quarterly for both major and minor versions, are distributed randomly through the month.
Section: Scheduled Upgrades
Reasoning
The spread gives consistent resource use with few spikes. The author calls the other reason more important: the supporting teams can help repository owners without swamping them with pull requests all at once, since upgrading every repository in one day would bring an overwhelming number of questions in a short time.
Near: This ensures a consistent use of resources with | Near: Performing upgrades for all repositories in one day
Deliver each upgrade as a GitHub pull request through the normal CI pipeline, merged only after an owner approves
yelp-2023-yokyo-drift-dependency-upgrades#d3at corpus version 26a1b3a7e3dd
Chosen
Every change is a GitHub pull request, so it runs the existing CI pipeline with its security and automated tests. The Ownership service names the responsible team and the pull request is assigned to one of the repository's owners, who makes any small manual fixes. It merges automatically once all checks pass and the owner approves. Reviewers get automated reminders, and the service attempts to keep the pull request current by pulling master and redoing the upgrade if needed.
Section: Pull Requests
Reasoning
The post lists as a requirement that projects have a robust test pipeline with good coverage, run in CI before any change is accepted. The author's reasoning is that upgrades are likely to introduce bugs, and without adequate testing teams may not feel confident merging them and so stay on outdated dependencies.
Section: Requirements
Cost
The author reports that teams are occasionally unable to review these pull requests in a timely manner, which is why automated reminders are sent.
Near: Occasionally, teams will be unable to review these
Let any team push one library to a minimum version across every affected repository and watch the rollout
yelp-2023-yokyo-drift-dependency-upgrades#d5at corpus version 26a1b3a7e3dd
Chosen
Besides scheduled upgrades, a targeted upgrade moves a specific library to a specific minimal version across the whole organisation. Other teams start one through the Yokyo Drift API or by hand in the UI. A job progress page follows each repository's task through pending, in_progress, open and merged, and lets the upgrade be rerun on single repositories, cancelled or reverted.
The author says security teams use it frequently: once a vulnerability is found in a version of a library they can see the impact at once, deploy a mass upgrade across Yelp's projects and monitor until it is eliminated. Library owners also use it often, to get bug fixes and improvements quickly into all relevant projects.