Dgraph
Dgraph relies on DeepSource to decrease technical debt.
Dgraph is an open-source, low-latency, high throughput, and distributed graph database. It is designed to easily scale to meet the needs of companies that work with massive amounts of data.
We are using DeepSource for maintaining the quality of Dgraph, our distributed graph database. It has helped us decrease the amount of technical debt since it analyzes every GitHub pull request.
Challenge
Written entirely in Go, Dgraph is built to embrace simplicity and robustness. To keep these intact, maintaining code quality is one of the essential measures. The team had been using a code quality tool to keep everyone aligned but faced some limitations like lack of workflow integration, limited category of issues reported, and a few others.
Solution
The team at Dgraph needed something that would consistently maintain and ensure code quality. Soon after their founder saw the issues DeepSource's Go analyzer was able to detect, he onboarded his engineering team to evaluate the tool. DeepSource's native integration with GitHub and the way quality checks fit in the code review workflow, led to quick adoption across.
Results
Within a few days, Martin Martinez, Distributed Systems Engineer at Dgraph and one of the team members, noticed the value DeepSource was bringing and further added it to their related Go projects — Badger (key-value store) and Ristretto (highly performant cache).
Identifying and resolving bugs risks, anti-patterns
Today, Dgraph uses DeepSource effectively to detect critical issues across categories like bug risks, anti-patterns, performance issues, security flaws, and not just style and formatting warnings. Additionally, since each issue detected by DeepSource is tagged with the category it belongs to, the developers quickly prioritize which one to address first.
Pre-merge reviews reducing technical debt
Earlier, the code quality tool Dgraph was using needed manual effort to run analysis. This becomes a tedious task when you are creating close to 30 pull requests per developer every week.
With DeepSource, Dgraph's code review is now streamlined. DeepSource checks fit right into the code review workflow. The team sees the status of their pull request directly as a GitHub check within a few seconds of creating them. This way every PR is automatically analyzed before the code is merged. DeepSource's pre-merge checks act as a gatekeeper preventing issues from entering the codebase. DeepSource has helped decrease the amount of technical debt since it analyzes every GitHub PR.
Extensive issue coverage to minimize risks
Dgraph's engineering team is continuously rolling out fixes, features, new versions. In such a fast-paced cycle, maintaining consistency and best practices across the codebase gets difficult. Moreover, they can neither afford the time-intensive code review loops nor the risk of missing issues.
That's where DeepSource adds value. DeepSource has larger number of checks than the other tools we tried.
Our dedicated analyzer team adds new issues regularly and keeps an eye on false positive reports as well. This has helped Dgraph team in two ways:
- Spotting most of the issues in one review itself, resolving to ensure these don't bypass the checks and allowing developers to get back to focusing on building software faster
- Accuracy of issues encourages developers to take the reports seriously. The low frequency of false positives has made DeepSource a reliable check