Updating the production branch of the KCIDB mirrors

How to merge upstream changes into the production branch of the KCIDB mirrors. KCIDB-related projects are mirrored on https://gitlab.com/cki-project/mirror/ as they are originally hosted on https://github.com which is blocked in China.

Background

The following repositories are mirrored on gitlab.com:

repository PIP branch CKI development branch upstream branch
jq.py 1.7.0.post1 - -
kcidb-io production main-cki main
kcidb production main-cki main

These repositories are set up in deployment-all via gitlab-repo-config to

  • use GitLab pull mirroring linking to the corresponding project on GitHub
  • have their issue tracker disabled

Branching workflow and production tagging

For kcidb-io and kcidb, a local branching workflow is set up to allow the management of a CKI production environment.

Both repositories have a downstream main-cki default branch that is independent of the upstream branches. In this branch, a .gitlab-ci.yml CI/CD configuration allows to run deployments into a production branch. This branch is then used for Python installations via something like

pip install git+https://gitlab.com/cki-project/mirror/kcidb-io.git@production

Updating the production branches

In a first step, update kcidb-io, which is used ubiquitously all over CKI. In a second step, update kcidb, which is only used in the datawarehouse-forwarder.

To update the production branch in one of the projects:

  1. fork the project
  2. in your fork, create a new branch based on the upstream main branch
  3. propose a new merge request against the main-cki branch
  4. in the merge request, child pipelines are triggered in the following projects:
    • kcidb-io: a child pipeline will trigger in cki-lib, which in turn triggers child pipelines all over CKI
    • kcidb: a child pipeline will trigger in cki-tools
  5. an automatic production deployment is triggered when the merge request is merged

If required, update PRODUCER_KCIDB_SCHEMA in cki_lib.kcidb.validate in cki-lib to a newer schema version. Make sure all consumers use the updated latest CONSUMER_KCIDB_SCHEMA version before deploying any producers with the updated producer schema version!