Improve GitLab Pipeline Performance with DAGs

Directed Acyclic Graph (DAG) style dependencies between individual stages in a continuous deployment pipeline allow for a more flexible workflow and better utilize available computational resources.

Imagine a simple pipeline consisting of three jobs:

  1. A syntax check
  2. A code complexity check
  3. Running all unit tests

You may be tempted to group those in two stages: A) Build (consisting of jobs 1 and 2) and B) Test (consisting of the unit tests):

Traditional Sequences

In plain old GitLab pipelines, you would define that stage A needs to execute before stage B and everyone would be happy.

Except if the syntax check is quite fast (let’s assume 30 seconds) while the code complexity check may be very slow (say 4 minutes). Then, the unit tests need to wait a total of max(30 sec, 4 min) = 4 minutes before they can be executed, resulting in an overall slow pipeline:

Continue reading

Extract Email Addresses from a Text

Recently, I needed to extract all email addresses from a document for further processing. While I ended up writing my own regular expression, in the beginning I wanted to search for a public web service for this task. Appearantly, there exist lots of such services. However, I could not find one that works without transmitting the entered plain text to some shady server where I have no control over the sent data. This is unacceptable since email addresses are almost always sensible data points.

Out of frustration, I decided to set up such a service myself. I used this opportunity to get my feet wet with Vue.js and GitLab Pages (as described in a previous blog post).

Email Extractor – a new public web service

Here is the result: https://email-extractor.knasmueller.net/

Screenshot of the newly created Email Extractor web service

In case you wonder about the absence of buttons: Vue.js is able to process the entered input directly and immediately outputs the results as you type – which quite frankly is absolutely amazing. I did in fact test the performance of this feature with a few thousand paragraphs of “Lorem Ipsum” and correct results were generated in a few seconds.

As you can verify using Firefox’s network monitoring tool, the entered data is not sent to any web service; instead, Vue.js processes it as you type and extracts all strings that match my regular expression (please report if I missed some edge cases. Initially, I forgot about the + character that is used for example by Gmail).

Naturally, I also set up a Letsencrypt SSL certificate which also worked flawlessly using GitLab Pages.

Setting up this service was a fun way for getting to know Vue.js and I’m already looking forward to creating more similar ones in the future.