diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 63632be3a..5e7d45efc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -64,10 +64,31 @@ jobs: # Surface symptom: every test fails with "Code: 194 REQUIRED_PASSWORD". Setting # CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1 + CLICKHOUSE_SKIP_USER_SETUP=1 keeps the # default-user-passwordless path open without baking a credential into the workflow. + # Use the same server overrides as the ClickHouse nightly job (`.claude/clickhouse-config/`). + # Without `mutations_sync = 2` an `ALTER ... DELETE` can finish between the two reads of one + # oracle check, which then reports a mismatch that is only a race (e.g. 132 rows vs 0 rows + # after `ALTER TABLE t0 DELETE WHERE `). The files with `` go to + # `users.d`, the rest to `config.d`. Each file is mounted separately, so the directories that + # the entrypoint writes to stay writable. + CONFIG_DIR="$PWD/.claude/clickhouse-config" + MOUNTS=() + for f in "$CONFIG_DIR"/*.xml; do + if grep -q '' "$f"; then + MOUNTS+=(-v "$f:/etc/clickhouse-server/users.d/$(basename "$f"):ro") + else + MOUNTS+=(-v "$f:/etc/clickhouse-server/config.d/$(basename "$f"):ro") + fi + done docker run --ulimit nofile=262144:262144 --name clickhouse-server -p8123:8123 -d \ -e CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1 -e CLICKHOUSE_SKIP_USER_SETUP=1 \ + "${MOUNTS[@]}" \ clickhouse/clickhouse-server:head until curl -sf http://127.0.0.1:8123/ping 2>/dev/null; do sleep 1; done + # Fail here rather than in a flaky oracle if the overrides did not take effect. + SETTINGS=$(curl -sf http://127.0.0.1:8123/ --data-binary \ + "SELECT getSetting('mutations_sync'), getSetting('alter_sync'), getSetting('async_insert') FORMAT TSV") + echo "mutations_sync, alter_sync, async_insert: $SETTINGS" + test "$SETTINGS" = "$(printf '2\t2\tfalse')" - name: Run Tests run: CLICKHOUSE_AVAILABLE=true mvn -Djacoco.skip=true -Dtest=ClickHouseBinaryComparisonOperationTest,TestClickHouse,ClickHouseOperatorsVisitorTest,ClickHouseToStringVisitorTest,ClickHouseTypeTest,ClickHouseTypeParserTest,ClickHouseTypeGenerationTest,ClickHouseCastExtensionTest,ClickHouseCODDTestFilterTest,ClickHouseCERTGeneratorTest,ClickHouseTableGeneratorTest test - name: Show fatal errors