Releases: swift-server/RediStack
RediStack 1.1.1
⚠️ This was an accidental tag off ofmasterUpdate 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
RedisKeyLifetimeandRedisKeyLifetime.Lifetimefor their renaming !143- These typealiases will be removed in the next major version
- Backport unit test for
PUBSUB CHANNELSfrom !152 - Backport fix and unit test for
PUBSUB NUMSUBfrom !153 - Backport unit test for
PUBSUB NUMPATfrom !154
RediStack 2.0.0 Alpha 2
API Docs are always available at docs.redistack.info
Major
- ServiceDiscovery
1.xis now a package dependency !145 - Deprecated 1.x APIs have been removed (5b05e263)
Minor
RedisConnectionPoolwill 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.sendnow accepts just a singleRedisCommandinstance, but otherwise behaves as before: it will deserialize the response to theRedisCommand.ResultTypefor youRedisCommandHandler.OutboundInis now a tuple of(RESPValue, EventLoopPromise<RESPValue>)with the first element being the fully serialized command to be sent.- All command extension methods on
RedisClientare 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
RedisClientstill exist, but are just convenience methods for calling the appropriateRedisCommandfactory 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)
RedisCommandand the extension methods onRedisClienthave seen a significant refactor with no deprecation support to be provided !144- As a consequence of the changes,
RedisComandHandler.OutboundInis 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.
RedisLifetimeKeyhas been moved and renamed toRedisKey.Lifetime!143RedisLifetimeKey.Lifetimehas been renamed toRedisKey.Lifetime.Duration!143RedisCommand.flushallextension 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
SELECTcommands when being created as both standalone connections and as part of a connection pool !142 - Added
RedisConnection.makestatic method that accepts a configuration object for initialization rather than the handful of parameters. !142RedisConnection.connecthas been deprecated.
- Added
RedisConnectionPoolinitializer that accepts a configuration object rather than the large handful of parameters. !142- The previous initializer has been deprecated.
RedisConnection.defaultPorthas been deprecated. It is available onRedisConnection.Configuration. !142
Misc
RediStack 1.0.0
API Docs are always available at docs.redistack.info
Minor
RedisConnectionPoolIntegrationTestCase.makeNewPoolnow accepts aconnectionRetryTimeout: NIO.TimeAmount56f0ab0b- Add
leaseConnectionmethod toRedisConnectionPoolwhich allows temporary exclusive access to a connection for chained use !139 - Add
allowSubscriptionsproperty toRedisConnectionto control whether the connection can be used for PubSub !139- When this property is set to
falseany currently active subscriptions will end
- When this property is set to
Patch
- Fix
punsubscribeandunsubscribewhen called with empty arrays !140
RediStack 1.0.0 Release Candidate 2
API Docs are always available at docs.redistack.info
Patch
- Fixed
RedisConnectionPoolalways timing out commands whenconnectionRetryTimeout: nilwas passed in the initializer c8cb256b
RediStack 1.0.0 Release Candidate 1
API Docs are always available at docs.redistack.info
Major
RedisPubSubHandlernow requires aNIO.EventLoopin its initializer !137
Minor
RedisConnectionPoolnow 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
ActiveConnectionGaugehas been renamed toRedisMetrics.IncrementalGauge!136- New cases have been added to
RedisMetrics.Labels!136 RedisClienthas new method requirements for supporting PubSub !136
Minor
- Added
RedisPubSubHandlerfor managing PubSub mode !136 - Added
RedisChannelNamefor type-safe interaction with PubSub methods !136 - Added
addPubSubHandlerextension method toNIO.Channel!136 - Added the
publishandpubsubcommand methods !136 - Added
isSubscribedproperty toRedisConnection!136 - Added
availableConnectionCountandleasedConnectionCounttoRedisConnectionPool!136 - Added
makeNewPoolfactory method toRedisConnectionPoolIntegrationTestCase!136
Patch
- Fixed
RedisCommandHandlernever entering theerrorstate 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
mapextension onEventLoopFutureis 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
loggeris no longer a requirement for theRedisClientprotocol !130- Consequently, it is no longer publicly accessible on
RedisConnection
- Consequently, it is no longer publicly accessible on
RedisClient.logging(to:)now returns aRedisClientexistential 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.closenow optionally accepts anEventLoopPromiseto 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.idis now public !130- The
activate,close, andupdateConnectionAddressesmethods onRedisConnectionPoolnow optionally accept aLoggerinstance to log with !130 RedisLoggingis 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
RedisConnectionandRedisConnectionPoolare 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
RESPValuetypes 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 RedisClientErroris now an enum-like-struct to allow for library evolution !118RESPTranslator.ParsingErroris now an enum-like-struct to allow for library evolution !123- The
isConnectedproperty is no longer a requirement for theRedisClientprotocol #73
Minor
- Add
EXISTScommand method !110 - Add
TTLandPTTLcommand methods !114 - Add
SETNXcommand method !115 RedisConnectionPoolis a new connection type for pooledRedisConnectionsthat conforms toRedisClient!116RedisKeyis nowExpressibleByStringInterpolation!119- Add
PSETEXandSETEXcommand methods !121 ActiveConnectionGauge.currentCountis now public 86d5466- Add new
SEToverload 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 ofSETwith 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.initis now@inlinable!122