Replies: 0 comments 5 replies
-
Just a note, there was already an attempt to make the execution time of ostree tests shorter osbuild/osbuild-composer#1721 |
Beta Was this translation helpful? Give feedback.
1 reply
-
I am already working on an idea in osbuild/osbuild-composer#1869, which is basically to run necessary tests only based on modified files in the PR. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Introduction
When implementing a test one needs to wait a long time before it can get
executed resulting in long pauses between two debug sessions. This documents aims at diving into the tests of
osbuild-composer
, taking measurements and, proposing ideas to address the issues of the CI being a bit long to be fun to use.Analysis of the tests code base
In this section (drafty at the moment) I'll try to come up with a understanding of each test component and what they do.
The different types of tests:
init
This section takes around 6 minutes to complete
rpmbuild
This section takes around 20 minutes to complete
test
This section is taking around 2h to complete
base
max 00:28:05 minutes
regression
max 00:26:22 minutes
ostree (and variants)
max 01:53:36 hours
integration
max 00:30:41 minutes
api
max 00:32:43 minutes
api_v2
max 34:54 minutes
libvirt
max 33:00 minutes
Setup and teardown
setup
As a setup phase, all of the mentioned scripts are needing
deploy.sh
which installs all the required dependencies for them to run. The time it takes to run it is unknown and making some measurement could possibly help knowing if merging base + regression could make sense.teardown
Each test implements its own teardown mhechanism.
A global teardown is called at the end of the pipeline and is called
cloud_cleaner.sh
measurements
/!\ these measurements are coarse grain made one only one run.
As we can see on the graphs some jobs from the
test
stage are outliers that are greatly impacting the critical path of the tests. As we can see on the stats down below, the quantiles for the stagetest
reveals that 75% of the execution time are under 27 minutes and only a few objects are extremely long, up to a max of 01:53:36.Top 10 of the longest tasks
Some first ideas
Split Installer and OSTree tests
These tests are the slower, we should see if it is possible to reduce the time needed to execute them.
I think that we need first a way to time and measure what is taking a long time inside these tests.
Remove redundancy
Integration, API, and API_v2 look like each other a bit. There is maybe some optimisation to do over here.
Enable execution on local machine: Decouple the tests from setup and teardown
As opposed to the unit tests we have in go that one can easily execute and debug on his/her local machine. The tests cannot be executed on the local machine prior to CI. Hence the implementation of a test takes a long time and is not friendly to inattention errors.
Some in development ideas
#1869 from @diaasami
Run necessary tests only based on modified files in the PR.
Beta Was this translation helpful? Give feedback.
All reactions