E2E tests on GDK improvements
What does this MR do and why?
This reduces the size of the GDK docker image used for running E2E tests, and speeds up the test job time (and overall time to complete E2E tests in MRs when run against GDK).
Almost all of this MR is selected from @acunskis' work in !112417 (closed). Specifically:
- add gdk base image and rebuild it on component or dependency changes
- final image is executable artifact tagged with a particular commit sha
- reduced image size:
registry.gitlab.com/gitlab-org/gitlab/gitlab-qa-gdk:ml-andrey-gdk-improvements 9.29GB
registry.gitlab.com/gitlab-org/gitlab/gitlab-qa-gdk:master 17.7GB
Part of gitlab-org/quality/quality-engineering&4 (closed).
Closes #390758 (closed) and #388532 (closed).
Notes on pipeline changes
Most of the changes are only relevant to the test-on-gdk
pipeline. The remaining changes just add $DEBIAN_VERSION
to the job image.
Caveats
Tests that use runners won't work because they can't connect to GDK when it's connected to the host network and the runner containers connect to the default bridge network. This isn't an immediate concern because no smoke tests use runners. Issue to resolve: #410246 (closed)
Results
Smoke job in this MR:
- https://gitlab.com/gitlab-org/gitlab/-/jobs/4272495979
- Total job duration: 12 minutes 42 seconds
- Test duration:
Finished in 4 minutes 25.8 seconds (files took 25.29 seconds to load) 23 examples, 0 failures, 2 pending
More tests for reliability in !120042 (closed) and !120179 (closed)
- Smoke job passed 10 times: https://gitlab.com/gitlab-org/gitlab/-/pipelines/861054672
- And another 10: https://gitlab.com/gitlab-org/gitlab/-/pipelines/861079451
- And again after having to fix a few merge conflicts: https://gitlab.com/gitlab-org/gitlab/-/pipelines/865106808
Example build job:
- Rebuilding base image and building GDK image for an MR Duration: 44 minutes 34 seconds
- Building only GDK image for MR: Duration: 23 minutes 19 seconds
The focus of this MR was to get some improvements in size and speed compared with the initial implementation, so the build times still have a lot of room for improvement. For example, more caching.
Related MRs
gitlab-build-images!645 (merged): builds the base image used in the Dockerfile in this MR.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.