Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor TestFlows tests related to Lightweight #543

Merged
merged 63 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
a121b3b
remove xfails for a test run
Selfeer Mar 18, 2024
77260f1
fix grammar errors
Selfeer Mar 24, 2024
bab8d4c
Merge branch 'develop' into investigate_kafka_tests
Selfeer Mar 24, 2024
431523b
fix grammar errors remove comments
Selfeer Mar 24, 2024
ae45d19
Restructure test environment to decouple sink-connector process
Selfeer Mar 24, 2024
efa9ab2
add newline
Selfeer Mar 24, 2024
79b91be
fix some text issues
Selfeer Mar 28, 2024
f1fd11a
fix some text issues
Selfeer Mar 31, 2024
ce15240
Merge branch 'develop' into investigate_kafka_tests
Selfeer Apr 1, 2024
ef48a9f
comment out entrypoint
Selfeer Apr 1, 2024
9423e5e
add step to start sink connector
Selfeer Apr 1, 2024
3a63367
add step to start sink connector
Selfeer Apr 1, 2024
9526949
change condition order
Selfeer Apr 1, 2024
fa21b6c
try to add steps to start and stop sink connector
Selfeer Apr 3, 2024
8c15759
refactor
Selfeer Apr 5, 2024
3cbebd1
refactor
Selfeer Apr 5, 2024
ed810fe
refactor
Selfeer Apr 5, 2024
1e36c08
refactor
Selfeer Apr 5, 2024
867758d
refactor
Selfeer Apr 5, 2024
9749da3
update requirements
Selfeer Apr 5, 2024
406e52e
refactor
Selfeer Apr 5, 2024
4ecd256
remove broken tests
Selfeer Apr 5, 2024
338da97
add cli tests
Selfeer Apr 5, 2024
f357bef
remove redundant files and tests that might break replication
Selfeer Apr 8, 2024
c0f9fc2
remove redundant files and tests that might break replication
Selfeer Apr 8, 2024
2690f1a
update
Selfeer Apr 9, 2024
8f265a0
update
Selfeer Apr 10, 2024
10fff5e
Merge branch 'refs/heads/develop' into refactor_testflows_tests
Selfeer Apr 15, 2024
055d0ea
add dockerfile to install basic linux tools
Selfeer Apr 15, 2024
dfccea0
update requirements - initial
Selfeer Apr 15, 2024
6761c32
update requirements
Selfeer Apr 15, 2024
b77b268
add sink connector logs
Selfeer Apr 15, 2024
fc03dfe
remove redundant volume
Selfeer Apr 15, 2024
86892a8
remove redundant volume
Selfeer Apr 15, 2024
004cc41
update workflows to be able to specify clickhouse version
Selfeer Apr 15, 2024
45a457d
update workflows to be able to specify clickhouse version
Selfeer Apr 15, 2024
143d0b0
reduce sleep time
Selfeer Apr 15, 2024
3716b11
change logs file
Selfeer Apr 15, 2024
b50ae19
update requirements
Selfeer Apr 15, 2024
9d73a4d
try to add parallelization to tests
Selfeer Apr 15, 2024
35adeed
try to add parallelization to tests
Selfeer Apr 15, 2024
376a2c9
try to increese paralleization to 4
Selfeer Apr 15, 2024
83e4aca
try to add possibility to update configuration from features
Selfeer Apr 16, 2024
59041ec
add config
Selfeer Apr 16, 2024
df68fcb
add step to change the sink configuration
Selfeer Apr 16, 2024
4fcec26
remove Dockerfile
Selfeer Apr 16, 2024
d0a1f58
remove Dockerfile
Selfeer Apr 16, 2024
cdb78c3
update requirements
Selfeer Apr 16, 2024
5bbba77
update configuration update
Selfeer Apr 16, 2024
d30d365
update xfails
Selfeer Apr 16, 2024
5933c95
refactor configuration generation and logs for sink
Selfeer Apr 16, 2024
b34ec5c
revert some deleted files, part 1
Selfeer Apr 17, 2024
d13b140
revert some deleted files, part 1
Selfeer Apr 17, 2024
462926b
revert some deleted files, part 1
Selfeer Apr 17, 2024
2a45155
revert some deleted files
Selfeer Apr 17, 2024
9e0293a
revert some deleted files
Selfeer Apr 17, 2024
f532e84
revert some deleted files
Selfeer Apr 17, 2024
2a8c7e3
add docstring to SinkConnector class
Selfeer Apr 18, 2024
7a914b5
Move start sink connector to happen after the database in ClickHouse …
Selfeer Apr 18, 2024
965261c
update CI/CD file to be able to run the Lightweight tests on PRs with…
Selfeer Apr 18, 2024
63ba9b5
upload configuration files used for sink connector to artefacts
Selfeer Apr 18, 2024
a8c6bc7
Merge remote-tracking branch 'origin/refactor_testflows_tests' into r…
Selfeer Apr 18, 2024
b351ed6
Add xfails
Selfeer Apr 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/testflows-sink-connector-lightweight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
description: "Lightweight connector docker image"
required: true
type: string
package:
description: "Package either 'docker://' or 'https://'. Example: 'https://s3.amazonaws.com/clickhouse-builds/23.3/.../package_release/clickhouse-common-static_23.3.1.64_amd64.deb', or 'docker://altinity/clickhouse-server:23.8.8'"
type: string
default: docker://clickhouse/clickhouse-server:23.3
secrets:
DOCKERHUB_USERNAME:
required: false
Expand All @@ -23,6 +27,10 @@ on:
description: "Lightweight connector docker image"
required: true
type: string
package:
description: "Package either 'docker://' or 'https://'. Example: 'https://s3.amazonaws.com/clickhouse-builds/23.3/.../package_release/clickhouse-common-static_23.3.1.64_amd64.deb', or 'docker://altinity/clickhouse-server:23.8.8'"
type: string
default: docker://clickhouse/clickhouse-server:23.3
extra_args:
description: "Specific Suite To Run (Default * to run everything)."
required: false
Expand Down Expand Up @@ -71,7 +79,7 @@ jobs:

- name: Run testflows tests
working-directory: sink-connector-lightweight/tests/integration
run: python3 -u regression.py --only "/mysql to clickhouse replication/mysql to clickhouse replication auto/${{ inputs.extra_args != '' && inputs.extra_args || '*' }}" --clickhouse-binary-path=docker://clickhouse/clickhouse-server:23.3 --test-to-end -o classic --collect-service-logs --attr project="${GITHUB_REPOSITORY}" project.id="$GITHUB_RUN_NUMBER" user.name="$GITHUB_ACTOR" github_actions_run="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" sink_version="registry.gitlab.com/altinity-public/container-images/clickhouse_debezium_embedded:latest" s3_url="https://altinity-test-reports.s3.amazonaws.com/index.html#altinity-sink-connector/testflows/${{ steps.date.outputs.date }}_${{github.run.number}}/" --log logs/raw.log
run: python3 -u regression.py --only "/mysql to clickhouse replication/auto table creation/${{ inputs.extra_args != '' && inputs.extra_args || '*' }}" --clickhouse-binary-path="${{inputs.package}}" --test-to-end -o classic --collect-service-logs --attr project="${GITHUB_REPOSITORY}" project.id="$GITHUB_RUN_NUMBER" user.name="$GITHUB_ACTOR" github_actions_run="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" sink_version="registry.gitlab.com/altinity-public/container-images/clickhouse_debezium_embedded:latest" s3_url="https://altinity-test-reports.s3.amazonaws.com/index.html#altinity-sink-connector/testflows/${{ steps.date.outputs.date }}_${{github.run.number}}/" --log logs/raw.log

- name: Create tfs results report
if: always()
Expand All @@ -98,5 +106,6 @@ jobs:
name: testflows-sink-connector-lightweight-artefacts
path: |
sink-connector-lightweight/tests/integration/logs/*.log
sink-connector-lightweight/tests/integration/env/auto/configs/*.yml
if-no-files-found: error
retention-days: 60
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: "2.3"

services:
clickhouse-sink-connector-lt:
hostname: clickhouse-sink-connector-lt
image: ${SINK_CONNECTOR_IMAGE}
restart: "no"
expose:
- "8083"
- "1976"
- "5005"
extra_hosts:
- "host.docker.internal:host-gateway"
entrypoint: bash -c "tail -f /dev/null"
volumes:
- ./configs:/configs
- ../../logs:/logs
49 changes: 0 additions & 49 deletions sink-connector-lightweight/tests/integration/env/auto/config.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: my_connector
database.hostname: mysql-master
database.port: '3306'
database.user: root
database.password: root
database.server.name: ER54
database.include.list: test
clickhouse.server.url: clickhouse
clickhouse.server.user: root
clickhouse.server.password: root
clickhouse.server.port: '8123'
clickhouse.server.database: test
database.allowPublicKeyRetrieval: 'true'
snapshot.mode: initial
offset.flush.interval.ms: '5000'
connector.class: io.debezium.connector.mysql.MySqlConnector
offset.storage: io.debezium.storage.jdbc.offset.JdbcOffsetBackingStore
offset.storage.jdbc.offset.table.name: altinity_sink_connector.replica_source_info
offset.storage.jdbc.url: jdbc:clickhouse://clickhouse:8123/altinity_sink_connector
offset.storage.jdbc.user: root
offset.storage.jdbc.password: root
offset.storage.jdbc.offset.table.ddl: |-
CREATE TABLE if not exists %s
(
`id` String,
`offset_key` String,
`offset_val` String,
`record_insert_ts` DateTime,
`record_insert_seq` UInt64,
`_version` UInt64 MATERIALIZED toUnixTimestamp64Nano(now64(9))
)
ENGINE = ReplacingMergeTree(_version)
ORDER BY id
SETTINGS index_granularity = 8198
offset.storage.jdbc.offset.table.delete: delete from %s where 1=1
schema.history.internal: io.debezium.storage.jdbc.history.JdbcSchemaHistory
schema.history.internal.jdbc.url: jdbc:clickhouse://clickhouse:8123/altinity_sink_connector
schema.history.internal.jdbc.user: root
schema.history.internal.jdbc.password: root
schema.history.internal.jdbc.schema.history.table.ddl: |-
CREATE TABLE if not exists %s
(`id` VARCHAR(36) NOT NULL, `history_data` VARCHAR(65000), `history_data_seq` INTEGER, `record_insert_ts` TIMESTAMP NOT NULL, `record_insert_seq` INTEGER NOT NULL) ENGINE=ReplacingMergeTree(record_insert_seq) order by id
schema.history.internal.jdbc.schema.history.table.name: altinity_sink_connector.replicate_schema_history
replacingmergetree.delete.column: _sign
enable.snapshot.ddl: 'true'
database.connectionTimeZone: UTC
database.serverTimezone: UTC
clickhouse.datetime.timezone: UTC
auto.create.tables: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,9 @@ services:


clickhouse-sink-connector-lt:
hostname: clickhouse-sink-connector-lt
image: ${SINK_CONNECTOR_IMAGE}
restart: "no"
expose:
- "8083"
- "1976"
- "5005"
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- ./data:/data
- ./config.yml:/config.yml
extends:
file: clickhouse-sink-connector-lt-service.yml
service: clickhouse-sink-connector-lt

zookeeper:
extends:
Expand All @@ -61,19 +52,6 @@ services:
zookeeper:
condition: service_healthy


bash-tools:
image: registry.gitlab.com/altinity-public/container-images/test/bash-tools:5.0
hostname: bash-tools
restart: "no"
entrypoint:
- /bin/sleep
command:
- infinity
volumes:
- ../../tests/manual_scripts:/manual_scripts
- "${CLICKHOUSE_TESTS_DIR}/_instances_auto/share_folder:/tmp/share_folder"

clickhouse1:
extends:
file: clickhouse-service.yml
Expand Down
Loading
Loading