Skip to content

Add redisdb full-coverage evalya fixture - #24917

Draft
NouemanKHAL wants to merge 2 commits into
masterfrom
noueman/redisdb-evalya-full-coverage
Draft

Add redisdb full-coverage evalya fixture#24917
NouemanKHAL wants to merge 2 commits into
masterfrom
noueman/redisdb-evalya-full-coverage

Conversation

@NouemanKHAL

@NouemanKHAL NouemanKHAL commented Aug 19, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Adds a full metric-coverage evalya test fixture for the redisdb integration (redis-full), alongside the existing authenticated standalone fixture (redis-standalone), and bumps the supporting Go proxy toolchain from 1.23 to 1.26.

How redis-full works

redis-full publishes a Compose environment (redisdb/tests/compose/full-coverage.compose) whose entrypoint is a small Go RESP proxy. The goal is to make a single fixture emit the entire INFO surface that the redisdb check and the OpenTelemetry redisreceiver can parse, including fields a plain OSS Redis can never produce.

The environment has four services:

  • redis-master — a real redis-server run with AOF on, a 16MB maxmemory ceiling under allkeys-lru, slowlog-log-slower-than 0, and latency monitoring. No config file is mounted on purpose, so CONFIG/CLIENT/CLUSTER stay un-renamed and the check's side-channel collections work.
  • redis-replicareplicaof redis-master, so INFO replication reports a connected slave (connected_slaves, slave0) and the check's with-replica code path is exercised.
  • seed — a one-shot job that populates typed keys (string/list/set/hash/zset/stream), TTL keys, keyspace hits and misses, a redis-benchmark overfill that forces evictions, a slow command, and short-TTL keys read back after expiry. This drives the naturally derived counters (keyspace hits/misses, evicted/expired keys, commands processed, net bytes, commandstats, slowlog) to non-zero before the first scrape.
  • info-proxy — a transparent RESP proxy (redisdb/tests/proxy/) that fronts the master on 6379. It is the fixture entrypoint (published as redis-full), gated on master + replica healthy and seed completed, so a single dependency on the proxy pulls up the whole environment already primed.

The proxy forwards every command to the master byte-for-byte, with exactly two exceptions:

  1. INFO all rewrite. It appends the key:value lines in redisdb/tests/proxy/inject.conf to the INFO reply. These are precisely the fields OSS Redis cannot emit no matter how it is configured — Azure managed-cache fields (bytes_received_per_sec), cluster_enabled/cluster_connections, the sentinel_* family, and the RediSearch search_* family — each matching a key the check expects in constants.py. Section-scoped requests (INFO commandstats, INFO keyspace) are left untouched so their narrowly parsed replies are not polluted.
  2. Canned CLUSTER INFO. Served from cluster_info.txt without touching the backend, so a standalone instance presents as cluster-enabled and the check follows its cluster path.

A single injection point covers both scrapers because both read INFO as flat key:value pairs. The proxy dials a dedicated backend connection per client to preserve per-connection AUTH and RESP protocol state, and its RESP framing handles both RESP2 (the redisdb check pins protocol 2) and RESP3 (the OTel receiver's go-redis client negotiates it via HELLO).

Only the Redis metric-generation setup lives here; the DD Agent / OTel Collector stack that consumes these fixtures lives in semantic-core.

Motivation

Give the redisdb check a fixture that exercises its full metric surface end-to-end, including the managed-service, cluster, sentinel, and RediSearch fields a plain OSS Redis instance never reports, so metric parsing and submission can be validated without standing up Azure Cache, a sentinel deployment, or a RediSearch module build.

Review checklist (to be filled by the reviewer)

  • Changes limited to test fixtures and developer assets; nothing shipped with the Agent, so no changelog entry is required.
  • qa/skip-qa (test fixtures and developer tooling only; no Agent-impacting change).

NouemanKHAL and others added 2 commits August 18, 2026 18:33
Add a full metric-coverage evalya environment for the redisdb check and
the OpenTelemetry redisreceiver. A master/replica pair plus a one-shot
seed produce every naturally derived INFO field (keyspace, eviction,
expiry, commandstats, replication, net). An INFO-rewrite proxy fronts
the master and augments INFO all with the fields OSS Redis never emits
(managed-service, cluster, sentinel, RediSearch) and serves a canned
CLUSTER INFO. Both scrapers read INFO as flat key:value, so one
injection point feeds both sides of the metrics-equivalence pipeline.

Published as the redis-full task so a single dependency on the proxy
pulls up the whole environment.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bump the redisdb test INFO-rewrite proxy's Go directive and build image
from 1.23 to 1.26. Test-fixture only; not shipped with the Agent.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@NouemanKHAL NouemanKHAL added the qa/skip-qa Automatically skip this PR for the next QA label Aug 19, 2026
@dd-octo-sts dd-octo-sts Bot added integration/redisdb and removed qa/skip-qa Automatically skip this PR for the next QA labels Aug 19, 2026
@NouemanKHAL NouemanKHAL added the qa/skip-qa Automatically skip this PR for the next QA label Aug 19, 2026
@dd-octo-sts

dd-octo-sts Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Validation Report

All 21 validations passed.

Show details
Validation Description Status
agent-reqs Verify check versions match the Agent requirements file
ci Validate CI configuration and code coverage settings
codeowners Validate every integration has a CODEOWNERS entry
config Validate default configuration files against spec.yaml
dep Verify dependency pins are consistent and Agent-compatible
http Validate integrations use the HTTP wrapper correctly
imports Validate check imports do not use deprecated modules
integration-style Validate check code style conventions
jmx-metrics Validate JMX metrics definition files and config
labeler Validate PR labeler config matches integration directories
legacy-signature Validate no integration uses the legacy Agent check signature
license-headers Validate Python files have proper license headers
licenses Validate third-party license attribution list
metadata Validate metadata.csv metric definitions
models Validate configuration data models match spec.yaml
openmetrics Validate OpenMetrics integrations disable the metric limit
package Validate Python package metadata and naming
qa-label Validate the pull request declares whether it needs QA for the next Agent release
readmes Validate README files have required sections
saved-views Validate saved view JSON file structure and fields
version Validate version consistency between package and changelog

View full run

@cit-pr-commenter-54b7da

Copy link
Copy Markdown

evalya-impact-summary

evalya impact analysis
Impact analysis: 0 selected, 0 skipped (of 0 test tasks)
Publish tasks:   2 (always emitted)
Diff (10 files):
  redisdb/tests/compose/full-coverage.compose
  redisdb/tests/evalya.yaml
  redisdb/tests/proxy/Dockerfile
  redisdb/tests/proxy/cluster_info.txt
  redisdb/tests/proxy/go.mod
  redisdb/tests/proxy/inject.conf
  redisdb/tests/proxy/inject.go
  redisdb/tests/proxy/main.go
  redisdb/tests/proxy/proxy_test.go
  redisdb/tests/proxy/resp.go

Debug a specific task: evalya plan impact --path <path> --task <task>

Learn more about CI impact filtering

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Tests  Code Coverage

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 90.28% (+1.69%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 9a67505 | Docs | View more details | Give us feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration/redisdb qa/skip-qa Automatically skip this PR for the next QA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant