We talked with @pcarranza and we want to implement this \cc @rymai.
Some thoughts:
We run GitLab QA tests against a package version deployed to staging.
We already did some work that makes it possible to trigger GitLab QA from Omnibus.
This can be a manual action, or automated task, but because our staging deployment is mostly manual, maybe we need to make GitLab QA against staging manual as well.
We don't need much changes in GitLab QA itself. We already support running tests against any instance of CE or EE. We need create GitLab QA user and namespace that we are going to use on staging, the most simple way is to create it on production.
We might need to add a few environment variables to QA code, to control a name of the GitLab QA namespace etc. but this is easy.
We agreed with @pcarranza that QA test suite is very limited, but running it against staging in an automate / semi-automated manner, still brings some value.
The idea would be that we could wire takeoff, and when we finish deploying a version in staging we spawn a GitLab-QA execution somehow.
This can provide 2 main advantages:
We will know when we broke staging after making a change to it from the infrastructure side. We can prevent this from impacting deployments by using GitLab-QA to know that staging is still functional.
We will know if a given deployed version survives the critical path.
I know that we still don't have the whole critical path covered, but wiring deployments to GitLab-QA will be an enabler to actually getting us investing the time into increasing the coverage of the tool, and will definitely reduce the toil of deployments.
We agreed with @pcarranza that QA test suite is very limited, but running it against staging in an automate / semi-automated manner, still brings some value.
If we wire https://gitlab.com/gitlab-org/omnibus-gitlab/issues/2581 as part of the same task we can move on this item as well. The easier we make it for QA to run automatically, the less excuses there are for not adding items to QA.
It sounds like we need takeoff to trigger the execution then, then we will need to push the results to slack so they slap us in the face or something like that.
As far as I remember takeoff is written in Ruby, and we also have a gitlab-qa gem that we can use as a library, so we can integrate it into takeoff and run GitLab QA directly from the place that takeoff is executed from (release manager's machine?). Only dependencies are Docker and Ruby and gitlab-qa gem. We do something similar in Omnibus already. \cc @balasankarc
@grzesiek As a first iteration, couldn't we just trigger a pipeline (that would run QA against staging) in gitlab-org/gitlab-qa once a deploy to staging is done (i.e. trigger the pipeline at the end of takeoff deploy command)?
@rymai I think that we need a few changes before we can do that, but this is a good plan indeed.
Add a gitlab-qa user on production (so that is available on staging as well).
Add a gitlab-qa test namespace. All test namespaces are going to be created there as a subgroups. This needs some changes in in-project QA and QA coordinator as well.
Prepare a manual job that we would be able to play using a takeoff.
Add a gitlab-qa test namespace. All test namespaces are going to be created there as a subgroups. This needs some changes in in-project QA and QA coordinator as well.
I guess the gitlab-qa user namespace is enough?
Prepare a manual job that we would be able to play using a takeoff.
I will take a stab at this! I guess the only missing part will be to sync production database to staging.
Add a gitlab-qa test namespace. All test namespaces are going to be created there as a subgroups. This needs some changes in in-project QA and QA coordinator as well.
I guess the gitlab-qa user namespace is enough?
@rymai I mean that project-level QA should create test namespace (per-test run) as a subgroup. Currently these are top-level groups.
@rymai Awesome! Please note that we might want to pass top-level group name using an environment variable, and create one if environment variable is not set to make it work with any instance.