Releases: swift-server/RediStack
RediStack 1.1.1
⚠️ This was an accidental tag off ofmaster
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
andRedisKeyLifetime.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
API Docs are always available at docs.redistack.info
Major
- ServiceDiscovery
1.x
is now a package dependency !145 - Deprecated 1.x APIs have been removed (5b05e263)
Minor
RedisConnectionPool
will now buffer requests if no connection addresses have been defined !147
RediStack 2.0.0 Alpha 1
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 singleRedisCommand
instance, but otherwise behaves as before: it will deserialize the response to theRedisCommand.ResultType
for youRedisCommandHandler.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 onRedisCommand
- 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 appropriateRedisCommand
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, becauseRedisClient.publish(message, to: channel)
reads a little better thanRedisClient.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 asRedisClient.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 onRedisClient
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>)
- As a consequence of the changes,
Minor
Several pieces of API have been deprecated. They will be removed in the next major version.
RedisLifetimeKey
has been moved and renamed toRedisKey.Lifetime
!143RedisLifetimeKey.Lifetime
has been renamed toRedisKey.Lifetime.Duration
!143RedisCommand.flushall
extension has been added !144
Misc
RediStack 1.1.0
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. !142RedisConnection.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 onRedisConnection.Configuration
. !142
Misc
RediStack 1.0.0
API Docs are always available at docs.redistack.info
Minor
RedisConnectionPoolIntegrationTestCase.makeNewPool
now accepts aconnectionRetryTimeout: NIO.TimeAmount
56f0ab0b- Add
leaseConnection
method toRedisConnectionPool
which allows temporary exclusive access to a connection for chained use !139 - Add
allowSubscriptions
property toRedisConnection
to control whether the connection can be used for PubSub !139- When this property is set to
false
any currently active subscriptions will end
- When this property is set to
Patch
- Fix
punsubscribe
andunsubscribe
when called with empty arrays !140
RediStack 1.0.0 Release Candidate 2
API Docs are always available at docs.redistack.info
Patch
- Fixed
RedisConnectionPool
always timing out commands whenconnectionRetryTimeout: nil
was passed in the initializer c8cb256b
RediStack 1.0.0 Release Candidate 1
API Docs are always available at docs.redistack.info
Major
RedisPubSubHandler
now requires aNIO.EventLoop
in its initializer !137
Minor
RedisConnectionPool
now has an initializer configuration option for connection retry timeouts !138- The default is 60 seconds.
Patch
RediStack 1.0.0 Beta 2
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 toRedisMetrics.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 toNIO.Channel
!136 - Added the
publish
andpubsub
command methods !136 - Added
isSubscribed
property toRedisConnection
!136 - Added
availableConnectionCount
andleasedConnectionCount
toRedisConnectionPool
!136 - Added
makeNewPool
factory method toRedisConnectionPoolIntegrationTestCase
!136
Patch
- Fixed
RedisCommandHandler
never entering theerror
state 6fe37cb7
Misc
- CI now runs against the official Swift 5.3 images for all supported platforms 45f665b9
RediStack 1.0.0 Beta 1
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 onEventLoopFuture
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 theRedisClient
protocol !130- Consequently, it is no longer publicly accessible on
RedisConnection
- Consequently, it is no longer publicly accessible on
RedisClient.logging(to:)
now returns aRedisClient
existential that provides logging to the provide instance !130- For more information on this, see the Swift forum discussion: https://forums.swift.org/t/the-context-passing-problem/39162
- 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
- in addition, logs are now generated from more locations - particularly
Minor
RedisConnectionPool.close
now optionally accepts anEventLoopPromise
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
, andupdateConnectionAddresses
methods onRedisConnectionPool
now optionally accept aLogger
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
andRedisConnectionPool
are now available as well
- The "prototype" instances of Logger used as defaults by
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
RediStack 1.0.0 Alpha 10
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 genericinit(from:)
form !108 RedisClientError
is now an enum-like-struct to allow for library evolution !118RESPTranslator.ParsingError
is now an enum-like-struct to allow for library evolution !123- The
isConnected
property is no longer a requirement for theRedisClient
protocol #73
Minor
- Add
EXISTS
command method !110 - Add
TTL
andPTTL
command methods !114 - Add
SETNX
command method !115 RedisConnectionPool
is a new connection type for pooledRedisConnections
that conforms toRedisClient
!116RedisKey
is nowExpressibleByStringInterpolation
!119- Add
PSETEX
andSETEX
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 #67PSETEX
,SETEX
, etc. may become deprecated should Redis choose to deprecate them in favor ofSET
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