GitLab recently discussed Duo Chat, a new chat assistant designed to make code reviews easier for developers and reviewers. This feature available with GitLab Duo Ultimate and Enterprise, helps engineers understand code changes, follow discussions, and track dependencies, while ensuring high-quality code.
Dr Torsten Linz, Senior Product Manager at GitLab expanded on Duo chat in a blog post. Linz mentioned that GitLab Duo Chat is similar to a code review buddy who can answer your questions and explain the reasoning behind the changes to help engineers understand the code in depth.
Consider you are reviewing a merge request called "Add logging to order processing." Duo Chat can quickly answer your key questions such as, does it capture all potential error scenarios? Are there any privacy risks associated with the logged data? And most importantly, what was the rationale behind selecting these specific logging points?
This helps engineers understand why the changes were made and spot potential problems without digging through code or waiting for the author to reply. By getting quick answers, engineers can save time and be more productive during the code reviews.
Source: Chat about your merge request with GitLab Duo
In another example, if an MR involves both adding notifications and refactoring the code, you can ask Duo Chat things like whether refactoring the payment service causes network problems? Were there any trade-offs between making the code consistent and improving performance? What happens if the notification system fails? Are there any retries?
Engineers can also have a back-and-forth conversation with Duo Chat to get more details or clarify anything you're unsure about.
Duo Chat is deeply integrated with GitLab and understands the details of each merge request, including the description, discussions, code changes, and other important information. This means Duo Chat can act as an informed assistant, explaining specific parts of the code or even suggesting ways to rewrite certain sections. This makes it much easier to understand complex merge requests quickly.
GitLab Duo was also in the news as it became available to all open source contributors across the GitLab community forks. Daniel Murphy, Senior Program Manager at GitLab announced this development in a LinkedIn post. Nick Veenhof, Director of Contributor Success at GitLab reposted this announcement and mentioned,
...As some of you might know, AI & Code Assistants are somewhat of a thing these days. Why not learn what it is all about by using it while you learn the ins and outs of the GitLab codebase and even get a change or 2 into the GitLab product.
Linz further noted that Duo Chat is constantly learning and improving towards a true conversational partner for both developers and reviewers. Encouraging the users to share their feedback on Duo Chat via their issue tracker, Linz has invited the community to share what questions they asked Duo Chat and the answers they received.
For further reading, interested readers can head over to the GitLab Duo Chat documentation and introductory video. Duo Chat is available for free with a 60-day trial of GitLab Ultimate and GitLab Duo Enterprise.