1. 07 Oct, 2019 2 commits
    • Nathan Harris's avatar
      Merge branch 'remove-assertions' into 'master' · a3f6d3b8
      Nathan Harris authored
      Remove unnecessary assertions in `RedisCommandHandler`
      
      See merge request !85
      a3f6d3b8
    • Nathan Harris's avatar
      Remove unnecessary assertions in `RedisCommandHandler` · ba66ebf8
      Nathan Harris authored
      Motivation:
      
      The assertions in `errorCaught(context:error:)` and `channelRead(context:data:)` are holdovers from when SwiftLog was not integrated into the package. The conditions where they were triggered are safely handled in other ways, so the asserts are not guarding against undefined behavior or bad app state.
      
      Modifications:
      
      Remove the two asserts regarding the `RedisCommandHandler.commandResponseQueue` to rely on Logging to bubble up errors to the user.
      
      Result:
      
      Debug builds using RediStack should not encounter unexpected assertions and should rely on other, better, error handling.
      
      This contributes to issue #65
      ba66ebf8
  2. 24 Sep, 2019 5 commits
    • Nathan Harris's avatar
      Merge branch 'thread-sanitizer' into 'master' · 237f049c
      Nathan Harris authored
      Run thread sanitizer on 5.1 test CI jobs
      
      See merge request !84
      237f049c
    • Nathan Harris's avatar
      Fix data race with `RedisMetrics.activeConnectionCount` · 939e41b8
      Nathan Harris authored
      Motivation:
      
      After enabling the thread sanitizer during testing, a data race with the `activeConnectionCount` in `RedisMetrics` was caught due to changing a primitive `Int` across threads.
      
      Modifications:
      
      Add a specialized class `ActiveConnectionGauge` to wrap the semantics of the `activeConnectionCount` with an `Atomic<Int>` property.
      
      Result:
      
      No data races should occur with the `RedisMetrics` subsystem.
      939e41b8
    • Nathan Harris's avatar
      Run thread sanitizer on 5.1 test CI jobs · dfca5704
      Nathan Harris authored
      Motivation:
      
      Now that SwiftPM with 5.1 supports Linux thread sanitizers, we should run this as part of the normal test pass to catch threading issues.
      
      Modifications:
      
      Add `--sanitize=thread` argument to `swift test` commands for any job that runs Swift >=5.1.
      
      Result:
      
      More bugs should be caught as soon as possible now that thread races are being monitored.
      dfca5704
    • Nathan Harris's avatar
      Merge branch 'update-test-matrix' into 'master' · 2a27a598
      Nathan Harris authored
      Update Test Matrix to include Swift 5.1 Official Release
      
      See merge request !83
      2a27a598
    • Nathan Harris's avatar
      Update Test Matrix to include Swift 5.1 Official Release · 3c4b5c40
      Nathan Harris authored
      Motivation:
      
      With the release of Swift 5.1, the official docker containers are available for both 16.04 and 18.04 of Linux - so the test matrix should include them.
      
      Modifications:
      
      - Add new 5.1 jobs for 18.04 linux and change 16.04 5.1 jobs to use the official docker images.
      - Update the README to capture the changes
      
      Result:
      
      The number of configurations the library is tested against should be as wide as possible for regular interval testing passes.
      3c4b5c40
  3. 29 Jul, 2019 10 commits
    • Nathan Harris's avatar
      Merge branch 'respvalue-nil-init' into 'master' · 9741a2ef
      Nathan Harris authored
      Change `RESPValue.init(bulk:)` initializers to accept a wider range of values
      
      See merge request !81
      9741a2ef
    • Nathan Harris's avatar
      Change `RESPValue.init(bulk:)` initializers to accept a wider range of values · 479c024d
      Nathan Harris authored
      Motivation:
      
      While working to add more test coverage with `RESPTranslator`, it was made apparent that a `.bulkString(.none)` is impossible to create directly with the `RESPValue` initializers, even though it is a reasonable possibility.
      
      Additionally, forcing all integer types to have to be stored in an `Int` is unnecessarily restrictive.
      
      Modifications:
      
      - Change `RESPValue.init(bulk:)` initializers to accept `Optional` instances
      - Change `RESPValue.init(bulk:)` for `Int` initializer to be generic on `FixedWidthInteger`
      
      Result:
      
      Converting types to and from `RESPValue` should be more bi-directional and seamless.
      479c024d
    • Nathan Harris's avatar
      Merge branch 'more-resptranslator-tests' into 'master' · b7092362
      Nathan Harris authored
      Add more test coverage of `RESPTranslator`
      
      See merge request !82
      b7092362
    • Nathan Harris's avatar
      Add more test coverage of `RESPTranslator` · b9b70307
      Nathan Harris authored
      Motivation:
      
      Diagnostics for why `.bulkString` parses might fail were weak, and edge cases fell through gaps in coverage were found.
      
      Modifications:
      
      Added new cases to `RESPTranslator.ParsingError` for `.bulkString` parsing with additional test coverage.
      
      Result:
      
      Users should have better diagnostics for bogus data or failed parsing state.
      b9b70307
    • Nathan Harris's avatar
      Merge branch 'update-linuxmain' into 'master' · 8c3bdbac
      Nathan Harris authored
      Add missing `ByteToMessageDecoderVerifier` tests to Linux Main
      
      See merge request !80
      8c3bdbac
    • Nathan Harris's avatar
      Add missing `ByteToMessageDecoderVerifier` tests to Linux Main · 0d4b520b
      Nathan Harris authored
      Motivation:
      
      While working on issue #56, it was forgotten to add the new test cases to the linux manifest file.
      
      Modifications:
      
      Update the linux manifests to include all current unit tests
      
      Result:
      
      All written unit tests should be ran on Linux
      0d4b520b
    • Nathan Harris's avatar
      Merge branch 'faster-mr-ci' into 'master' · 879afb4c
      Nathan Harris authored
      Speed up CI pipelines for Merge Requests
      
      See merge request !79
      879afb4c
    • Nathan Harris's avatar
      Speed up CI pipelines for Merge Requests · 02d8d021
      Nathan Harris authored
      Motivation:
      
      MRs take unnecessarily too long to have completed pipelines with "redundant" builds happening in sequence.
      
      The entire stage of building in release is an additional QA layer that can happen on merges into master, but for MRs are just added CPU cycles.
      
      While it's useful to ensure that building in release is possible, we will get almost all build failures from the test stage, and the most important checks are the unit and integration tests.
      
      Modifications:
      
      Change the ordering of build vs. test, as well as only running "build in release" jobs on the master branch.
      
      Result:
      
      MRs should be able to be merged sooner as CI pipelines take less time to run.
      02d8d021
    • Nathan Harris's avatar
      Merge branch '56-b2m-verifier-tests' into 'master' · 50dba5c9
      Nathan Harris authored
      56 -- Add `ByteToMessageDecoderVerifier` unit tests
      
      Closes #56
      
      See merge request !78
      50dba5c9
    • Nathan Harris's avatar
      556da647
  4. 28 Jul, 2019 8 commits
    • Nathan Harris's avatar
      Merge branch 'test-util-connections' into 'master' · cd403208
      Nathan Harris authored
      Change test utils RedisConnection process to be less opinionated.
      
      See merge request !74
      cd403208
    • Nathan Harris's avatar
      Change test utils RedisConnection process to be less opinionated. · a09c4346
      Nathan Harris authored
      Motivation:
      
      After working with RedisKit with RediStackTestUtils as a dependency, it was realized how opinionated the module is in how RedisConnections can be created in test environments.
      
      Modifications:
      
      Require more information, with reasonable defaults for `RedisConnection.init()`. Provide subclass hooks for `RedisIntegrationTestCase` for implementors to make decisions for themselves at how to connect to Redis.
      
      Result:
      
      Users should have more freedom in how they connect to Redis in their units tests.
      a09c4346
    • Nathan Harris's avatar
      Merge branch 'split-tests' into 'master' · 30a0774a
      Nathan Harris authored
      Split tests into two targets: Unit tests and Integration tests
      
      See merge request !75
      30a0774a
    • Nathan Harris's avatar
      Split tests into two targets: Unit tests and Integration tests · ce43dad7
      Nathan Harris authored
      Motivation:
      
      For users looking to contribute, and for those looking to validate the library, it was unclear what tests require an actual connection to a Redis instance in order to run.
      
      Modifications:
      
      Add a `RediStackIntegrationTests` that takes all tests that require a Redis instance in order to run.
      
      Result:
      
      Those looking to run just unit tests, or contribute new tests, can now directly point to a specific testTarget as defined in the Package manifest.
      ce43dad7
    • Nathan Harris's avatar
      Merge branch 'rediserror-equatable' into 'master' · 1b4b5fa6
      Nathan Harris authored
      Add `Equatable` conformance for `RedisError`
      
      See merge request !77
      1b4b5fa6
    • Nathan Harris's avatar
      Add `Equatable` conformance for `RedisError` · d702121f
      Nathan Harris authored
      Motivation:
      
      There is a reasonable way to compare if two `RedisErrors` are equal, which was seen as needed in the `Equatable` conformance for `RESPValue`.
      
      Modifications:
      
      Added `Equatable` conformance for `RedisError` by comparing the messages.
      
      Result:
      
      Two `RedisError` instances are now equatable.
      d702121f
    • Nathan Harris's avatar
      Merge branch 'respvalue-equatable' into 'master' · 1d21f663
      Nathan Harris authored
      Add `Equatable` conformance to `RESPValue`
      
      See merge request !76
      1d21f663
    • Nathan Harris's avatar
      Add `Equatable` conformance to `RESPValue` · 081c7ca8
      Nathan Harris authored
      Motivation:
      
      While working on unit tests the need for conformance to `Equatable` for `RESPValue` has been needed a few times and it was decided to make it public.
      
      Modifications:
      
      Added conformance to `Equatable` for `RESPValue` with unit test.
      
      Result:
      
      Users should now be able to compare two `RESPValue` instances for equality.
      081c7ca8
  5. 13 Jul, 2019 3 commits
  6. 11 Jul, 2019 2 commits
  7. 09 Jul, 2019 10 commits
    • Nathan Harris's avatar
      f788056e
    • Nathan Harris's avatar
      Add links to new support email. · 0fbc2eb3
      Nathan Harris authored
      Motivation:
      
      As this project might take off and support be needed, users will want a direct line of communication to file support tickets.
      
      Modifications:
      
      Update docs to include references and links for contacting the RediStack maintainers for assistance.
      
      Result:
      
      Users should have more information on how to contact project maintainers.
      0fbc2eb3
    • Nathan Harris's avatar
      Iterate on type safety for `zadd` · 0ecb3c1e
      Nathan Harris authored
      Motivation:
      
      Issue #60 called for improving the type safety of the options available for the `zadd` command, and MR !70 made some great headway, but attempted to cram too much into a single enum.
      
      Modifications:
      
      - Break the `RedisSortedSetAddOption.returnChangedCount` value into an additional boolean param
      
      Result:
      
      Using `zadd` should now be more straight forward, while being type safe.
      0ecb3c1e
    • Nathan Harris's avatar
      Rename `RedisCommand` properties to avoid overloading terms and being more specific. · 26057638
      Nathan Harris authored
      Motivation:
      
      There are several cases where "command" could refer to a command keyword, or an entire message (keyword + args). This made working with `RedisCommand` and it's documentation ambiguous.
      
      Modifications:
      
      - Rename `RedisCommand.command` to `message`
      - Rename initializer labels to `message` and `responsePromise`
      
      Result:
      
      When encountering a `RedisCommand` everyone should know that they are dealing with a message that should be sent to Redis as soon as possible.
      26057638
    • Nathan Harris's avatar
      Polish project documents · 04aa1f93
      Nathan Harris authored
      Motivation:
      
      To give a better first impression, and providing more comprehensive information for first time viewers, the README file needed reworking.
      
      Modifications:
      
      - Add a CHANGELOG file that at least redirects readers to the releases page of GitLab
      - Update the CONTRIBUTORS list
      - Change project README to have more information, flow better, and to have a better "first impression"
      
      Result:
      
      The README should give a stronger indication into the project's health.
      04aa1f93
    • Nathan Harris's avatar
      Update Jazzy Doc Generation Script · f2df3460
      Nathan Harris authored
      Motivation:
      
      Up until now, Jazzy docs were generated on a private CI runner hosting macOS - which doesn't make CI portable as it requires that runner to always be available.
      
      Modifications:
      
      - Change: CI config to use a Linux Jazzy Docker image for portability
      - Change: Doc theme templates to not reference GitHub
      
      Result:
      
      Jazzy docs should be able to be generated at any time, as the CI infrastructure is using GitLab's cloud solution with a Docker image
      f2df3460
    • Nathan Harris's avatar
      Merge branch '61-rebrand' into 'master' · fd73e0ab
      Nathan Harris authored
      61 -- Rebrand from `RedisNIO` to `RediStack`
      
      Closes #61
      
      See merge request Mordil/swift-redis-nio-client!73
      fd73e0ab
    • Nathan Harris's avatar
      7e7e3546
    • Nathan Harris's avatar
      Merge branch 'rename-errors' into 'master' · 57168eda
      Nathan Harris authored
      Rename `RedisNIOError` to `RedisClientError`
      
      See merge request Mordil/swift-redis-nio-client!72
      57168eda
    • Nathan Harris's avatar
      Rename `RedisNIOError` to `RedisClientError` · 13432f0c
      Nathan Harris authored
      Motivation:
      
      To make it a little more generic, and to avoid turnover during renames (such as the planned rebranding in issue #61), `RedisClientError` more accurately reflects the source of the errors, as well as the responsibility of causing the bug.
      
      Modifications:
      
      - Rename `RedisNIOError` to `RedisClientError`
      - Rename `RedisError` file to `RedisErrors`
      - Add documentation of `RedisClientError`
      - Remove no longer used `.unsupportedOperation(method:message:)` value
      - Rename `.responseConversion(to:)` to `.failedRESPConversion(to:)`
      
      Result:
      
      Names of `RedisClientError` should be more descriptive, less prone to turnover, and more documented for users to understand the issues related to these thrown errors.
      13432f0c