* Motivation:
Make use of more common GitHub Actions migration workflows and repository style changes.
Modifications:
* Unit tests workflows run redis in a separate services container to speed up unit tests
* Introduce `main.yml` which runs workflows on each commit to main and periodically to catch any regressions in merges or from upstream.
* Remove the docker files which are no longer used and contained outdated pipelines.
* Add Cxx interoperability checks
Result:
More in common with other GitHub Actions adoptions.
* disable strict concurrency
Currently closing a pool, that has leased connections or currently creates connections fails. Such a close attempt brings the pool in an unrecoverable closing state and may lead to crashes. This patch changes the pool shutdown behavior to allow closing the pool even if the pool is not a predefined state.
`RedisConnection.Configuration.defaultPort` is currently unprotected shared mutable state. To ensure thread safety this patch adds an atomic to back this property. Since setting the `defaultPort` doesn't make much sense for adopters, we deprecate the setter. Lastly we mark `RedisConnection.Configuration` as `Sendable`.
We want to enable TLS Redis Connections out of the box. For this to work we need to link NIOSSL. This patch just adds the dependency. Most of our adopters have NIOSSL very likely in their dependency graph anyway.
Let's move files that are connected to ConnectionPool into the ConnectionPool folder. Also rename `ConnectionPoolErrors.swift` to `RedisConnectionPoolError.swift` to match the type that is defined within.
We want to be able to efficiently encode Redis commands that are sent to a server. This patch adds a new `RedisCommandEncoder` that allows us to efficiently create Redis commands without needing to go through RESP representations, that may require us to create Arrays. Further it introduces a `RESP3BlobStringEncodable` that must be implement to send blob strings using `RedisCommandEncoder`. This patch also adds implementations for `String` and `ByteBuffer` for the new `RESP3BlobStringEncodable` protocol.
In some circumstances users may have connection pools configured without
any SocketAddresses ready to go. This is particularly likely in service
discovery configurations. Right now, the effect of attempting to use
such a pool is two fold. First, we'll emit a bunch of error level logs
telling users we have no addresses. Second, we'll fall into the
exponential backoff phase of connection establishment.
The first property is annoying, but the second one is actively harmful.
If your construction is timed incorrectly, we'll have the awkward
problem of burning a bunch of CPU trying to create connections we know
we cannot, and then a lengthy delay after the addresses are actually
configured before we start trying to use them. That's the worst of all
worlds.
This patch adds logic to detect the attempt to create connections when
we don't have any configured addresses and delays them. This path should
improve performance and ergonomics when in this mode.
Authored-by: Cory Benfield <lukasa@apple.com>
## Motivation
RediStack 1.x is going to be supported at least until 2.x is released, which is a few months away.
Developers who are on later versions of Swift will adopt later versions of NIO and other libraries, and after we merged !183 we required NIO 2.42.x which has a minimum Swift version of 5.5
## Changes
This back ports the CI config from `master` into this branch, with updates to the README to reflect the changes