Slide 1

Slide 1 text

Analyzing CI/CD-Pipelines with Deno, ElasticSearch and Kibana Why is my pipeline so slow? nknapp nknapp-1979

Slide 2

Slide 2 text

git push origin main pipeline running … Done. Next ticket. Trunk based development

Slide 3

Slide 3 text

The pipeline is failing for over 4 hours now and nothing gets deployed. Trunk based anger

Slide 4

Slide 4 text

Early warning system

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

Some simple code

Slide 8

Slide 8 text

LIVE DEMO Watching main branch pipeline

Slide 9

Slide 9 text

Gut feelings Do you also think that our tests have become slower lately? Yeah, sure feels like it. But how can we be sure?

Slide 10

Slide 10 text

Statistics over all jobs How can you be sure? What caused it? When did it start?

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

Goal: Pinpoint time and change What happened here?

Slide 13

Slide 13 text

Iterating all jobs

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

Downsides of REST Too much data Missing data

Slide 17

Slide 17 text

GraphQL !!!

Slide 18

Slide 18 text

https://gitlab.cosee.biz/-/graphql-explorer

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

The query Pagination

Slide 21

Slide 21 text

Dump all Pagination

Slide 22

Slide 22 text

Where to put the data?

Slide 23

Slide 23 text

Set up Kibana and ElasticSearch

Slide 24

Slide 24 text

Set up Kibana and ElasticSearch

Slide 25

Slide 25 text

Create ElasticSearch index

Slide 26

Slide 26 text

Add job to index

Slide 27

Slide 27 text

Add job to index

Slide 28

Slide 28 text

SPIEL.digital - Frontend ● Digital board-game fair ● Developed June 2020 - Oktober 2020 ● CMS for exhibitors, media creators etc. ● Fancy UI for visitors LIVE DEMO Analysis of SPIEL.digital pipelines

Slide 29

Slide 29 text

A real life example ● Monorepo for frontend and backend ● Lots of tests ● Merge requests ● Review apps + staging environment ● E2E-Tests ● Continuous deployment

Slide 30

Slide 30 text

A real life example pipeline for main branch

Slide 31

Slide 31 text

Duration of frontend unit tests (jest 27) Node 18.x Node 20.x Node 18.x

Slide 32

Slide 32 text

Jest 27 vs vitest with parallel shards 20 18 18 vitest shards 20 22 vue 3 vitest 0.34 to vitest 2

Slide 33

Slide 33 text

Failing e2e-tests, last 24 hours Worth looking at, should not fail on main branch

Slide 34

Slide 34 text

E2E failure rate, main branch usual noise something is wrong something is wrong

Slide 35

Slide 35 text

Successful e2e test, average duration usual noise something is wrong something is wrong Warning! Graph not proportional

Slide 36

Slide 36 text

Conclusion ● Patterns are easier to spot in graphs ● Good decision helper for fixing e2e-tests ● Addictive: Donʼt waste your time ● Better to use Node instead of Deno? (More mainstream)

Slide 37

Slide 37 text

Thank you for listening

Slide 38

Slide 38 text

https://github.com/cosee/talk-pipeline-statistics

Slide 39

Slide 39 text

git push origin main pipeline running … Done. Next ticket. The pipeline is failing for over 4 hours now and nothing gets deployed.