From bde3439859cc7c566df036dacd5adfa63a20d828 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 20 Feb 2021 21:04:19 +0300 Subject: [PATCH 1/8] Add yamllint configuration --- .yamllint | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .yamllint diff --git a/.yamllint b/.yamllint new file mode 100644 index 00000000000..ea04e9981d9 --- /dev/null +++ b/.yamllint @@ -0,0 +1,17 @@ +# vi: ft=yaml +extends: default + +rules: + indentation: + level: warning + indent-sequences: consistent + line-length: + # there are some bash -c "", so this is OK + max: 300 + level: warning + comments: + min-spaces-from-content: 1 + document-start: + present: false + truthy: + check-keys: false From d909adc8b930b6589f2c1e38ca929761c35b8402 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 20 Feb 2021 22:03:33 +0300 Subject: [PATCH 2/8] Add yamllint into style docker image --- docker/test/style/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/test/style/Dockerfile b/docker/test/style/Dockerfile index 74af8eafc17..f97087a782a 100644 --- a/docker/test/style/Dockerfile +++ b/docker/test/style/Dockerfile @@ -1,7 +1,7 @@ # docker build -t yandex/clickhouse-style-test . FROM ubuntu:20.04 -RUN apt-get update && env DEBIAN_FRONTEND=noninteractive apt-get install --yes shellcheck libxml2-utils git python3-pip pylint && pip3 install codespell +RUN apt-get update && env DEBIAN_FRONTEND=noninteractive apt-get install --yes shellcheck libxml2-utils git python3-pip pylint yamllint && pip3 install codespell # For |& syntax From e1bc8bb5873a4446e4d0179dc319f1bff46a9cf4 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 20 Feb 2021 22:18:49 +0300 Subject: [PATCH 3/8] Wrap lines in Dockerfile for style image --- docker/test/style/Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docker/test/style/Dockerfile b/docker/test/style/Dockerfile index f97087a782a..e70f9e05679 100644 --- a/docker/test/style/Dockerfile +++ b/docker/test/style/Dockerfile @@ -1,7 +1,14 @@ # docker build -t yandex/clickhouse-style-test . FROM ubuntu:20.04 -RUN apt-get update && env DEBIAN_FRONTEND=noninteractive apt-get install --yes shellcheck libxml2-utils git python3-pip pylint yamllint && pip3 install codespell +RUN apt-get update && env DEBIAN_FRONTEND=noninteractive apt-get install --yes \ + shellcheck \ + libxml2-utils \ + git \ + python3-pip \ + pylint \ + yamllint \ + && pip3 install codespell # For |& syntax From 2db3a6af4962331c5ad2f4e43725ed6ff068b996 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 20 Feb 2021 21:52:44 +0300 Subject: [PATCH 4/8] Add yamllint into style check --- utils/check-style/check-style | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils/check-style/check-style b/utils/check-style/check-style index f62c7ca5849..9336bca2474 100755 --- a/utils/check-style/check-style +++ b/utils/check-style/check-style @@ -72,6 +72,10 @@ find $ROOT_PATH/{src,base,programs,utils} -name '*.xml' | # FIXME: for now only clickhouse-test pylint --rcfile=$ROOT_PATH/.pylintrc --score=n $ROOT_PATH/tests/clickhouse-test +find $ROOT_PATH -name '*.yaml' -or -name '*.yml' | + grep -vP $EXCLUDE_DIRS | + xargs yamllint --config-file=$ROOT_PATH/.yamllint + # Machine translation to Russian is strictly prohibited find $ROOT_PATH/docs/ru -name '*.md' | grep -vP $EXCLUDE_DIRS | From e9226904530afa0262a4c478ddd6d7d7d82293cf Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 20 Feb 2021 21:59:45 +0300 Subject: [PATCH 5/8] Fix yamllint issues --- .github/codecov.yml | 4 +- .github/workflows/anchore-analysis.yml | 36 +++++------ .potato.yml | 16 ++--- .../compose/docker_compose_cassandra.yml | 2 +- .../runner/compose/docker_compose_hdfs.yml | 4 +- .../runner/compose/docker_compose_kafka.yml | 44 ++++++------- .../docker_compose_kerberized_hdfs.yml | 14 ++-- .../docker_compose_kerberized_kafka.yml | 64 +++++++++---------- .../runner/compose/docker_compose_mongo.yml | 2 +- .../runner/compose/docker_compose_mysql.yml | 2 +- ...ompose_mysql_5_7_for_materialize_mysql.yml | 2 +- ...ompose_mysql_8_0_for_materialize_mysql.yml | 2 +- .../compose/docker_compose_mysql_client.yml | 2 +- .../compose/docker_compose_postgesql.yml | 2 +- .../compose/docker_compose_postgres.yml | 8 +-- .../runner/compose/docker_compose_redis.yml | 2 +- .../docker-compose/docker-compose.yml | 2 +- .../example/docker-compose/docker-compose.yml | 2 +- .../docker-compose/docker-compose.yml | 2 +- .../docker-compose/openldap-service.yml | 3 +- .../docker-compose/docker-compose.yml | 2 +- .../docker-compose/openldap-service.yml | 3 +- .../docker-compose/docker-compose.yml | 2 +- .../docker-compose/openldap-service.yml | 3 +- .../rbac/docker-compose/docker-compose.yml | 2 +- 25 files changed, 112 insertions(+), 115 deletions(-) diff --git a/.github/codecov.yml b/.github/codecov.yml index 9b75efc791d..f185c5e2dcc 100644 --- a/.github/codecov.yml +++ b/.github/codecov.yml @@ -1,5 +1,5 @@ codecov: - max_report_age: off + max_report_age: "off" strict_yaml_branch: "master" ignore: @@ -14,4 +14,4 @@ ignore: comment: false github_checks: - annotations: false \ No newline at end of file + annotations: false diff --git a/.github/workflows/anchore-analysis.yml b/.github/workflows/anchore-analysis.yml index 50eaf45e2ef..105c05f470c 100644 --- a/.github/workflows/anchore-analysis.yml +++ b/.github/workflows/anchore-analysis.yml @@ -10,7 +10,7 @@ name: Docker Container Scan (clickhouse-server) on: pull_request: - paths: + paths: - docker/server/Dockerfile - .github/workflows/anchore-analysis.yml schedule: @@ -20,20 +20,20 @@ jobs: Anchore-Build-Scan: runs-on: ubuntu-latest steps: - - name: Checkout the code - uses: actions/checkout@v2 - - name: Build the Docker image - run: | - cd docker/server - perl -pi -e 's|=\$version||g' Dockerfile - docker build . --file Dockerfile --tag localbuild/testimage:latest - - name: Run the local Anchore scan action itself with GitHub Advanced Security code scanning integration enabled - uses: anchore/scan-action@v2 - id: scan - with: - image: "localbuild/testimage:latest" - acs-report-enable: true - - name: Upload Anchore Scan Report - uses: github/codeql-action/upload-sarif@v1 - with: - sarif_file: ${{ steps.scan.outputs.sarif }} + - name: Checkout the code + uses: actions/checkout@v2 + - name: Build the Docker image + run: | + cd docker/server + perl -pi -e 's|=\$version||g' Dockerfile + docker build . --file Dockerfile --tag localbuild/testimage:latest + - name: Run the local Anchore scan action itself with GitHub Advanced Security code scanning integration enabled + uses: anchore/scan-action@v2 + id: scan + with: + image: "localbuild/testimage:latest" + acs-report-enable: true + - name: Upload Anchore Scan Report + uses: github/codeql-action/upload-sarif@v1 + with: + sarif_file: ${{ steps.scan.outputs.sarif }} diff --git a/.potato.yml b/.potato.yml index 113bdacbdde..7cb87c58bd1 100644 --- a/.potato.yml +++ b/.potato.yml @@ -14,14 +14,14 @@ handlers: # The trigger for creating the Yandex.Tracker issue. When the specified event occurs, it transfers PR data to Yandex.Tracker. github:pullRequest:labeled: data: - # The Yandex.Tracker queue to create the issue in. Each issue in Tracker belongs to one of the project queues. - queue: CLICKHOUSEDOCS - # The issue title. - summary: '[Potato] Pull Request #{{pullRequest.number}}' - # The issue description. - description: > + # The Yandex.Tracker queue to create the issue in. Each issue in Tracker belongs to one of the project queues. + queue: CLICKHOUSEDOCS + # The issue title. + summary: '[Potato] Pull Request #{{pullRequest.number}}' + # The issue description. + description: > {{pullRequest.description}} Ссылка на Pull Request: {{pullRequest.webUrl}} - # The condition for creating the Yandex.Tracker issue. - condition: eventPayload.labels.filter(label => ['pr-feature'].includes(label.name)).length + # The condition for creating the Yandex.Tracker issue. + condition: eventPayload.labels.filter(label => ['pr-feature'].includes(label.name)).length diff --git a/docker/test/integration/runner/compose/docker_compose_cassandra.yml b/docker/test/integration/runner/compose/docker_compose_cassandra.yml index 6567a352027..c5cdfac5ce7 100644 --- a/docker/test/integration/runner/compose/docker_compose_cassandra.yml +++ b/docker/test/integration/runner/compose/docker_compose_cassandra.yml @@ -4,4 +4,4 @@ services: image: cassandra restart: always ports: - - 9043:9042 + - 9043:9042 diff --git a/docker/test/integration/runner/compose/docker_compose_hdfs.yml b/docker/test/integration/runner/compose/docker_compose_hdfs.yml index b8cd7f64273..43dd1aa43d3 100644 --- a/docker/test/integration/runner/compose/docker_compose_hdfs.yml +++ b/docker/test/integration/runner/compose/docker_compose_hdfs.yml @@ -5,6 +5,6 @@ services: hostname: hdfs1 restart: always ports: - - 50075:50075 - - 50070:50070 + - 50075:50075 + - 50070:50070 entrypoint: /etc/bootstrap.sh -d diff --git a/docker/test/integration/runner/compose/docker_compose_kafka.yml b/docker/test/integration/runner/compose/docker_compose_kafka.yml index 219d977ffd9..b77542f7e11 100644 --- a/docker/test/integration/runner/compose/docker_compose_kafka.yml +++ b/docker/test/integration/runner/compose/docker_compose_kafka.yml @@ -5,42 +5,42 @@ services: image: zookeeper:3.4.9 hostname: kafka_zookeeper environment: - ZOO_MY_ID: 1 - ZOO_PORT: 2181 - ZOO_SERVERS: server.1=kafka_zookeeper:2888:3888 + ZOO_MY_ID: 1 + ZOO_PORT: 2181 + ZOO_SERVERS: server.1=kafka_zookeeper:2888:3888 security_opt: - - label:disable + - label:disable kafka1: image: confluentinc/cp-kafka:5.2.0 hostname: kafka1 ports: - - "9092:9092" + - "9092:9092" environment: - KAFKA_ADVERTISED_LISTENERS: INSIDE://localhost:9092,OUTSIDE://kafka1:19092 - KAFKA_LISTENERS: INSIDE://:9092,OUTSIDE://:19092 - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT - KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE - KAFKA_BROKER_ID: 1 - KAFKA_ZOOKEEPER_CONNECT: "kafka_zookeeper:2181" - KAFKA_LOG4J_LOGGERS: "kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO" - KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 + KAFKA_ADVERTISED_LISTENERS: INSIDE://localhost:9092,OUTSIDE://kafka1:19092 + KAFKA_LISTENERS: INSIDE://:9092,OUTSIDE://:19092 + KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT + KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE + KAFKA_BROKER_ID: 1 + KAFKA_ZOOKEEPER_CONNECT: "kafka_zookeeper:2181" + KAFKA_LOG4J_LOGGERS: "kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO" + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 depends_on: - - kafka_zookeeper + - kafka_zookeeper security_opt: - - label:disable + - label:disable schema-registry: image: confluentinc/cp-schema-registry:5.2.0 hostname: schema-registry ports: - - "8081:8081" + - "8081:8081" environment: - SCHEMA_REGISTRY_HOST_NAME: schema-registry - SCHEMA_REGISTRY_KAFKASTORE_SECURITY_PROTOCOL: PLAINTEXT - SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: PLAINTEXT://kafka1:19092 + SCHEMA_REGISTRY_HOST_NAME: schema-registry + SCHEMA_REGISTRY_KAFKASTORE_SECURITY_PROTOCOL: PLAINTEXT + SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: PLAINTEXT://kafka1:19092 depends_on: - - kafka_zookeeper - - kafka1 + - kafka_zookeeper + - kafka1 security_opt: - - label:disable + - label:disable diff --git a/docker/test/integration/runner/compose/docker_compose_kerberized_hdfs.yml b/docker/test/integration/runner/compose/docker_compose_kerberized_hdfs.yml index f2a659bce58..e2e15975e22 100644 --- a/docker/test/integration/runner/compose/docker_compose_kerberized_hdfs.yml +++ b/docker/test/integration/runner/compose/docker_compose_kerberized_hdfs.yml @@ -8,22 +8,22 @@ services: hostname: kerberizedhdfs1 restart: always volumes: - - ${KERBERIZED_HDFS_DIR}/../../hdfs_configs/bootstrap.sh:/etc/bootstrap.sh:ro - - ${KERBERIZED_HDFS_DIR}/secrets:/usr/local/hadoop/etc/hadoop/conf - - ${KERBERIZED_HDFS_DIR}/secrets/krb_long.conf:/etc/krb5.conf:ro + - ${KERBERIZED_HDFS_DIR}/../../hdfs_configs/bootstrap.sh:/etc/bootstrap.sh:ro + - ${KERBERIZED_HDFS_DIR}/secrets:/usr/local/hadoop/etc/hadoop/conf + - ${KERBERIZED_HDFS_DIR}/secrets/krb_long.conf:/etc/krb5.conf:ro ports: - 1006:1006 - 50070:50070 - 9010:9010 depends_on: - - hdfskerberos + - hdfskerberos entrypoint: /etc/bootstrap.sh -d hdfskerberos: image: yandex/clickhouse-kerberos-kdc:${DOCKER_KERBEROS_KDC_TAG} hostname: hdfskerberos volumes: - - ${KERBERIZED_HDFS_DIR}/secrets:/tmp/keytab - - ${KERBERIZED_HDFS_DIR}/../../kerberos_image_config.sh:/config.sh - - /dev/urandom:/dev/random + - ${KERBERIZED_HDFS_DIR}/secrets:/tmp/keytab + - ${KERBERIZED_HDFS_DIR}/../../kerberos_image_config.sh:/config.sh + - /dev/urandom:/dev/random ports: [88, 749] diff --git a/docker/test/integration/runner/compose/docker_compose_kerberized_kafka.yml b/docker/test/integration/runner/compose/docker_compose_kerberized_kafka.yml index 6e1e11344bb..64a3ef3e956 100644 --- a/docker/test/integration/runner/compose/docker_compose_kerberized_kafka.yml +++ b/docker/test/integration/runner/compose/docker_compose_kerberized_kafka.yml @@ -6,54 +6,54 @@ services: # restart: always hostname: kafka_kerberized_zookeeper environment: - ZOOKEEPER_SERVER_ID: 1 - ZOOKEEPER_CLIENT_PORT: 2181 - ZOOKEEPER_SERVERS: "kafka_kerberized_zookeeper:2888:3888" - KAFKA_OPTS: "-Djava.security.auth.login.config=/etc/kafka/secrets/zookeeper_jaas.conf -Djava.security.krb5.conf=/etc/kafka/secrets/krb.conf -Dzookeeper.authProvider.1=org.apache.zookeeper.server.auth.SASLAuthenticationProvider -Dsun.security.krb5.debug=true" + ZOOKEEPER_SERVER_ID: 1 + ZOOKEEPER_CLIENT_PORT: 2181 + ZOOKEEPER_SERVERS: "kafka_kerberized_zookeeper:2888:3888" + KAFKA_OPTS: "-Djava.security.auth.login.config=/etc/kafka/secrets/zookeeper_jaas.conf -Djava.security.krb5.conf=/etc/kafka/secrets/krb.conf -Dzookeeper.authProvider.1=org.apache.zookeeper.server.auth.SASLAuthenticationProvider -Dsun.security.krb5.debug=true" volumes: - - ${KERBERIZED_KAFKA_DIR}/secrets:/etc/kafka/secrets - - /dev/urandom:/dev/random + - ${KERBERIZED_KAFKA_DIR}/secrets:/etc/kafka/secrets + - /dev/urandom:/dev/random depends_on: - - kafka_kerberos + - kafka_kerberos security_opt: - - label:disable + - label:disable kerberized_kafka1: image: confluentinc/cp-kafka:5.2.0 # restart: always hostname: kerberized_kafka1 ports: - - "9092:9092" - - "9093:9093" + - "9092:9092" + - "9093:9093" environment: - KAFKA_LISTENERS: OUTSIDE://:19092,UNSECURED_OUTSIDE://:19093,UNSECURED_INSIDE://:9093 - KAFKA_ADVERTISED_LISTENERS: OUTSIDE://kerberized_kafka1:19092,UNSECURED_OUTSIDE://kerberized_kafka1:19093,UNSECURED_INSIDE://localhost:9093 - # KAFKA_LISTENERS: INSIDE://kerberized_kafka1:9092,OUTSIDE://kerberized_kafka1:19092 - # KAFKA_ADVERTISED_LISTENERS: INSIDE://localhost:9092,OUTSIDE://kerberized_kafka1:19092 - KAFKA_SASL_MECHANISM_INTER_BROKER_PROTOCOL: GSSAPI - KAFKA_SASL_ENABLED_MECHANISMS: GSSAPI - KAFKA_SASL_KERBEROS_SERVICE_NAME: kafka - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: OUTSIDE:SASL_PLAINTEXT,UNSECURED_OUTSIDE:PLAINTEXT,UNSECURED_INSIDE:PLAINTEXT, - KAFKA_INTER_BROKER_LISTENER_NAME: OUTSIDE - KAFKA_BROKER_ID: 1 - KAFKA_ZOOKEEPER_CONNECT: "kafka_kerberized_zookeeper:2181" - KAFKA_LOG4J_LOGGERS: "kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO" - KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 - KAFKA_OPTS: "-Djava.security.auth.login.config=/etc/kafka/secrets/broker_jaas.conf -Djava.security.krb5.conf=/etc/kafka/secrets/krb.conf -Dsun.security.krb5.debug=true" + KAFKA_LISTENERS: OUTSIDE://:19092,UNSECURED_OUTSIDE://:19093,UNSECURED_INSIDE://:9093 + KAFKA_ADVERTISED_LISTENERS: OUTSIDE://kerberized_kafka1:19092,UNSECURED_OUTSIDE://kerberized_kafka1:19093,UNSECURED_INSIDE://localhost:9093 + # KAFKA_LISTENERS: INSIDE://kerberized_kafka1:9092,OUTSIDE://kerberized_kafka1:19092 + # KAFKA_ADVERTISED_LISTENERS: INSIDE://localhost:9092,OUTSIDE://kerberized_kafka1:19092 + KAFKA_SASL_MECHANISM_INTER_BROKER_PROTOCOL: GSSAPI + KAFKA_SASL_ENABLED_MECHANISMS: GSSAPI + KAFKA_SASL_KERBEROS_SERVICE_NAME: kafka + KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: OUTSIDE:SASL_PLAINTEXT,UNSECURED_OUTSIDE:PLAINTEXT,UNSECURED_INSIDE:PLAINTEXT, + KAFKA_INTER_BROKER_LISTENER_NAME: OUTSIDE + KAFKA_BROKER_ID: 1 + KAFKA_ZOOKEEPER_CONNECT: "kafka_kerberized_zookeeper:2181" + KAFKA_LOG4J_LOGGERS: "kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO" + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 + KAFKA_OPTS: "-Djava.security.auth.login.config=/etc/kafka/secrets/broker_jaas.conf -Djava.security.krb5.conf=/etc/kafka/secrets/krb.conf -Dsun.security.krb5.debug=true" volumes: - - ${KERBERIZED_KAFKA_DIR}/secrets:/etc/kafka/secrets - - /dev/urandom:/dev/random + - ${KERBERIZED_KAFKA_DIR}/secrets:/etc/kafka/secrets + - /dev/urandom:/dev/random depends_on: - - kafka_kerberized_zookeeper - - kafka_kerberos + - kafka_kerberized_zookeeper + - kafka_kerberos security_opt: - - label:disable + - label:disable kafka_kerberos: image: yandex/clickhouse-kerberos-kdc:${DOCKER_KERBEROS_KDC_TAG:-latest} hostname: kafka_kerberos volumes: - - ${KERBERIZED_KAFKA_DIR}/secrets:/tmp/keytab - - ${KERBERIZED_KAFKA_DIR}/../../kerberos_image_config.sh:/config.sh - - /dev/urandom:/dev/random + - ${KERBERIZED_KAFKA_DIR}/secrets:/tmp/keytab + - ${KERBERIZED_KAFKA_DIR}/../../kerberos_image_config.sh:/config.sh + - /dev/urandom:/dev/random ports: [88, 749] diff --git a/docker/test/integration/runner/compose/docker_compose_mongo.yml b/docker/test/integration/runner/compose/docker_compose_mongo.yml index 8c54544ed88..6c98fde2303 100644 --- a/docker/test/integration/runner/compose/docker_compose_mongo.yml +++ b/docker/test/integration/runner/compose/docker_compose_mongo.yml @@ -7,5 +7,5 @@ services: MONGO_INITDB_ROOT_USERNAME: root MONGO_INITDB_ROOT_PASSWORD: clickhouse ports: - - 27018:27017 + - 27018:27017 command: --profile=2 --verbose diff --git a/docker/test/integration/runner/compose/docker_compose_mysql.yml b/docker/test/integration/runner/compose/docker_compose_mysql.yml index 90daf8a4238..5b15d517f37 100644 --- a/docker/test/integration/runner/compose/docker_compose_mysql.yml +++ b/docker/test/integration/runner/compose/docker_compose_mysql.yml @@ -6,5 +6,5 @@ services: environment: MYSQL_ROOT_PASSWORD: clickhouse ports: - - 3308:3306 + - 3308:3306 command: --server_id=100 --log-bin='mysql-bin-1.log' --default-time-zone='+3:00' --gtid-mode="ON" --enforce-gtid-consistency diff --git a/docker/test/integration/runner/compose/docker_compose_mysql_5_7_for_materialize_mysql.yml b/docker/test/integration/runner/compose/docker_compose_mysql_5_7_for_materialize_mysql.yml index e7d762203ee..509e04ef9c3 100644 --- a/docker/test/integration/runner/compose/docker_compose_mysql_5_7_for_materialize_mysql.yml +++ b/docker/test/integration/runner/compose/docker_compose_mysql_5_7_for_materialize_mysql.yml @@ -6,5 +6,5 @@ services: environment: MYSQL_ROOT_PASSWORD: clickhouse ports: - - 3308:3306 + - 3308:3306 command: --server_id=100 --log-bin='mysql-bin-1.log' --default-time-zone='+3:00' --gtid-mode="ON" --enforce-gtid-consistency diff --git a/docker/test/integration/runner/compose/docker_compose_mysql_8_0_for_materialize_mysql.yml b/docker/test/integration/runner/compose/docker_compose_mysql_8_0_for_materialize_mysql.yml index 918a2b5f80f..72813552b54 100644 --- a/docker/test/integration/runner/compose/docker_compose_mysql_8_0_for_materialize_mysql.yml +++ b/docker/test/integration/runner/compose/docker_compose_mysql_8_0_for_materialize_mysql.yml @@ -6,5 +6,5 @@ services: environment: MYSQL_ROOT_PASSWORD: clickhouse ports: - - 33308:3306 + - 33308:3306 command: --server_id=100 --log-bin='mysql-bin-1.log' --default_authentication_plugin='mysql_native_password' --default-time-zone='+3:00' --gtid-mode="ON" --enforce-gtid-consistency diff --git a/docker/test/integration/runner/compose/docker_compose_mysql_client.yml b/docker/test/integration/runner/compose/docker_compose_mysql_client.yml index 802151c4d7b..5e4565d64c3 100644 --- a/docker/test/integration/runner/compose/docker_compose_mysql_client.yml +++ b/docker/test/integration/runner/compose/docker_compose_mysql_client.yml @@ -7,7 +7,7 @@ services: MYSQL_ALLOW_EMPTY_PASSWORD: 1 command: --federated --socket /var/run/mysqld/mysqld.sock healthcheck: - test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"] + test: ["CMD", "mysqladmin", "ping", "-h", "localhost"] interval: 1s timeout: 2s retries: 100 diff --git a/docker/test/integration/runner/compose/docker_compose_postgesql.yml b/docker/test/integration/runner/compose/docker_compose_postgesql.yml index 984f5f97384..90764188ddd 100644 --- a/docker/test/integration/runner/compose/docker_compose_postgesql.yml +++ b/docker/test/integration/runner/compose/docker_compose_postgesql.yml @@ -11,4 +11,4 @@ services: ports: - "5433:5433" environment: - POSTGRES_HOST_AUTH_METHOD: "trust" \ No newline at end of file + POSTGRES_HOST_AUTH_METHOD: "trust" diff --git a/docker/test/integration/runner/compose/docker_compose_postgres.yml b/docker/test/integration/runner/compose/docker_compose_postgres.yml index fff4fb1fa42..5657352e1b3 100644 --- a/docker/test/integration/runner/compose/docker_compose_postgres.yml +++ b/docker/test/integration/runner/compose/docker_compose_postgres.yml @@ -6,8 +6,8 @@ services: environment: POSTGRES_PASSWORD: mysecretpassword ports: - - 5432:5432 + - 5432:5432 networks: - default: - aliases: - - postgre-sql.local + default: + aliases: + - postgre-sql.local diff --git a/docker/test/integration/runner/compose/docker_compose_redis.yml b/docker/test/integration/runner/compose/docker_compose_redis.yml index 72df99ec59b..3d834aadaa4 100644 --- a/docker/test/integration/runner/compose/docker_compose_redis.yml +++ b/docker/test/integration/runner/compose/docker_compose_redis.yml @@ -4,5 +4,5 @@ services: image: redis restart: always ports: - - 6380:6379 + - 6380:6379 command: redis-server --requirepass "clickhouse" --databases 32 diff --git a/tests/testflows/aes_encryption/docker-compose/docker-compose.yml b/tests/testflows/aes_encryption/docker-compose/docker-compose.yml index 04a51ad7ec0..124b53bf502 100644 --- a/tests/testflows/aes_encryption/docker-compose/docker-compose.yml +++ b/tests/testflows/aes_encryption/docker-compose/docker-compose.yml @@ -56,7 +56,7 @@ services: zookeeper: condition: service_healthy - # dummy service which does nothing, but allows to postpone + # dummy service which does nothing, but allows to postpone # 'docker-compose up -d' till all dependecies will go healthy all_services_ready: image: hello-world diff --git a/tests/testflows/example/docker-compose/docker-compose.yml b/tests/testflows/example/docker-compose/docker-compose.yml index e7e57386dc4..4edb415824f 100644 --- a/tests/testflows/example/docker-compose/docker-compose.yml +++ b/tests/testflows/example/docker-compose/docker-compose.yml @@ -20,7 +20,7 @@ services: zookeeper: condition: service_healthy - # dummy service which does nothing, but allows to postpone + # dummy service which does nothing, but allows to postpone # 'docker-compose up -d' till all dependecies will go healthy all_services_ready: image: hello-world diff --git a/tests/testflows/ldap/authentication/docker-compose/docker-compose.yml b/tests/testflows/ldap/authentication/docker-compose/docker-compose.yml index c8ff683df58..36e25ef766e 100644 --- a/tests/testflows/ldap/authentication/docker-compose/docker-compose.yml +++ b/tests/testflows/ldap/authentication/docker-compose/docker-compose.yml @@ -135,7 +135,7 @@ services: zookeeper: condition: service_healthy - # dummy service which does nothing, but allows to postpone + # dummy service which does nothing, but allows to postpone # 'docker-compose up -d' till all dependecies will go healthy all_services_ready: image: hello-world diff --git a/tests/testflows/ldap/authentication/docker-compose/openldap-service.yml b/tests/testflows/ldap/authentication/docker-compose/openldap-service.yml index 139907c513c..e489637b8c9 100644 --- a/tests/testflows/ldap/authentication/docker-compose/openldap-service.yml +++ b/tests/testflows/ldap/authentication/docker-compose/openldap-service.yml @@ -28,7 +28,7 @@ services: environment: PHPLDAPADMIN_HTTPS=false: ports: - - "8080:80" + - "8080:80" healthcheck: test: echo 1 interval: 10s @@ -37,4 +37,3 @@ services: start_period: 300s security_opt: - label:disable - diff --git a/tests/testflows/ldap/external_user_directory/docker-compose/docker-compose.yml b/tests/testflows/ldap/external_user_directory/docker-compose/docker-compose.yml index c8ff683df58..36e25ef766e 100644 --- a/tests/testflows/ldap/external_user_directory/docker-compose/docker-compose.yml +++ b/tests/testflows/ldap/external_user_directory/docker-compose/docker-compose.yml @@ -135,7 +135,7 @@ services: zookeeper: condition: service_healthy - # dummy service which does nothing, but allows to postpone + # dummy service which does nothing, but allows to postpone # 'docker-compose up -d' till all dependecies will go healthy all_services_ready: image: hello-world diff --git a/tests/testflows/ldap/external_user_directory/docker-compose/openldap-service.yml b/tests/testflows/ldap/external_user_directory/docker-compose/openldap-service.yml index 139907c513c..e489637b8c9 100644 --- a/tests/testflows/ldap/external_user_directory/docker-compose/openldap-service.yml +++ b/tests/testflows/ldap/external_user_directory/docker-compose/openldap-service.yml @@ -28,7 +28,7 @@ services: environment: PHPLDAPADMIN_HTTPS=false: ports: - - "8080:80" + - "8080:80" healthcheck: test: echo 1 interval: 10s @@ -37,4 +37,3 @@ services: start_period: 300s security_opt: - label:disable - diff --git a/tests/testflows/ldap/role_mapping/docker-compose/docker-compose.yml b/tests/testflows/ldap/role_mapping/docker-compose/docker-compose.yml index c8ff683df58..36e25ef766e 100644 --- a/tests/testflows/ldap/role_mapping/docker-compose/docker-compose.yml +++ b/tests/testflows/ldap/role_mapping/docker-compose/docker-compose.yml @@ -135,7 +135,7 @@ services: zookeeper: condition: service_healthy - # dummy service which does nothing, but allows to postpone + # dummy service which does nothing, but allows to postpone # 'docker-compose up -d' till all dependecies will go healthy all_services_ready: image: hello-world diff --git a/tests/testflows/ldap/role_mapping/docker-compose/openldap-service.yml b/tests/testflows/ldap/role_mapping/docker-compose/openldap-service.yml index 139907c513c..e489637b8c9 100644 --- a/tests/testflows/ldap/role_mapping/docker-compose/openldap-service.yml +++ b/tests/testflows/ldap/role_mapping/docker-compose/openldap-service.yml @@ -28,7 +28,7 @@ services: environment: PHPLDAPADMIN_HTTPS=false: ports: - - "8080:80" + - "8080:80" healthcheck: test: echo 1 interval: 10s @@ -37,4 +37,3 @@ services: start_period: 300s security_opt: - label:disable - diff --git a/tests/testflows/rbac/docker-compose/docker-compose.yml b/tests/testflows/rbac/docker-compose/docker-compose.yml index a3f5144c9ed..29f2ef52470 100755 --- a/tests/testflows/rbac/docker-compose/docker-compose.yml +++ b/tests/testflows/rbac/docker-compose/docker-compose.yml @@ -57,4 +57,4 @@ services: clickhouse3: condition: service_healthy zookeeper: - condition: service_healthy \ No newline at end of file + condition: service_healthy From d8b9a7052eb883b40e223a7ecc4aba92a8f2999f Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sun, 21 Feb 2021 06:15:12 +0300 Subject: [PATCH 6/8] Drop truthy.check-keys from yamllint (does not supported on CI) https://clickhouse-test-reports.s3.yandex.net/21019/e9226904530afa0262a4c478ddd6d7d7d82293cf/style_check.html#fail1 --- .github/workflows/anchore-analysis.yml | 2 +- .yamllint | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/anchore-analysis.yml b/.github/workflows/anchore-analysis.yml index 105c05f470c..1005c8f6c38 100644 --- a/.github/workflows/anchore-analysis.yml +++ b/.github/workflows/anchore-analysis.yml @@ -8,7 +8,7 @@ name: Docker Container Scan (clickhouse-server) -on: +"on": pull_request: paths: - docker/server/Dockerfile diff --git a/.yamllint b/.yamllint index ea04e9981d9..fe161e71849 100644 --- a/.yamllint +++ b/.yamllint @@ -13,5 +13,3 @@ rules: min-spaces-from-content: 1 document-start: present: false - truthy: - check-keys: false From b9cb8fdbad9268e35babecd1bf74e645a09a93e8 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sun, 21 Feb 2021 10:45:05 +0300 Subject: [PATCH 7/8] Exclude contrib for yamllint check --- utils/check-style/check-style | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/check-style/check-style b/utils/check-style/check-style index 9336bca2474..f8926a9af2f 100755 --- a/utils/check-style/check-style +++ b/utils/check-style/check-style @@ -72,7 +72,7 @@ find $ROOT_PATH/{src,base,programs,utils} -name '*.xml' | # FIXME: for now only clickhouse-test pylint --rcfile=$ROOT_PATH/.pylintrc --score=n $ROOT_PATH/tests/clickhouse-test -find $ROOT_PATH -name '*.yaml' -or -name '*.yml' | +find $ROOT_PATH -not -path $ROOT_PATH'/contrib*' \( -name '*.yaml' -or -name '*.yml' \) -type f | grep -vP $EXCLUDE_DIRS | xargs yamllint --config-file=$ROOT_PATH/.yamllint From 11dd0a4ba5b11d00a867d2a22df2803d96fc2d8e Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sun, 21 Feb 2021 21:01:41 +0300 Subject: [PATCH 8/8] Trigger CI