Skip to content

Releases: kubeshop/testkube

2.7.0

04 Mar 10:26

Choose a tag to compare

Changelog

New Features

  • ea4a649: feat: Add runnerId field to TestWorkflowServiceNotificationsRequest and TestWorkflowParallelStepNotificationsRequest proto messages (#7088) (@Copilot)
  • 59ad1a6: feat: Print runner capabilities to the log during start time (#7107) (@Copilot)

Bug fixes

Other work

2.6.3

19 Feb 11:28

Choose a tag to compare

Testkube 2.6.3

This patch release includes critical fixes for webhook event handling, addressing race conditions and duplicate event processing.

🐛 Bug Fixes

  • Webhook Event Race Condition with Multiple Listeners and Become Events (#7056)

    Fixed a critical race condition that occurred when multiple webhook listeners were configured with different event type filters.

    Root Cause:

    • The event emitter in shared event type pointers across concurrent goroutines
    • When multiple webhooks matched different event types (e.g., webhook A listens to , webhook B listens to ), the goroutines racing to filter event types would overwrite each other's field values
    • This caused webhooks to receive incorrect event types or miss events entirely

    Solution:

    • Modified event emission to create independent copies of events for each webhook listener
    • Each goroutine now gets its own event instance with correctly filtered event types
    • Fixed event type filtering to use value copies instead of slice element references
    • Added comprehensive test coverage for concurrent webhook scenarios:
      • Single webhook with multiple event types
      • Multiple webhooks with overlapping event types
      • Three webhooks with different event type patterns

    Technical Details:

    • Shallow copy of the event is safe because only the field (a per-goroutine event type pointer) is modified
    • Event type filtering now uses per-goroutine pointers instead of shared slice element references, avoiding pointer aliasing
    • Enhanced dummy listener implementation for better test coverage

    Impact:

    • Prevents webhooks from receiving incorrect event types
    • Ensures reliable event delivery in multi-webhook configurations
    • Improves event routing accuracy for complex webhook setups
  • Event Idempotency Using TTL Cache (#7052)

    Implemented event deduplication to prevent duplicate webhook notifications and processing of the same event multiple times.

    Root Cause:

    • Events could be redelivered or replayed due to various reasons (network issues, message bus redelivery/retries, system restarts)
    • The event emitter had no mechanism to track which events had already been processed
    • This resulted in duplicate webhook calls and duplicate event processing

    Solution:

    • Added TTL-based cache for tracking processed events using as the key
    • Cache uses configurable capacity (default: 100,000 events) and TTL (default: 1 hour)
    • Implemented atomic operation for idempotency checking:
      • First encounter of an event ID stores it in cache and processes the event
      • Subsequent encounters within TTL window skip processing
    • Cache lifecycle managed in the method:
      • Started when emitter begins listening
      • Stopped when emitter is shut down

    Technical Details:

    • Added dependency for efficient TTL cache
    • Cache capacity passed as parameter to constructor for configurability
    • Event idempotency check happens before event dispatch to listeners
    • Comprehensive test coverage including:
      • Duplicate event detection within TTL
      • Cache initialization and cleanup

    Configuration:

    • Default TTL: 1 hour (sufficient for most retry scenarios)
    • Default capacity: 100,000 events (handles high-throughput environments)
    • Both values configurable through constructor parameters

    Impact:

    • Eliminates duplicate webhook notifications
    • Prevents redundant processing of the same events
    • Improves system reliability and efficiency
    • Reduces noise in webhook endpoints and logs

📝 Changelog

Bug Fixes

  • 238b766: fix: webhook event race condition with multiple listeners and become events (#7056) (@Copilot, @vsukhin)
  • 0e225e4: fix: add event idempotency using TTL cache on event.Id with configurable TTL and capacity (#7052) (@Copilot, @vsukhin)

Other Changes

Commits

Full Changelog: 2.6.2...2.6.3

2.6.2

17 Feb 15:27

Choose a tag to compare

Testkube 2.6.2

This patch release includes critical bug fixes for utilization metrics and MinIO storage configuration.

🐛 Bug Fixes

  • Panic on Nil Timestamp in Utilization Metrics Grouping (#7057)

    Fixed a critical panic that occurred when processing utilization metrics with nil timestamps.

    Root Cause:

    • The function in attempted to dereference without checking if it was nil
    • This caused a nil pointer dereference panic when metrics without timestamps were processed

    Solution:

    • Added nil check for before processing
    • Metrics without timestamps are now safely skipped during grouping
    • Added comprehensive test coverage with test data file

    Impact:

    • Prevents agent crashes when processing incomplete metric data
    • Improves system stability and reliability
  • MinIO Client Certificate Loading with Empty Paths (#7045)

    Fixed an issue where MinIO client initialization failed when using GCS S3-compatible endpoints with SSL enabled but without client certificates.

    Root Cause:

    • The function in unconditionally attempted to load client certificates
    • When or were empty strings (common for GCS and other S3-compatible services), MinIO client initialization would fail
    • GCS S3-compatible endpoints require SSL but don't use client certificate authentication

    Solution:

    • Added validation to only load client certificates when both and are non-empty
    • Server CA certificates (via ) are still loaded when provided, independent of client certificates
    • Added comprehensive test suite covering all TLS configuration scenarios:
      • SSL with client certificates
      • SSL without client certificates (GCS use case)
      • SSL with CA file only
      • Insecure mode
      • No SSL

    Impact:

    • Enables proper use of GCS S3-compatible storage endpoints
    • Fixes artifact storage configuration for Google Cloud Storage users
    • Improves compatibility with various S3-compatible storage providers

📝 Changelog

Bug Fixes

Commits

Full Changelog: 2.6.1...2.6.2

2.6.1

11 Feb 17:57

Choose a tag to compare

Testkube 2.6.1

This patch release includes important security updates and bug fixes for webhook event handling.

🔒 Security Updates

  • CVE Fixes (February 2025) (#7036)
    • Updated Alpine base image to 3.23.3
    • Updated dependencies to address reported CVEs
    • Addresses security vulnerabilities identified in February 2025

🐛 Bug Fixes

  • [TKC-4867] Webhook Event Issues - Misleading Logs and Incorrect Event Types (#7032)

    This comprehensive fix addresses multiple issues with webhook event handling:

    Become Event Handling:

    • Fixed silent failures for become events where webhooks appeared to succeed with status_code:0
    • Added debug logging when webhooks are skipped due to state not changing
    • Introduced dedicated variable for clearer tracking of skipped webhooks
    • Fixed metrics and telemetry collection to skip non-executed webhooks
    • Added comprehensive tests for become event state transitions

    Execution Queueing Events:

    • Fixed incorrect end events being emitted during execution queueing
    • The function was incorrectly sending events for executions with status assigned (not finished)
    • Removed switch statement that emitted end events during queueing phase
    • End events are now correctly sent only by in when executions actually complete

    Technical Improvements:

    • Enhanced test precision with strict mock expectations (changed to )
    • Clearer conditional logic distinguishing between webhook skip scenarios and HTTP errors
    • Improved code maintainability and debugging capabilities

📝 Changelog

Security

Bug Fixes

Commits

Full Changelog: 2.6.0...2.6.1

2.6.0

05 Feb 15:18

Choose a tag to compare

Changelog

New Features

Bug fixes

2.5.7

16 Jan 12:55

Choose a tag to compare

Changelog

New Features

Bug fixes

2.5.6

13 Jan 12:59

Choose a tag to compare

Changelog

Bug fixes

2.5.5

09 Jan 16:01

Choose a tag to compare

Changelog

Bug fixes

2.5.4

05 Jan 09:35

Choose a tag to compare

Changelog

Bug fixes

2.5.3

23 Dec 13:24

Choose a tag to compare

Changelog

New Features

  • e114099: feat: detect failure when service exits with non-zero code; cleanup services logic and add tests (#6909) (@dejanzele)

Bug fixes