« Previous | Next » 

Revision b7630577


Added by Petr Pudlak almost 7 years ago

Add patching QA configuration files on buildbots

In order to work, it is necessary:
  • Write a JSON Patch to file "qa/qa-patch.json" in a source repository.
    (And be careful not to commit it!) The file must conform to RFC6902
    and describes what changes should be done to the QA JSON
    configuration. This is simple as
    [ { "op": "add",
    "path": "default",
    "value": false }, { "op": "add",
    "path": "/tests/instance-add-file",
    "value": true }
  • Install "jsonpatch" and "jsonpointer" modules on the machines QA is
    running on. Either using "easy_install" or as Debian packages using

QA only loads the modules if the patch file is present and non-empty.
Therefore no changes to buildbots are needed, if the feature is not

It's advisable to add a git pre-commit hook for the main repository to
prevent changes to "qa/patch.json", keeping it to "[]". Suggestion for
such a hook:

  1. Exit code 1 if the patch file isn't just "[]":
    python -c 'import json, sys; \
    exit(0 if json.load(open("qa/qa-patch.json", "r")) == [] else 1)'

Locally it's possible to tell git not to track changes to the file at
all (see https://help.github.com/articles/ignoring-files):

git update-index --assume-unchanged qa/qa-patch.json

Cherry-pick of e5398c3afde43e9165e96ab5cc8e0426519ad8ad from stable-2.11.

Signed-off-by: Petr Pudlak <>
Signed-off-by: Michele Tartara <>
Reviewed-by: Jose A. Lopes <>


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences