Continuous Integration Checks
Continuous Integration (CI)
When you submit a pull request, some automated checks are ran for your code by the ClickHouse continuous integration (CI) system.
This happens after a repository maintainer (someone from ClickHouse team) has screened your code and added the can be tested
label to your pull request.
The results of the checks are listed on the GitHub pull request page as described in the GitHub checks documentation.
If a check is failing, you might be required to fix it.
This page gives an overview of checks you may encounter, and what you can do to fix them.
If it looks like the check failure is not related to your changes, it may be some transient failure or an infrastructure problem. Push an empty commit to the pull request to restart the CI checks:
git reset
git commit --allow-empty
git push
If you are not sure what to do, ask a maintainer for help.
Merge with Master
Verifies that the PR can be merged to master.
If not, it will fail with a message Cannot fetch mergecommit
.
To fix this check, resolve the conflict as described in the GitHub documentation, or merge the master
branch to your pull request branch using git.
Docs check
Tries to build the ClickHouse documentation website.
It can fail if you changed something in the documentation.
Most probable reason is that some cross-link in the documentation is wrong.
Go to the check report and look for ERROR
and WARNING
messages.
Description Check
Check that the description of your pull request conforms to the template PULL_REQUEST_TEMPLATE.md. You have to specify a changelog category for your change (e.g., Bug Fix), and write a user-readable message describing the change for CHANGELOG.md
Push To DockerHub
Builds docker images used for build and tests, then pushes them to DockerHub.
Marker Check
This check means that the CI system started to process the pull request. When it has 'pending' status, it means that not all checks have been started yet. After all checks have been started, it changes status to 'success'.
Style Check
Performs some simple regex-based checks of code style, using the utils/check-style/check-style
binary (note that it can be run locally).
If it fails, fix the style errors following the code style guide.
Running style check locally:
mkdir -p /tmp/test_output
# running all checks
python3 tests/ci/style_check.py --no-push
# run specified check script (e.g.: ./check-mypy)
docker run --rm --volume=.:/ClickHouse --volume=/tmp/test_output:/test_output -u $(id -u ${USER}):$(id -g ${USER}) --cap-add=SYS_PTRACE --entrypoint= -w/ClickHouse/utils/check-style clickhouse/style-test ./check-mypy
# find all style check scripts under the directory:
cd ./utils/check-style
# Check duplicate includes
./check-duplicate-includes.sh
# Check c++ formatting
./check-style
# Check python formatting with black
./check-black
# Check python type hinting with mypy
./check-mypy
# Check python with flake8
./check-flake8
# Check code with codespell
./check-typos
# Check docs spelling
./check-doc-aspell
# Check whitespaces
./check-whitespaces
# Check github actions workflows
./check-workflows
# Check submodules
./check-submodules
# Check shell scripts with shellcheck
./shellcheck-run.sh
Fast Test
Normally this is the first check that is run for a PR. It builds ClickHouse and runs most of stateless functional tests, omitting some. If it fails, further checks are not started until it is fixed. Look at the report to see which tests fail, then reproduce the failure locally as described here.
Running Fast Test locally:
mkdir -p /tmp/test_output
mkdir -p /tmp/fasttest-workspace
cd ClickHouse
# this docker command performs minimal ClickHouse build and run FastTests against it
docker run --rm --cap-add=SYS_PTRACE -u $(id -u ${USER}):$(id -g ${USER}) --network=host -e FASTTEST_WORKSPACE=/fasttest-workspace -e FASTTEST_OUTPUT=/test_output -e FASTTEST_SOURCE=/ClickHouse --cap-add=SYS_PTRACE -e stage=clone_submodules --volume=/tmp/fasttest-workspace:/fasttest-workspace --volume=.:/ClickHouse --volume=/tmp/test_output:/test_output clickhouse/fasttest
Status Page Files
runlog.out.log
is the general log that includes all other logs.test_log.txt
submodule_log.txt
contains the messages about cloning and checkouting needed submodules.stderr.log
stdout.log
clickhouse-server.log
clone_log.txt
install_log.txt
clickhouse-server.err.log
build_log.txt
cmake_log.txt
contains messages about the C/C++ and Linux flags check.
Status Page Columns
- Test name contains the name of the test (without the path e.g. all types of tests will be stripped to the name).
- Test status -- one of Skipped, Success, or Fail.
- Test time, sec. -- empty on this test.