Skip to content

fix(json): stop truncating/colliding deep-percentile keys in JSON output #710

fix(json): stop truncating/colliding deep-percentile keys in JSON output

fix(json): stop truncating/colliding deep-percentile keys in JSON output #710

Workflow file for this run

name: ASAN (AddressSanitizer & LeakSanitizer)
# Memory error and leak detection using AddressSanitizer and LeakSanitizer
# This workflow builds memtier_benchmark with sanitizers enabled and runs
# the full test suite to detect memory leaks and address errors.
on:
push:
branches: [master, main]
paths-ignore:
- '.github/workflows/ci.yml'
- '.github/workflows/code-style.yml'
- '.github/workflows/release.yml'
- '.github/workflows/release-rpm.yml'
- '.github/workflows/dockers.yml'
- 'README.md'
- 'docs/**'
- '**.md'
pull_request:
branches: [master, main]
paths-ignore:
- '.github/workflows/ci.yml'
- '.github/workflows/code-style.yml'
- '.github/workflows/release.yml'
- '.github/workflows/release-rpm.yml'
- '.github/workflows/dockers.yml'
- 'README.md'
- 'docs/**'
- '**.md'
permissions:
contents: read
jobs:
build-asan:
runs-on: ubuntu-latest
name: Build with ASAN
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install build dependencies
run: |
sudo apt-get -qq update
sudo apt-get install -y \
build-essential \
autoconf \
automake \
pkg-config \
libevent-dev \
zlib1g-dev \
libssl-dev
- name: Build with sanitizers
run: |
autoreconf -ivf
./configure --enable-sanitizers
make -j
- name: Verify ASAN is enabled
run: |
ldd ./memtier_benchmark | grep asan
echo "✓ AddressSanitizer is linked"
- name: Upload build artifact
uses: actions/upload-artifact@v5
with:
name: memtier-asan-build
path: |
memtier_benchmark
retention-days: 1
test-asan:
needs: build-asan
strategy:
fail-fast: false
matrix:
test-config:
- name: "Single Endpoint: TCP Plaintext"
env: { OSS_STANDALONE: "1", OSS_CLUSTER: "0", TLS: "0", VERBOSE: "1", ASAN_OPTIONS: "detect_leaks=1" }
tls: false
# "Single Endpoint: TCP TLS" was split into per-test-file cells
# (round-37) to reduce wallclock on the longest sanitizer cells. Each
# split honors the TEST env var consumed by tests/run_tests.sh.
- name: "Single Endpoint: TCP TLS (monitor)"
env: { OSS_STANDALONE: "1", OSS_CLUSTER: "0", TLS: "1", VERBOSE: "1", ASAN_OPTIONS: "detect_leaks=1",
TEST: "test_monitor_input.py" }
tls: true
- name: "Single Endpoint: TCP TLS (scan-staircase)"
env: { OSS_STANDALONE: "1", OSS_CLUSTER: "0", TLS: "1", VERBOSE: "1", ASAN_OPTIONS: "detect_leaks=1",
TEST: "test_scan.py test_client_staircase.py" }
tls: true
- name: "Single Endpoint: TCP TLS (mget)"
env: { OSS_STANDALONE: "1", OSS_CLUSTER: "0", TLS: "1", VERBOSE: "1", ASAN_OPTIONS: "detect_leaks=1",
TEST: "test_mget_protocol.py test_mget_standalone.py test_mget_validation.py" }
tls: true
- name: "Single Endpoint: TCP TLS (cli)"
env: { OSS_STANDALONE: "1", OSS_CLUSTER: "0", TLS: "1", VERBOSE: "1", ASAN_OPTIONS: "detect_leaks=1",
TEST: "test_cli_validation_command.py test_cli_validation_count_flags.py test_cli_validation_read_preference.py test_cli_validation_run_count.py test_cli_validation_sampler.py test_cli_validation_size.py test_cli_fuzz_phase1.py test_cli_validation_prometheus.py" }
tls: true
- name: "Single Endpoint: TCP TLS (misc)"
env: { OSS_STANDALONE: "1", OSS_CLUSTER: "0", TLS: "1", VERBOSE: "1", ASAN_OPTIONS: "detect_leaks=1",
TEST: "test_arbitrary_command_misses.py test_crash_handler_integration.py test_json_output_integrity.py test_large_key_prefix.py test_miss_rate_tracking.py test_realtime_latencies.py test_resp_response_fuzzer.py test_retry_on_error.py test_sigpipe_immunity.py test_sigpipe_tls_rst.py test_statsd.py test_tls_logging.py test_prometheus.py test_prometheus_redaction.py" }
tls: true
# TODO: v1.2 coverage deferred to nightly when schedule added
# "OSS TCP TLS v1.3" was split into per-test-file cells (round-37).
- name: "OSS TCP TLS v1.3 (monitor)"
env: { OSS_STANDALONE: "1", OSS_CLUSTER: "0", TLS: "1", TLS_PROTOCOLS: "TLSv1.3", VERBOSE: "1", ASAN_OPTIONS: "detect_leaks=1",
TEST: "test_monitor_input.py" }
tls: true
- name: "OSS TCP TLS v1.3 (scan-staircase)"
env: { OSS_STANDALONE: "1", OSS_CLUSTER: "0", TLS: "1", TLS_PROTOCOLS: "TLSv1.3", VERBOSE: "1", ASAN_OPTIONS: "detect_leaks=1",
TEST: "test_scan.py test_client_staircase.py" }
tls: true
- name: "OSS TCP TLS v1.3 (mget)"
env: { OSS_STANDALONE: "1", OSS_CLUSTER: "0", TLS: "1", TLS_PROTOCOLS: "TLSv1.3", VERBOSE: "1", ASAN_OPTIONS: "detect_leaks=1",
TEST: "test_mget_protocol.py test_mget_standalone.py test_mget_validation.py" }
tls: true
- name: "OSS TCP TLS v1.3 (cli)"
env: { OSS_STANDALONE: "1", OSS_CLUSTER: "0", TLS: "1", TLS_PROTOCOLS: "TLSv1.3", VERBOSE: "1", ASAN_OPTIONS: "detect_leaks=1",
TEST: "test_cli_validation_command.py test_cli_validation_count_flags.py test_cli_validation_read_preference.py test_cli_validation_run_count.py test_cli_validation_sampler.py test_cli_validation_size.py test_cli_fuzz_phase1.py test_cli_validation_prometheus.py" }
tls: true
- name: "OSS TCP TLS v1.3 (misc)"
env: { OSS_STANDALONE: "1", OSS_CLUSTER: "0", TLS: "1", TLS_PROTOCOLS: "TLSv1.3", VERBOSE: "1", ASAN_OPTIONS: "detect_leaks=1",
TEST: "test_arbitrary_command_misses.py test_crash_handler_integration.py test_json_output_integrity.py test_large_key_prefix.py test_miss_rate_tracking.py test_realtime_latencies.py test_resp_response_fuzzer.py test_retry_on_error.py test_sigpipe_immunity.py test_sigpipe_tls_rst.py test_statsd.py test_tls_logging.py test_prometheus.py test_prometheus_redaction.py" }
tls: true
- name: "OSS-CLUSTER API: TCP Plaintext"
env: { OSS_STANDALONE: "0", OSS_CLUSTER: "1", VERBOSE: "1", ASAN_OPTIONS: "detect_leaks=1", PARALLELISM: "2" }
tls: false
# "OSS-CLUSTER API: TCP TLS" was split into per-test-file cells (round-37).
- name: "OSS-CLUSTER API: TCP TLS (mget)"
env: { OSS_STANDALONE: "0", OSS_CLUSTER: "1", TLS: "1", VERBOSE: "1", ASAN_OPTIONS: "detect_leaks=1", PARALLELISM: "2",
TEST: "test_mget_cluster.py" }
tls: true
- name: "OSS-CLUSTER API: TCP TLS (reconnections)"
env: { OSS_STANDALONE: "0", OSS_CLUSTER: "1", TLS: "1", VERBOSE: "1", ASAN_OPTIONS: "detect_leaks=1", PARALLELISM: "2",
TEST: "test_reconnections.py" }
tls: true
- name: "OSS-CLUSTER API: TCP TLS (transaction)"
env: { OSS_STANDALONE: "0", OSS_CLUSTER: "1", TLS: "1", VERBOSE: "1", ASAN_OPTIONS: "detect_leaks=1", PARALLELISM: "2",
TEST: "test_cluster_transaction.py test_transaction_pipeline.py" }
tls: true
- name: "OSS-CLUSTER API: TCP TLS (misc)"
env: { OSS_STANDALONE: "0", OSS_CLUSTER: "1", TLS: "1", VERBOSE: "1", ASAN_OPTIONS: "detect_leaks=1", PARALLELISM: "2",
TEST: "test_monitor_cluster.py test_monitor_cluster_backpressure.py test_cli_fuzz_phase1.py test_cli_validation_command.py test_cli_validation_count_flags.py test_cli_validation_read_preference.py test_cli_validation_run_count.py test_cli_validation_size.py test_crash_handler_integration.py test_json_output_integrity.py test_realtime_latencies.py test_resp_response_fuzzer.py test_retry_on_error.py test_sigpipe_immunity.py test_sigpipe_tls_rst.py test_statsd.py test_tls_logging.py test_prometheus.py" }
tls: true
- name: "STRESS: Standalone TCP Plaintext"
env: { OSS_STANDALONE: "1", OSS_CLUSTER: "0", TLS: "0", VERBOSE: "1", ASAN_OPTIONS: "detect_leaks=1", STRESS: "1" }
tls: false
- name: "STRESS: OSS-CLUSTER API: TCP Plaintext"
env: { OSS_STANDALONE: "0", OSS_CLUSTER: "1", VERBOSE: "1", ASAN_OPTIONS: "detect_leaks=1", STRESS: "1" }
tls: false
runs-on: ubuntu-latest
name: ASAN ${{ matrix.test-config.name }}
steps:
- uses: actions/checkout@v5
- name: Download build artifact
uses: actions/download-artifact@v5
with:
name: memtier-asan-build
- name: Restore executable permissions
run: chmod +x memtier_benchmark
- name: Install dependencies
run: |
sudo apt-get -qq update
sudo apt-get install -y pkg-config libevent-dev libssl-dev
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.10'
architecture: x64
- name: Install Python test dependencies
run: pip install -r ./tests/test_requirements.txt
- name: Install Redis
run: |
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
sudo apt-get -qq update
sudo apt-get install redis
sudo service redis-server stop
- name: Increase connection limit
run: |
sudo sysctl -w net.ipv4.tcp_fin_timeout=10
sudo sysctl -w net.ipv4.tcp_tw_reuse=1
ulimit -n 40960
- name: Generate TLS test certificates
if: matrix.test-config.tls
run: ./tests/gen-test-certs.sh
- name: Run tests
timeout-minutes: 45
env: ${{ matrix.test-config.env }}
run: |
./tests/run_tests.sh