Tags give the ability to mark specific points in history as being important
  • 1.0.0-beta.1 protected
    8fb1aed7 · Update contributors ·
    Release 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 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
  • 1.0.0-alpha.10 protected
    8b75ef7f · Update contributors ·
    Release 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 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 86d54665
    • 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 b3bc95f1
    • CI now runs against new CentOS 8, Ubuntu 20.04, and Amazon Linux 2 snapshots c699aca1
    • URLs in the project should now correctly link without redirects !117
  • 1.0.0-alpha.9 protected
    Release 1.0.0-alpha.9

    API Docs are always available at docs.redistack.info

    Major

    • The isConnected property is no longer a requirement for the RedisClient protocol #73
    • 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
  • 1.0.0-alpha.8 protected
    Release 1.0.0-alpha.8

    API Docs are always available at docs.redistack.info

    Major

    • All commands that require a String key is now a type-safe representation called RedisKey !93
      • It conforms to: Hashable, RESPValueConvertible, Codable, Comparable, Equatable, ExpressibleByStringLiteral and RawRepresentable
      • RESPValue now has an init overload for RedisKey
    • The RedisClient protocol now has an isConnected: Bool readonly property requirement !95
    • All timeout related command parameters now use the NIO.TimeAmount type, rather than Int !96
    • The zadd command API has been reworked to be more expressive and type-safe !97
      • RedisSortedSetAddOption is now RedisZaddInsertBehavior
      • RedisZaddReturnBehavior has been added, instead of a Boolean parameter
        let client = ...
        client.zadd(
          (element, 3),
          to: "my_sorted_set",
          inserting: .onlyNewElements,
          returning: .insertedElementsCount
        )
    • The range command APIs for SortedSet and List types in Redis have been reworked to be more expressive with the Swift range syntax !98
      • The range based APIs also have been changed to be type-safe instead of the old String based API with the RedisZLexBound and RedisZScoreBound enums
        let client = ...
        client.lrange(from: "my_list", indices: 3...5)
    • EventLoopFuture.convertFromRESPValue has been renamed to be an overload of map !104

    Minor

    • Added the authorize command method to RedisClient !94
    • Collection of RESPValue now have several map overloads to convert the RESPValue to other types that are RESPValueConvertible !103

    Patch

    • Updated SwiftMetrics version to be 1.0.0 ..< 3.0.0 (973a9162)
  • 1.0.0-alpha.7.2 protected
    Release 1.0.0-alpha.7.2

    API Docs are always available at docs.redistack.info

    Patch

  • 1.0.0-alpha.7.1 protected
    Release 1.0.0-alpha.7.1

    API Docs are always available at docs.redistack.info

    Patch

  • 1.0.0-alpha.7 protected
    Release 1.0.0-alpha.7

    API Docs are always available at docs.redistack.info

    All changes made in this tag were from Merge Request https://gitlab.com/Mordil/swift-redi-stack/merge_requests/92.

    Logging is now more dynamic - as RedisClient loggers can be changed, rather than being static at initialization.

    This is particularly useful for attaching metadata from a logger you already have, so you can correlate the logs generated by RediStack.

    For example:

    let connection = RedisConnection.connect(...)
    let response = connection
        .logging(to: myRequestLogger) // this logger has a `requestID` metadata element
        .ping() // logs from RedisConnection while fulfilling this command will also include the `requestID` metadata
        .wait()

    Major

    • RedisClient has 2 new requirements:
      • logger: Logging.Logger readonly property
      • setLogging(to: Logging.Logger) method
    • RedisCommandHandler no longer supports logging
      • The init method has been changed to no longer accept a Logger
    • RedisMessageEncoder no longer supports logging
      • The init method has been changed to just an empty init
    • The exact timing of when certain logs and metrics has been tweaked slightly in the RedisConnection.init method

    Minor

    • RedisClient has a default extension method logging(to:) that is chainable and calls setLogging(to:)
    • RedisConnection now has a public id: UUID property
    • RedisConnection has more trace logs
    • Some RedisConnection debug logs re-adjusted to trace
    • Some RedisConnection logs had their level increased to account for being the sole source of logs now

    Patch

    • The RedisConnection metadata id value is now correctly stable.
    • Corrected some code documentation, specifically around logging.
  • 1.0.0-alpha.6.1 protected
    Release 1.0.0-alpha.6.1

    API Docs are always available at docs.redistack.info

    Minor

    • Several methods now have variadic overloads !87
    • get now has a generic overload for any RESPValueConvertible type !86
      • The String specialized implementation is still available

    Patch

    • Unnecessary assertions in RedisCommandHandler have been removed !85
  • 1.0.0-alpha.6 protected
    Release 1.0.0-alpha.6

    API Docs are always available at docs.redistack.info

    Major

    • RedisIntegrationTestCase now has properties that can be overridden in subclasses for specializing how to connect to Redis !74
    • RESPTranslator.ParsingError has two new cases: invalidBulkStringSize and bulkStringSizeMismatch !82
    • RedisMetrics.activeConnectionCount is no longer an Int and instead is a new specialized wrapper class called ActiveConnectionGauge !84
      • This is to address the data race found by the thread sanitizer that now runs on test passes
      • It maintains an internal Atomic<Int> count that can be modified with the public increment(by:)/decrement(by:) methods

    Minor

    • RESPValue now conforms to Equatable !76
    • RedisError now conforms to Equatable !77
    • RESPValue.init(bulk:) now accepts a wider range of values !81
      • The String overload is now String?
      • The Int overload is now generic with a constraint of FixedWidthInteger

    Patch

  • 1.0.0-alpha.5.0.2 protected

    API Docs are always available at docs.redistack.info

    Patch

    • RedisConnection.sendCommandsImmediately is now correctly public (fae8eada)
  • 1.0.0-alpha.5.0.1 protected
    aeae1f6c · Properly export module ·

    API Docs are always available at docs.redistack.info

    Patch

    • RediStackTestUtils is now correctly an importable module (aeae1f6c)
  • 1.0.0-alpha.5 protected
    Release 1.0.0-alpha.5

    API Docs are always available at docs.redistack.info

    Major

    • The library module was renamed from RedisNIO to RediStack !73
    • RedisNIOError was renamed to RedisClientError !72
      • .responseConversion(to:) was renamed to .failedRESPConversion(to:)
      • .unsupportedOperation(method:message:) was removed
    • RedisCommandHandler is no longer open (now public final) !55
    • RedisCommandContext was renamed to RedisCommand !66
    • RedisCommand.command was renamed to message and the initializer signature updated to match its properties (26057638)
    • RedisCommandHandler.init(logger:) is now .init(initialQueueCapacity:logger:) !66
    • The names for the ChannelPipeline handlers are now explicitly named !66
      • RediStack.OutgoingHandler
      • RediStack.IncomingHandler
      • RediStack.CommandHandler
    • The Redis namespace enum was removed !71
      • The makeConnection factory method was moved to RedisConnection.connect
        • This method now requires a NIO.EventLoop instance, no longer creating a MultiThreadedEventLoopGroup for you
        • This method also now supports overriding the default NIO.ClientBootstrap and is the preferred way of building your own pipelines
    • RedisConnection.init is now internal, all connections are made with RedisConnection.connect !71
    • A few different logs have had their severity adjusted
      • Sending a command while the connection is closed is now a warning !71
    • Sorted Set methods zadd, zunionstore, and zinterstore, have stronger type safety with options defined as enums !70 and (0ecb3c1e)
    • RESPValueConvertible is no longer used as an existential !69
      • This also changes RedisConnection.send(command:with:) to require the RESPValue arguments up front, rather than doing the conversion for you
    • RESPValue and RESPValueConvertible had many internal implementations changed !67
      • RESPValue.array no longer uses ContiguousArray
      • ContiguousArray is no longer RESPValueConvertible
      • several of the computed properties on RESPValue will no longer behave exactly the same, or have moved to the new RediStackTestUtils module
    • Redis.makeDefaultClientBootstrap(using:) was renamed and moved to ClientBootstrap.makeRedisTCPClient(group:) !64
      • The implementation for adding the "default" RESP handlers is now publicly available with Channel.addBaseRedisHandlers()
    • RESPTranslator saw a major refactor !63
      • It is now a struct instead of an enum
      • ByteBuffer.writeRESPValue(_:) is a new method carrying most of the implementation for writing out RESPValue
      • RESPTranslator.ParsingResult was removed
      • RESPTranslator now updates the passed in ByteBuffer.readerIndex on successful parses
      • RESPTranslator.parseBytes(from:) uses the passed in ByteBuffer entirely for position and recursion
    • RESPValueConvertible.init(_:) was renamed to .init(fromRESP:) !56

    Minor

    • A new module RediStackTestUtils is available for some helpers with writing tests for RediStack !67

    Patch

    • The observable behavior of closing a channel should be more straight forward and dependable !71
  • 1.0.0-alpha.3 protected
    Release 1.0.0-alpha.3

    Major

    • NIO is no longer exported, you will need to explicitly import NIO !57
    • errorCaught in RedisCommandHandler now fails all pending responses, and does not increment RedisMetrics.commandFailureCount !59
    • EventLoopFuture.mapFromRESP has been renamed to `EventLoopFuture.convertFromRESPValue !60

    Minor

    • The APPEND command is now available with the append(_:to:) method !61
  • 1.0.0-alpha.2.1 protected
    Release 1.0.0-alpha.2.1

    Minor

    • Added new RedisConnection.defaultPort static property set to 6379 for users to reference !51
  • 1.0.0-alpha.2 protected
    Release 1.0.0-alpha.2

    Major

    • Added explicit conformance to RESPValueConvertible for Foundation.Data to resolve a bug where it received conformance from Collection (!50)
  • 1.0.0-alpha.1.1.1 protected

    Patch

    • Fix warning from default in switch (788f69de)
  • 1.0.0-alpha.1.1 protected
    Release 1.0.0-alpha.1.1

    Minor

    • Improve debugging of RESPValue (d4584924)
  • 1.0.0-alpha.1 protected
    23a8d445 · Update README ·
    Release 1.0.0-alpha.1
  • 0.10.0 protected
    Release 0.10.0

    This release introduces a "minor" breaking change that is large enough that it warrants releasing it as a major revision.

    SE-0226 Package Manager Target Dependency Resolution introduces a change to expected form of packages and their naming.

    To be compliant with future changes to SPM - it was decided to rename the package from redis-nio (matching the module name) to swift-redis-nio-client to match the repo instead.

    Major

    • Renamed package from redis-nio to swift-redis-nio-client !47
  • 0.9.0 protected
    Release 0.9.0

    This release brings a major breaking change. GitHub will forward most requests from the previous repository URL to the new one - but in code it has more specific ramifications.

    This is necessary to align with the goals of the SSWG and to solve problems that will exist in the future before it causes real issues.

    For further context into the discussion, see the following threads on the Swift Forums:

    All changes were made in the MR !45

    Major

    • Renamed the repo in GitHub from nio-redis to swift-redis-nio-client
    • Renamed the package from nio-redis to redis-nio
    • Renamed the NIORedis module to RedisNIO
    • Renamed NIORedisError to RedisNIOError
    • Changed references to NIORedis to RedisNIO in object labels such as NIO Channel Handlers & Loggers

    Minor

    • Changed all references in copyright blocks, project files (README, LICENSE, etc.) to refer to the project as RedisNIO