Skip to content

v3.8.0

Latest

Choose a tag to compare

@slayerjain slayerjain released this 04 Dec 17:42
3266136

Keploy v3.8.0 is a minor release. It works with keploy/integrations main (header rules, gRPC binary and Trailers-Only metadata).

Before you upgrade

  • Scripts parsing keploy --version for Docker/OCI tags: keploy --version now prints Keploy 3.8.0+oss. Strip the +... suffix before using it as an OCI tag (for example ${ver%%+*}). keploy update, Homebrew checks, and published Docker tags (3.8.0, latest) are unchanged.
  • Invalid header noise rules: Empty, trailing-dot (header.x.), and NUL-byte header noise entries previously matched every header and now match none (warning once per invalid key in a test case; ignored in globalNoise). To ignore all headers intentionally, write header: [] in the test case or header: {header: []} in globalNoise.
  • Dotted gRPC metadata keys: Metadata names containing a dot (such as acme.date) are now matched whole instead of by suffix (Date). Add noise explicitly (header: [acme.date]) if the value changes between runs.
  • Replaying TLS-recorded gRPC tests against a non-localhost cleartext app: Non-localhost peers no longer silently fall back from TLS to cleartext HTTP/2 unless explicitly opted in, and a --base-path on a different port or using https:// no longer opts in:
    • When Keploy starts the app (keploy test -c ...): leave --host unset so Keploy reaches the app at localhost.
    • When the app is already running (or using replaceWith to another host): pass --base-path http://<host>:<gRPC port> (and --port <HTTP port> if the test set also includes HTTP tests).

What changed

  1. CLI +oss build label: keploy --version, outbound CLI headers, and telemetry identify open-source builds with SemVer build metadata (Keploy 3.8.0+oss) while keeping 3.8.0 for updates and image tags.

  2. Safer, deterministic header matching: Enforces a canonical protected-header list across HTTP/gRPC replay matching and reports excused header differences without exposing header values.

  3. Faithful binary -bin gRPC metadata & HTTP/2 cookies: Normalizes C-core raw binary -bin headers to unpadded base64 at capture time, decodes cleanly on replay without double-encoding (preserving legacy recordings), joins split HTTP/2 request cookie headers with "; " per RFC 9113, and counts header bytes against the 5 MB test-case cap.

  4. Host opt-in for non-loopback gRPC cleartext fallback: Keeps automatic fallback for localhost servers speaking plain HTTP/2 while refusing silent TLS downgrades for non-localhost peers and peers that have already spoken TLS in the run.

  5. Quieter startup logs with one summary line: Moves per-mock startup mock matched and complete startup mock served lines from INFO to DEBUG (keeping incomplete serves at WARN) and emits one INFO summary line per phase (before the first test, before an app restart, or when no test was announced).

    • Before vs After (keploy test, 300 startup calls across 2 test sets — 748 INFO lines before, 150 lines after; keploy mock replay, 300 calls — 356 lines before, 57 after):

    Before (748 lines for two sets):

    INFO  Starting Application :  {"program": "boot-app", "args": 0}
    INFO  startup mock matched    {"name": "mock-0", "kind": "Generic", "phase": "boot", "recorded_body_bytes": 12}
    INFO  startup mock matched    {"name": "mock-1", "kind": "Generic", "phase": "boot", "recorded_body_bytes": 12}
          ... 298 more ("startup mock matched" for Generic, "startup mock served" for Http), the CLI's own lines between them ...
    INFO  starting test for       {"test case": "get-healthz-1", "test set": "test-set-0"}
    

    After (150 lines for two sets):

    INFO  Starting Application :  {"program": "boot-app", "args": 0}
    INFO  waiting for the application to accept a connection on {}:18080 ... before the first test; ...
    INFO  startup: 300 calls were answered from the recording before the first test  {"served": 300, "by_kind": {"Generic": 260, "Http": 40}, "incomplete": 0}
    INFO  starting test for       {"test case": "get-healthz-1", "test set": "test-set-0"}
    
  6. Prompt hold-budget cleanup on recording stop (syncMock): Refunds deferred-cut stub bytes back to the shared hold pool on session stop, isolates stub caps from active in-flight hold accounting (inFlight), clones strings cleanly, and exposes FlushDeferredCutDrops for fail-closed handoff between sessions.

  7. Clean agent HTTP server shutdown join & compose stream resumption (#5518): Joins StartAgentServer on shutdown after running bpfsafety.GracefulShutdown (ending idle streams after a brief quiet window that extends while bytes are written or TCP ACKs advance, and closing spare StateNew sockets immediately), resumes recording and replay frame streams when Docker Compose stops and recreates the agent with unasked end markers, and deletes per-round tokens when each round finishes.

Full changelog: v3.7.42...v3.8.0