Skip to content

Releases: swift-server/RediStack

RediStack 1.1.1

05 May 04:39
Compare
Choose a tag to compare

⚠️ This was an accidental tag off of master

Update to >= 1.1.2. Apologies for the mistake!

API Docs are always available at docs.redistack.info

Patch

Thanks to @PeterAdams-A for this release's PubSub bug fix & unit tests!

  • Added deprecation warnings to RedisKeyLifetime and RedisKeyLifetime.Lifetime for their renaming !143
    • These typealiases will be removed in the next major version
  • Backport unit test for PUBSUB CHANNELS from !152
  • Backport fix and unit test for PUBSUB NUMSUB from !153
  • Backport unit test for PUBSUB NUMPAT from !154

RediStack 2.0.0 Alpha 2

08 Mar 18:56
c8637c1
Compare
Choose a tag to compare
Pre-release

API Docs are always available at docs.redistack.info

Major

Minor

  • RedisConnectionPool will now buffer requests if no connection addresses have been defined !147

RediStack 2.0.0 Alpha 1

22 Feb 18:58
79d0fd8
Compare
Choose a tag to compare
Pre-release

API Docs are always available at docs.redistack.info

RedisCommand has been repurposed from the RedisCommandHandler.OutboundIn type to now a generic general-purpose value representation of a given command keyword, it's argument payload, and its expected deserialized result type.

These changes are primarily driven by the desire to support MULTI commands, as outlined in #88.

In RediStack 1.x, commands were inseparable from the method extension that generated them, and they were all eagerly executed in both sending and receiving.

By turning them into a lightweight value representation, a command can be delayed in being sent or its response in being deserialized.

As such, the following notable changes have happened:

  • RedisClient.send now accepts just a single RedisCommand instance, but otherwise behaves as before: it will deserialize the response to the RedisCommand.ResultType for you
  • RedisCommandHandler.OutboundIn is now a tuple of (RESPValue, EventLoopPromise<RESPValue>) with the first element being the fully serialized command to be sent.
  • All command extension methods on RedisClient are now static factory methods on RedisCommand
    • The name of the static factory extension will match the name as used by Redis itself
    • In some cases, the previous extension methods on RedisClient still exist, but are just convenience methods for calling the appropriate RedisCommand factory method.
      • There is no established rule on when these extensions will be supported. The ones that remain are ones that tend to make sense from an English prose perspective of relationship of the action being invoked and the client

        For example RedisClient.publish(_:to:) still exists, because RedisClient.publish(message, to: channel) reads a little better than RedisClient.send(.publish(message, to: channel)), since the client itself is doing the publishing and there is an implicit relationship between clients and PubSub channels.

        As a counter-example, RedisClient.linsert(_:into:before:) is now only available as RedisClient.send(.linsert(_:into:before:)) because it's a general command with no clear relationship between the command being invoked and the specific client doing the invocation.

Major

  • Swift 5.2 is now the minimum supported Swift version (b148491)
  • RedisCommand and the extension methods on RedisClient have seen a significant refactor with no deprecation support to be provided !144
    • As a consequence of the changes, RedisComandHandler.OutboundIn is now (RESPValue, EventLoopPromise<RESPValue>)

Minor

Several pieces of API have been deprecated. They will be removed in the next major version.

  • RedisLifetimeKey has been moved and renamed to RedisKey.Lifetime !143
  • RedisLifetimeKey.Lifetime has been renamed to RedisKey.Lifetime.Duration !143
  • RedisCommand.flushall extension has been added !144

Misc

  • The README has been updated to indicate the in-development status of 2.0.0 (40d521c)
    • Historical version information, such as CI testing is available as extra details in the README (ba35a1f)
  • Swift 5.4 CI testing has been added (e2e8890)

RediStack 1.1.0

22 Nov 08:50
b2367ac
Compare
Choose a tag to compare

API Docs are always available at docs.redistack.info

Minor

Several pieces of API have been deprecated. They will be removed in the next major version.

  • Added the ability to have connections auto-send SELECT commands when being created as both standalone connections and as part of a connection pool !142
  • Added RedisConnection.make static method that accepts a configuration object for initialization rather than the handful of parameters. !142
    • RedisConnection.connect has been deprecated.
  • Added RedisConnectionPool initializer that accepts a configuration object rather than the large handful of parameters. !142
    • The previous initializer has been deprecated.
  • RedisConnection.defaultPort has been deprecated. It is available on RedisConnection.Configuration. !142

Misc

  • Fixed API documentation typos !142
  • Clarified sections of API documentation to be more precise !142

RediStack 1.0.0

17 Oct 05:37
61cc879
Compare
Choose a tag to compare

API Docs are always available at docs.redistack.info

Minor

  • RedisConnectionPoolIntegrationTestCase.makeNewPool now accepts a connectionRetryTimeout: NIO.TimeAmount 56f0ab0b
  • Add leaseConnection method to RedisConnectionPool which allows temporary exclusive access to a connection for chained use !139
  • Add allowSubscriptions property to RedisConnection to control whether the connection can be used for PubSub !139
    • When this property is set to false any currently active subscriptions will end

Patch

  • Fix punsubscribe and unsubscribe when called with empty arrays !140

RediStack 1.0.0 Release Candidate 2

07 Oct 03:13
c8cb256
Compare
Choose a tag to compare
Pre-release

API Docs are always available at docs.redistack.info

Patch

  • Fixed RedisConnectionPool always timing out commands when connectionRetryTimeout: nil was passed in the initializer c8cb256b

RediStack 1.0.0 Release Candidate 1

07 Oct 02:57
3e28e75
Compare
Choose a tag to compare
Pre-release

API Docs are always available at docs.redistack.info

Major

  • RedisPubSubHandler now requires a NIO.EventLoop in its initializer !137

Minor

  • RedisConnectionPool now has an initializer configuration option for connection retry timeouts !138
    • The default is 60 seconds.

Patch

  • RedisPubSubHandler is now more thread-safe thanks to @glbrntt !137

RediStack 1.0.0 Beta 2

30 Sep 05:50
e7b597f
Compare
Choose a tag to compare
Pre-release

This is likely to be the last beta release for the package. 🎉

A 1 week window for immediate bug and performance fixes for PubSub will be left open before publishing a Release Candidate version.

1 week following the RC release the full GM 1.0.0 release will be made.

The API is now considered stable. No breaking changes will be accepted unless absolutely critical to fixing major bugs.

If you find any bugs, please report them with a GitLab Issue.

API Docs are always available at docs.redistack.info

Major

  • ActiveConnectionGauge has been renamed to RedisMetrics.IncrementalGauge !136
  • New cases have been added to RedisMetrics.Labels !136
  • RedisClient has new method requirements for supporting PubSub !136

Minor

  • Added RedisPubSubHandler for managing PubSub mode !136
  • Added RedisChannelName for type-safe interaction with PubSub methods !136
  • Added addPubSubHandler extension method to NIO.Channel !136
  • Added the publish and pubsub command methods !136
  • Added isSubscribed property to RedisConnection !136
  • Added availableConnectionCount and leasedConnectionCount to RedisConnectionPool !136
  • Added makeNewPool factory method to RedisConnectionPoolIntegrationTestCase !136

Patch

  • Fixed RedisCommandHandler never entering the error state 6fe37cb7

Misc

  • CI now runs against the official Swift 5.3 images for all supported platforms 45f665b9

RediStack 1.0.0 Beta 1

01 Sep 06:00
8fb1aed
Compare
Choose a tag to compare
Pre-release

This is the first release of the package in beta state! 🎉

While it is now in beta, the API is considered stable except for 1 notable exception: RedisCommand.

To support PubSub (the last feature for GM 1.0.0), RedisCommand will need to see some breaking changes. Luckily, if you're not a low-system user (NIO level), then this package can be considered 1.0.0 ready.

If you find any bugs, please report them with a GitLab Issue.

API Docs are always available at docs.redistack.info

Major

  • The map extension on EventLoopFuture is no longer public !125
  • Swift 5.0 is no longer supported - Swift 5.1 is now the minimum version required to use this package !131
    • This isn't officially documented yet, but RediStack will support strive to support the last 3 Swift versions
  • logger is no longer a requirement for the RedisClient protocol !130
    • Consequently, it is no longer publicly accessible on RedisConnection
  • RedisClient.logging(to:) now returns a RedisClient existential that provides logging to the provide instance !130
  • Log statements have seen their messaging, log levels, and metadata keys changed across the package !130
    • in addition, logs are now generated from more locations - particularly RedisConnectionPool

Minor

  • RedisConnectionPool.close now optionally accepts an EventLoopPromise to fail/succeed when closing a pool (thanks @tanner0101) !126
  • RediStack has a new module called RedisTypes, which provide a familiar Swift Standard Library API with types that Redis operates on, starting with RedisSet !133
  • RedisConnectionPool.id is now public !130
  • The activate, close, and updateConnectionAddresses methods on RedisConnectionPool now optionally accept a Logger instance to log with !130
  • RedisLogging is a new namespace that exposes the metadata keys and labels used with logging in RediStack so you can consistently refer to them !130
    • The "prototype" instances of Logger used as defaults by RedisConnection and RedisConnectionPool are now available as well

Patch

  • Fixed #68 where connections were unexpectedly closing but weren't being handled !127
  • Fixed #79 and #74 where user-provided logger context was not thread safe !130

Misc

  • CI now runs against the new CentOS 7, CentOS 8, Ubuntu 20.04, and Amazon Linux 2 snapshots for Swift 5.2, 5.3, and trunk !128, !132, !134

RediStack 1.0.0 Alpha 10

04 Jun 17:28
8b75ef7
Compare
Choose a tag to compare
Pre-release

API Docs are always available at docs.redistack.info

Major

  • Dozens of the convenience command methods that return RESPValue types now have an overload for mapping to a desired end type !106
  • The RESPValue.init(bulk:) initializer has been replaced by a single generic init(from:) form !108
  • RedisClientError is now an enum-like-struct to allow for library evolution !118
  • RESPTranslator.ParsingError is now an enum-like-struct to allow for library evolution !123
  • The isConnected property is no longer a requirement for the RedisClient protocol #73

Minor

  • Add EXISTS command method !110
  • Add TTL and PTTL command methods !114
  • Add SETNX command method !115
  • RedisConnectionPool is a new connection type for pooled RedisConnections that conforms to RedisClient !116
  • RedisKey is now ExpressibleByStringInterpolation !119
  • Add PSETEX and SETEX command methods !121
  • ActiveConnectionGauge.currentCount is now public 86d5466
  • Add new SET overload that allows providing all options as currently outlined by Redis 6.0 #67
    • PSETEX, SETEX, etc. may become deprecated should Redis choose to deprecate them in favor of SET with options

Patch

  • Parsing RESP in general is now more performant !109
  • Parsing RESP BulkStrings are now more performant !111
  • Fix indexing while parsing RESP SimpleString !112
  • Correctly diagnose parsing RESP Integer errors !113
  • Generic RESPValue.init is now @inlinable !122

Misc

  • CI now runs against Swift 5.3 nightly snapshots b3bc95f
  • CI now runs against new CentOS 8, Ubuntu 20.04, and Amazon Linux 2 snapshots c699aca
  • URLs in the project should now correctly link without redirects !117