发布

  • [OPIK-6705] [BE] fix: probe ClickHouse readiness via V2 client (#7128)

    frostbyte_neo 发布于 2026-06-17 11:34:19 +00:00

    • [OPIK-6705] [BE] fix: probe ClickHouse readiness via V2 client

    • fix(health-check): drop per-call QuerySettings on the readonly free-form-sql probe

    The Agent Insights read-only free-form SQL user runs under the
    ClickHouse readonly=1 settings profile. Sending per-query setting
    changes (including max_execution_time) on a readonly=1 user can be
    rejected by stricter profiles or future ClickHouse versions; the probe
    should stay compatible with any settings-restricted profile.

    • fix(agent-insights): tolerate quoted/cased TOGGLE_AGENT_INSIGHTS_ENABLED

    docker-compose substitution of ${VAR:-"true"} passes the literal quote
    characters through to the container env, so the previous
    [ "$VAR" != "true" ] check silently rejected what Dropwizard's YAML
    re-parse accepts as boolean true. The script then exited 0 without
    provisioning the read-only user while the backend booted with the
    feature armed, and the clickhouse-readonly-freeform-sql health check
    surfaced AUTHENTICATION_FAILED.

    Normalize like Dropwizard does on the Java side: strip outer quotes and
    lowercase, then compare to canonical true. Uses tr rather than bash 4
    ${var,,} so the script also runs unmodified on bash 3.2 hosts
    (scripts/dev-runner.sh on macOS).

    • fix(test): create opik database in HealthCheckIntegrationTest setup
    下载附件