1
0
mirror of https://github.com/redis/go-redis.git synced 2025-06-14 01:21:30 +03:00
Commit Graph

67 Commits

Author SHA1 Message Date
ebe11d06ca feat: Enable CI for Redis CE 8.0 (#3274)
* chore: extract benchmark tests

* wip

* enable pubsub tests

* enable ring tests

* stop tests with build redis from source

* start all tests

* mix of makefile and action

* add sentinel configs

* fix example test

* stop debug on re

* wip

* enable gears for redis 7.2

* wip

* enable sentinel, they are expected to fail

* fix: linter configuration

* chore: update re versions

* return older redis enterprise version

* add basic codeql

* wip: increase timeout, focus only sentinel tests

* sentinels with docker network host

* enable all tests

* fix flanky test

* enable example tests

* tidy docker compose

* add debug output

* stop shutingdown masters

* don't test sentinel for re

* skip unsuported addscores

* Update README

bump go version in CI

* Update README.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update CONTRIBUTING.md

add information about new test setup

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-02-28 12:49:00 +02:00
a39be37273 feat(tests): validate that ConfigSet and ConfigGet work with Modules (#3258)
* Add tests for unified config in Redis 8

* WIP: fix reading FT.CONFIG with RESP3

* add more tests

* use search-timeout

* move deprecated warnings on the bottom
2025-02-03 19:10:54 +02:00
1139bc3aa9 fix(tests): enable testing with Redis CE 8.0-M4 in CI (#3247)
* introduce github workflow for ci similar to the one in redis-py

use prerelease for 8.0-M4

* Enable osscluster tests in CI

* Add redis major version env

Enable filtering test per redis major version
Fix test for FT.SEARCH WITHSCORE, the default scorer
has changed.

fix Makefile syntax

remove filter from github action

fix makefile

use the container name in Makefile

* remove 1.20 from doctests

* self review, cleanup, add comments

* add comments, reorder prints, add default value for REDIS_MAJOR_VERSION
2025-01-31 16:14:11 +02:00
94b88f5ab2 fix(command): add missing io-thread key in client info (#3244)
* Add 8.0m3 image in docker compose

* Add new key `io-thread` in client info

Redis 8.0 introduces new key `io-thread` in the response
for client info. The key needs to be parsed. If an unknown key
is observed, the client will return an error.

* improve readibility

* Revert "Add 8.0m3 image in docker compose"

This reverts commit 787c41f429.

* add dockers directory to gitignore
2025-01-23 14:47:28 +02:00
91dddc2e11 Test against Redis CE (#3191)
* Create workflow that tests go-redis against docker

* Add docker compose file

* Add docker compose file

* Change command in docker compose

* Load modules locally

* test varios redis versions

* add env var to test-redis-enterprise action

* cleaning code

* cleaning code
2024-12-16 19:04:39 +02:00
b762309243 Add RE tests (#2847)
* Add RE tests

* Enable testing on RE

* change db id to 0 - only when RE cluster is set

* label tests

* adding secrets
2024-01-01 22:19:22 +02:00
277e8b7d9f Support Monitor Command (#2830)
* Add monitor command

* Add monitor commadn and tests

* insure goroutine shutdown

* fix data race

* linting

* change timeout explanation

---------

Co-authored-by: Chayim <chayim@users.noreply.github.com>
2023-12-17 12:35:10 +02:00
e8ad794e96 Format code and fix go vet (#2696)
* run go fix ./...

Signed-off-by: Tiago Peczenyj <tpeczenyj@weborama.com>

* run make fmt

Signed-off-by: Tiago Peczenyj <tpeczenyj@weborama.com>

* fix go vet ./... issues

* Update README.md

Reorder imports with the rules defined in the Makefile 

as if we run `make fmt`

* run gofumpt -w .

* update Makefile to use gofumpt instead gofmt

* increment makefile

* format test

* format tests

Signed-off-by: Tiago Peczenyj <tpeczenyj@weborama.com>

---------

Signed-off-by: Tiago Peczenyj <tpeczenyj@weborama.com>
Co-authored-by: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com>
2023-09-20 14:03:44 +03:00
38ca7c1680 Add support for MODULE LOADEX command (#2490)
* Added support for MODULE LOADEX command

Co-authored-by: Anurag Bandyopadhyay <angbpy@gmail.com>
2023-04-18 21:03:47 +08:00
cbfe6cd076 Allowing for running tests on a port other than the fixed 6380 (#2466)
* Allowing for redis on a specified port

* updating the readme

---------

Co-authored-by: Vladimir Mihailenco <vladimir.webdev@gmail.com>
Co-authored-by: Monkey <golang@88.com>
2023-03-06 21:31:39 +08:00
7fa451c740 chore: fewer test dependencies 2023-01-27 15:01:50 +00:00
97b491aace chore: update import path 2023-01-23 08:48:54 +02:00
0dff3d1461 feat: add OpenTelemetry metrics instrumentation 2022-10-12 11:09:41 +03:00
58f7149e38 feat: add ContextTimeoutEnabled to respect context timeouts and deadlines 2022-10-11 10:22:42 +03:00
b0231c659e chore: always retry write timeouts 2022-10-06 10:06:02 +03:00
f6a8adc50c fix: remove conn reaper from the pool and uptrace option names 2022-07-28 15:17:59 +03:00
a18fad5bd3 chore: v9 2022-06-04 17:42:06 +03:00
d09c27e604 feat: upgrade to Redis 7 2022-06-04 17:25:12 +03:00
a15a89ea58 chore: fix build 2022-06-04 14:52:46 +03:00
9b6ee9c3cc chore: gofmt all code 2021-09-08 16:52:29 +03:00
fd3025bfed Revert "ConnPool check fd for bad conns (#1824)" (#1849)
This reverts commit 346bfafddd.
2021-08-06 17:16:22 +08:00
346bfafddd ConnPool check fd for bad conns (#1824)
* conncheck for badconn (#1821)

* format imports

* fix ut: pool with badconn

* fix unstable ut: should facilitate failover

* Revert "fix unstable ut: should facilitate failover"

This reverts commit c7eeca2a5c.

* fix test error

Signed-off-by: monkey92t <golang@88.com>

Co-authored-by: hidu <duv123+github@gmail.com>
Co-authored-by: monkey92t <golang@88.com>
2021-07-20 17:23:48 +08:00
af3827aeab fix test error
Signed-off-by: monkey <golang@88.com>
2021-03-12 19:06:11 +08:00
02ccf05ed0 Close the conn on context timeout 2020-12-06 11:14:07 +02:00
b657760cca Tweak number of retries 2020-09-11 12:13:27 +03:00
457cdea58f Fix build 2020-09-09 17:40:37 +03:00
7597d0def7 use 3 sentinel instances in unit testing
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
2020-09-03 12:11:56 -07:00
21a1f58caf Retry timeout and retryable error 2020-07-24 15:52:15 +03:00
3dcb844106 Bump major version 2020-05-19 08:52:38 +03:00
f5593121e0 Add ctx as first arg 2020-05-19 08:52:38 +03:00
49a0c8c319 Add test for ring and cluster hooks 2020-02-14 14:30:40 +02:00
c2e92153ba properly point redisServerConf to redis.conf 2019-12-05 14:28:33 -05:00
eaeb8f2a08 internal: return an error on setting deadline 2019-08-16 17:50:57 +03:00
7779accbea Use semantic import versioning 2019-08-08 14:29:44 +03:00
f3ce3362a0 Add golangci-lint 2019-07-25 14:36:50 +03:00
6c72dc807e internal/pool: replace atomic.Value with int64 2019-06-01 11:32:05 +03:00
00de347403 Optimize reading big values 2018-08-16 14:01:03 +03:00
2559f32464 cluster: optimize newClusterState 2018-07-22 14:17:42 +03:00
1f59be5cc0 cluster: add manual setup 2018-06-29 10:46:12 +03:00
11ca0e65c6 Add race test for BLPop 2018-03-08 10:16:53 +02:00
5294b5dae1 Add PoolStats.StaleConns and enable logging by default 2017-09-11 09:10:17 +03:00
dbd2c99ba9 Rework pipeline retrying 2017-09-01 14:56:00 +03:00
0d94a7bc88 Fix race in PubSub 2017-06-29 17:09:52 +03:00
fbc8000fd1 Resent client pool when sentinel switches master 2017-06-29 16:53:49 +03:00
8040d63c4f Remove gopkg.in 2017-02-19 09:49:21 +02:00
b4efc45f1c Set read/write timeouts more consistently. 2016-12-03 17:30:13 +02:00
f5245efa73 Prepare v5 release. 2016-10-09 10:56:53 +00:00
eeba1d7db1 Select random node when there are no keys. 2016-10-09 10:30:45 +00:00
03da66c18a Add new parameter to the RingOptions to override CommandInfo first key
There is problem with `eval` and `evalsha` commands.
`COMMAND INFO eval` returns first key position equals `0`.
After that, redis ring chooses `eval` as a value for sharding.
They, if you try to delete created value, ring may choose another shard
and delete won't work.

Eval command should be parsed, to be sharded properly, according to
redis specs: http://redis.io/commands/command .

I've introduced a new flag in the `RingOptions`, which will enable new
behavior: `EnableKeyLocationParsing`.

If it is enabled, `cmdFirstKey` will try to get key position using
`cmd.getFirstKeyPos()`. This function is defined for `eval` and
`evalsha` commands.
If it has parameters, it will return `3`, otherwise it will return `0`.
2016-10-04 17:09:04 +03:00
7cbee9d337 Enable reaper on ClusterClient and add tests. 2016-10-02 12:44:01 +00:00