Mattermost Logo
We're hiring!

Mattermost Developer Blog

Automated UI Testing With Cypress Posted on Jul 27, 2020 by Saturnino Abril

It’s been more than a year and a half since we started using Cypress for our automated functional testing and it has been worth the investment. It has now become an essential part of our process to automate regression testing to ship new releases faster, with increased quality. It’s fun and easy to get started with Cypress but as we added more scripts with the varying requirements, we faced several setbacks and hurdles, such as flaky tests, which slow down our efforts in automating test cases.

Read More
From OpenVPN to Pritunl VPN: The transition Posted on Jun 11, 2020 by Angelos Kyratzakos

Usually organizations use an internal network to prevent unauthorized people from connecting to their private network and by using their own network infrastructure/connectivity they can maintain their desirable level of security for their data. But it would be convenient for users to connect to that private network while they are away from the office’s building, on their own internet connection. To solve that problem, VPN (Virtual Private Network) is used to allow authorized remote access to an organization’s private network.

Read More
OpenTracing for Go Projects Posted on Jun 10, 2020 by Eli Yukelzon

What is distributed tracing? Large-scale cloud applications are usually built using interconnected services that can be rather hard to troubleshoot. When a service is scaled, simple logging doesn’t cut it anymore and a more in-depth view into system’s flow is required. That’s where distributed tracing comes into play; it allows developers and SREs to get a detailed view of a request as it travels through the system of services. With distributed tracing you can:

Read More
Getting Hands-on with io_uring using Go Posted on May 20, 2020 by Agniva De Sarker

In Linux, system calls (syscalls) are at the heart of everything. They are the primary interface through which an application interacts with the kernel. Therefore, it is vital that they are fast. And especially in a post-Spectre/Meltdown world, this is all the more important. A major chunk of the syscalls deal with I/O, because that’s what most applications do. For network I/O, we’ve had the epoll family of syscalls which have provided us with reasonably fast performance.

Read More
Advanced Git with the Free University of Tbilisi Posted on Mar 27, 2020 by Jesse Hallam

On Monday, March 16, 2020, I had the privilege to (virtually) join Shota Gvinepadze and his students at the Free University of Tbilisi and speak about “Advanced Git @ Mattermost” for a portion of their class time. The following are my speaking notes from the session, slightly modified from the original slides for this format. Keep in mind that the command line examples are illustrative of my workflow, and not meant to be run in isolation.

Read More
All About Emojis Posted on Mar 26, 2020 by Harrison Healey

In person, you can easily tell someone’s mood based on their body language and how they speak, but that’s much more difficult with text alone. Emojis are a great way to add tone to a piece of text and also help make text-based conversation feel more casual, relaxed, and fun. Thanks to emojis, we can chat with much more real emotion than you might get by being careful about your word choice or by including just the right number of exclamation marks and periods at the end of a sentence.

Read More
Maintaining Consistency in Codebases with Go vet Posted on Mar 17, 2020 by Jesús Espino

Maintaining success in a large open-source project is one of the key objectives of Mattermost. We have hundreds of contributors and we want to create a project that could serve as a model in the Go community. Having said that, following idiomatic Go principles is the thing that we care most about while maintaining our code consistency. For this specific task, we utilized go vet and with this blog post, I would like to explain how we pushed the limits of this tool by extending it.

Read More
Instrumenting Go code via AST, Part 2 Posted on Mar 15, 2020 by Eli Yukelzon

Welcome! This is the second part of our AST blog post series, expanding on the subject of utilizing Go AST libraries to automate and improve your workflow. In this post I’ll discuss a rather common problem that comes up while working with Go code and the way we’ve solved it by sprinkling a little bit of AST magic dust. Let’s dive in. Problem: A struct with no interface Let’s say you are working on a large code base that was not built with interfaces in mind, meaning, there are structs and methods attached to those structs, but there is no interface describing it.

Read More
Layered Store and Struct Embedding in Go Posted on Feb 26, 2020 by Jesús Espino

One of the most important parts of the Mattermost source code is the one responsible for accessing the Mattermost database - the store. Every single database access is handled by the store, so we needed to find a way to extend its functionality while introducing as little complexity as possible. This is the reason behind the current layered approach using struct embedding. Our store is responsible for storing and retrieving data, and sometimes we need to add functionality that is not strictly related to the database queries, for example, cache data or add instrumentation.

Read More
Incorporating GolangCI-Lint at Mattermost Posted on Jan 13, 2020
by Agniva De Sarker and Ben Schumacher

At Mattermost, we have traditionally relied on the trusty go vet and gofmt checks for our CI runs. Although it works well, there are a lot of other powerful linters out there which we’re potentially missing out on. Speaking of linters, the first name that inevitably comes up is staticcheck. It’s a powerful metalinter with a whole slew of checks. But simply running staticcheck is not sufficient, because it misses out on other linters which perform a single task, but nevertheless are very powerful.

Read More