Skip to content

v1.1.0

Latest

Choose a tag to compare

@Aryex Aryex released this 17 Nov 23:38

Key Features

Pub/Sub: Added Pub/Sub to the Ruby client.

  • Subscriptions: exact-channel subscriptions and message reads (subscribe, unsubscribe, get_pubsub_message, try_get_pubsub_message); pattern subscriptions (psubscribe, punsubscribe); and sharded Pub/Sub in cluster mode (ssubscribe, sunsubscribe, publish(channel, message, sharded: true)).
  • Delivery: nonblocking *_lazy variants of the subscribe calls, and callback-based delivery.
  • Inspection: pubsub_channels, pubsub_numsub, pubsub_numpat, pubsub_shardchannels, pubsub_shardnumsub, plus connection subscription state.
  • Pipelines and transactions: Pub/Sub commands can be queued in pipelined and multi.

Subscriptions require RESP3.

Valkey Search: Added FT.CREATE, FT.DROPINDEX, FT.INFO, FT.SEARCH, and FT.AGGREGATE through Valkey::Search builders, with structured FT.SEARCH results and option names aligned with the other GLIDE clients.

IAM Authentication: Added IAM authentication for ElastiCache and MemoryDB through Valkey::IamAuthConfig and the iam_config: connection option, with refresh_iam_token for on-demand token refresh. IAM requires TLS, and configurations without TLS are rejected when the client is created.

Valkey 9.x Command Support:

  • Valkey 9.0: delifeq(key, value) for atomic compare-and-delete
  • Valkey 9.1: hgetdel(key, *fields)
  • Valkey 9.2: sismember_if_exists(key, member) (the XX option for SISMEMBER)

AZ Affinity All Nodes Read Strategy: Added Valkey::ReadFrom::AZ_AFFINITY_ALL_NODES. Reads are served by any node in the client's availability zone, primaries and replicas alike, before other nodes are tried.

Pipeline and Transaction Results: pipelined and multi return Valkey::Future placeholders for queued commands. They keep successful replies when another queued command fails, and they support multi(exception: false). Queue-time aborts raise Valkey::ExecAbortError, and float and error values are retained in transaction results. multi uses glide-core's atomic batch.

OpenTelemetry Resource Attributes: Valkey::OpenTelemetry.init(resource_attributes:) attaches custom resource attributes and adds process attributes automatically, without replacing values already set in OTEL_RESOURCE_ATTRIBUTES.

Client Identification: The new lib_name: and client_info_tag: connection options set the CLIENT SETINFO LIB-NAME value.

Fork Safety: Using a client in a child process that was created before fork() now raises Valkey::InheritedError instead of terminating the process.

Release Supply Chain: Gems published on RubyGems.org carry Sigstore build-provenance attestations. Distributed gems include the Apache 2.0 license, the project notice, and the redis-rb MIT license.

GLIDE Core 2.6.0: The bundled native library is built from valkey-glide v2.6.0.

Fixes

  • RESP3 is now the default protocol, in line with the other GLIDE clients. Pass protocol: :resp2 to use RESP2.
  • client_az is validated. String values are trimmed, and blank values are rejected when an availability-zone affinity strategy is selected.
  • cluster_mode: true requires an explicit seed node. It no longer silently connects to the standalone default.
  • client(:subcommand) no longer invokes private methods. Custom Valkey subclasses must make any dispatched client_* handlers public.

Known Issues

  • A client created in a forked child can be killed by SIGTRAP on macOS if the parent used Valkey before the fork. Clients created before the fork are guarded by Valkey::InheritedError.
    • Cause: the fix, valkey-io/valkey-glide#7569, isn't in glide-core v2.6.0.
    • Workaround: don't use Valkey in the parent before forking.
    • Status: the fix is on main (#420) and will ship once a glide-core release includes it.

What's Changed

The curated, user-facing list of changes in this release is in CHANGELOG.md. Pull requests are grouped below by area; expand a section to see them.

Pub/Sub (11)
  • feat(pubsub): introduce PubSub handler by @Aryex in #304
  • feat(pubsub): inline Pub/Sub APIs for exact channels by @Aryex in #308
  • refactor(pubsub): mixin refactor by @Aryex in #311
  • feat(pubsub): pattern subscriptions, lazy variants and callback delivery by @Aryex in #316
  • feat(pubsub): sharded Pub/Sub for cluster mode by @Aryex in #317
  • feat(pubsub): metadata API by @Aryex in #320
  • feat(ruby): enable Pub/Sub commands in pipeline and multi by @Aryex in #329
  • test(ruby): add parameterized Pub/Sub coverage matrix by @Aryex in #332
  • refactor(ruby): organize Pub/Sub files and public types by @Aryex in #390
  • refactor(ruby): make PubSubState a getter-only class by @Aryex in #399
  • fix(ruby): swap PubSub.publish args position by @Aryex in #432 (cherry-picked in #433)
Commands, configuration, and API (16)
Fixes and hardening (6)
  • fix(ruby): raise Valkey::InheritedError for clients used after fork() by @Aryex in #302
  • fix(ruby): harden FFI, CI, and gem releases by @Aryex in #338
  • fix(ruby): reject cluster mode configurations that has empty nodes by @Aryex in #344
  • fix(ruby): require TLS for IAM auth by @jeremyprime in #397
  • fix(ruby): add project license files by @Aryex in #411
  • fix: never echo ssl_params values in errors and accept PEM text by @xShinnRyuu in #428 (cherry-picked in #433)
CI, docs, and maintenance (17)
  • Backport release-1.0 into main by @Aryex in #276
  • Reorganize specs into new directories by @zmariscal in #287
  • chore: repo cleanup by @Aryex in #292
  • fix(ci): version lock Rust and zigbuild by @Aryex in #298
  • Revise Valkey GLIDE documentation links by @Aryex in #328
  • chore(ruby): bump GLIDE Core sub modules by @Aryex in #341
  • ci: test against Valkey 9.2.0-rc1 by @currantw in #350
  • ci: automate submodule updates and correct action version comments by @Aryex in #354
  • test: verify Valkey 9.2 INFO fields by @currantw in #357
  • ci: label Dependabot submodule updates as glide-core by @Aryex in #363
  • ci: run on submodule change by @Aryex in #378
  • chore(deps): bump valkey-glide for DELIFEQ by @Aryex in #381
  • docs(ruby): enforce YARD documentation format by @Aryex in #391
  • docs(ruby): adopt Keep a Changelog format by @Aryex in #393
  • Bump valkey-glide module to v2.6.0 by @Aryex in #404
  • chore(ruby): prepare 1.1.0 release by @Aryex in #410
  • chore(ruby): cherry-pick #428 and #432 into release-1-1-0 by @Aryex in #433
Dependencies (31)
  • chore(deps): Bump the minor-updates group with 2 updates by @dependabot[bot] in #278
  • chore(deps): Bump actions/upload-artifact from 4.6.2 to 7.0.1 by @dependabot[bot] in #279
  • chore(deps): Bump actions/cache from 4.3.0 to 6.1.0 by @dependabot[bot] in #280
  • chore(deps): Bump actions/checkout from 4.3.1 to 7.0.1 by @dependabot[bot] in #281
  • chore(deps): Bump actions/setup-python from 5.6.0 to 7.0.0 by @dependabot[bot] in #296
  • chore(deps): Bump actions/download-artifact from 4.3.0 to 8.0.1 by @dependabot[bot] in #297
  • chore(deps): Bump dtolnay/rust-toolchain from e97e2d8cc328f1b50210efc529dca0028893a2d9 to 6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 by @dependabot[bot] in #303
  • chore(deps): Bump ruby/setup-ruby from 1.321.0 to 1.322.0 in the minor-updates group by @dependabot[bot] in #326
  • chore(deps): Bump dtolnay/rust-toolchain from 6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 to 02cb101ec7c40f2c49e1d9714d64511d8e1b74de by @dependabot[bot] in #327
  • chore(deps): Bump ruby/setup-ruby from 1.322.0 to 1.325.0 in the minor-updates group by @dependabot[bot] in #334
  • chore(deps): Bump ruby/setup-ruby from 1.325.0 to 1.327.0 in the minor-updates group by @dependabot[bot] in #339
  • chore(deps): Bump dtolnay/rust-toolchain from 02cb101ec7c40f2c49e1d9714d64511d8e1b74de to 7e38f4b43b4db5c8dd498af069a4f6196df1d067 by @dependabot[bot] in #340
  • chore(deps): Bump dtolnay/rust-toolchain from 7e38f4b43b4db5c8dd498af069a4f6196df1d067 to e2a55d2ffb04f378e9626c28d38b36d230d1e12f by @dependabot[bot] in #351
  • chore(deps): Bump valkey-io/valkey-glide/.github/workflows/semgrep.yml from f5f4474257c25c1f98983cd0946ca050f723ef08 to 0a3bd5429dec9ce4263c48b35f9c5e1755d9b420 by @dependabot[bot] in #352
  • chore(deps): Bump valkey-io/valkey-glide/.github/workflows/git-secrets-scan.yml from f5f4474257c25c1f98983cd0946ca050f723ef08 to 0a3bd5429dec9ce4263c48b35f9c5e1755d9b420 by @dependabot[bot] in #353
  • chore(deps): Bump the patch-updates group across 1 directory with 2 updates by @dependabot[bot] in #360
  • chore(deps): Bump valkey-io/valkey-glide/.github/workflows/git-secrets-scan.yml from 0a3bd5429dec9ce4263c48b35f9c5e1755d9b420 to 7593203c17fe324421f5f9163eb11341632f9601 by @dependabot[bot] in #361
  • chore(deps): Bump valkey-io/valkey-glide/.github/workflows/semgrep.yml from 0a3bd5429dec9ce4263c48b35f9c5e1755d9b420 to 7593203c17fe324421f5f9163eb11341632f9601 by @dependabot[bot] in #362
  • chore(deps): Bump valkey-glide from 046685f to aa6b693 by @dependabot[bot] in #364
  • chore(deps): Bump valkey-glide from aa6b693 to 0a3bd54 by @dependabot[bot] in #373
  • chore(deps): Bump ruby/setup-ruby from 1.327.0 to 1.329.0 in the minor-updates group by @dependabot[bot] in #374
  • chore(deps): Bump valkey-io/valkey-glide/.github/workflows/git-secrets-scan.yml from 7593203c17fe324421f5f9163eb11341632f9601 to eb954a09b68a3a45634b6c26573e5dca19ea1130 by @dependabot[bot] in #375
  • chore(deps): Bump dtolnay/rust-toolchain from e2a55d2ffb04f378e9626c28d38b36d230d1e12f to 683b588c487a69d01f6c6ddf40f036ff682cc2c8 by @dependabot[bot] in #376
  • chore(deps): Bump valkey-io/valkey-glide/.github/workflows/semgrep.yml from 7593203c17fe324421f5f9163eb11341632f9601 to eb954a09b68a3a45634b6c26573e5dca19ea1130 by @dependabot[bot] in #377
  • chore(deps): Bump ruby/setup-ruby from 1.329.0 to 1.331.0 in the minor-updates group by @dependabot[bot] in #394
  • chore(deps): Bump valkey-io/valkey-glide/.github/workflows/git-secrets-scan.yml from eb954a09b68a3a45634b6c26573e5dca19ea1130 to 4fa2e056a3055500bd6bdb04a9db7a9448bf9243 by @dependabot[bot] in #395
  • chore(deps): Bump valkey-io/valkey-glide/.github/workflows/semgrep.yml from eb954a09b68a3a45634b6c26573e5dca19ea1130 to 70006cc667a527e731aba2971fa57f8308704c1b by @dependabot[bot] in #396
  • chore(deps): Bump valkey-glide from b360e69 to 70006cc by @dependabot[bot] in #400
  • chore(deps): Bump the minor-updates group with 2 updates by @dependabot[bot] in #401
  • chore(deps): Bump valkey-io/valkey-glide/.github/workflows/semgrep.yml from 70006cc667a527e731aba2971fa57f8308704c1b to 3601186645fa1d36f6e049cc2dd6a0e664cee375 by @dependabot[bot] in #402
  • chore(deps): Bump valkey-io/valkey-glide/.github/workflows/git-secrets-scan.yml from 4fa2e056a3055500bd6bdb04a9db7a9448bf9243 to 3601186645fa1d36f6e049cc2dd6a0e664cee375 by @dependabot[bot] in #403

New Contributors

Full Changelog: v1.0.0...v1.1.0