-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add dynamic_startup_nodes parameter to async RedisCluster #3447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Kakadus
wants to merge
115
commits into
redis:master
from
Kakadus:add-dynamic-startup-nodes-flag-to-async-redis-cluster
Closed
Changes from 2 commits
Commits
Show all changes
115 commits
Select commit
Hold shift + click to select a range
dd2ee3f
Add dynamic_startup_nodes parameter to async RedisCluster
Kakadus c7fa2a9
Merge branch 'master' into add-dynamic-startup-nodes-flag-to-async-re…
Kakadus 32d45c9
Fixed flacky TokenManager test (#3468)
vladvildanov 3f4cde2
Fix incorrect attribute reuse (#3456)
zs-neo cf181be
Expand type for EncodedT (#3472)
hauntsaninja 0898252
Moved self._lock initialisation to Pool constructor (#3473)
vladvildanov 08e9e17
Changed default dialect to 2 (#3467)
vladvildanov 58c1604
Moved ClusterParser exceptions to BaseParser class (#3475)
vladvildanov 570ac92
DOC-4423: add TCEs for various command pages (#3476)
dwdougherty 1c8af3a
DOC-4345 added testable JSON search examples for home page (#3407)
andy-stark-redis 0d79013
Added Redis 8.0 to test matrix (#3469)
vladvildanov c60c41c
Updated test infrastructure with latest versions (#3484)
vladvildanov 10f3a4b
Adding unit text fixes to improve compatibility with MacOS. (#3486)
petyaslavova c98c6eb
fix: update redis university url, the old link doesn't work (#3481)
niklasbec 4a8da2a
Adding tests for modules ACL and modules config changes in 8.0 (#3489)
petyaslavova f463557
Add return type to `close` functions (#3496)
patrick91 2f0fb9a
Update Python imports in doctests (index_definition => indexDefinitio…
dwdougherty 9cadd6d
Add types to ConnectionPool.from_url (#3495)
patrick91 c07b599
Add types to execute method of pipelines (#3494)
patrick91 8091bdb
DOC-4796 fixed capped lists example (#3493)
andy-stark-redis 8604a50
Adding deprecation messages for the exposed in search module commands…
petyaslavova 996c48b
typing for client __init__ (#3357)
Vulwsztyn fd1e205
Since commands info and ft.info do not return redundant information -…
petyaslavova f614abf
test: Updated CredentialProvider test infrastructure (#3502)
vladvildanov c5a42fc
Fixes minor grammar nit in documentation. (#3354)
cavemanpi a8ff646
maintenance: Adding Python 3.13 compatibility (#3510)
vladvildanov 6129912
Fix Incorrect markdown formatting for example in connection_examples.…
paololazzari 2065ea7
Adding unit test for core info command related to modules info (#3507)
petyaslavova 83162c2
Replacing the redis and redis-stack-server images with redis-libs-tes…
petyaslavova 2b3420c
Fix formatting in README.md - 'Note' - bold formatting (#3413)
BaseMax d912801
Adding dev_requirements.txt and pytest.ini resources into sdist. Fix…
petyaslavova 27c83de
Reinitialize the cluster in case of TimeoutError inside a pipeline (#…
mbilski 9ea0e25
Fix inaccurate docstring for unwatch() (#3424)
djroze 9834cfa
Fix invalid return type annotation (#3480)
birthdaysgift e77940f
Deprecating unused arguments in connection pools's get_connection fun…
petyaslavova c788cd4
Type hint Lock.extend's additional_time as a Number (#3522)
Perlence 70142d8
Remove decreasing of created connections count when releasing not own…
petyaslavova 5cbc526
Switch to PEP 517 packaging using hatchling (#2930)
akx 2324ab2
Removing the requirements.txt from docs building dependencies (#3527)
petyaslavova 005367b
Installing redis and its mandatory dependencies when building readthe…
petyaslavova c58b590
Adding vector search tests for types int8/uint8 (#3525)
petyaslavova 126f28a
Fixing wrong type hints (#3526)
petyaslavova c7c896e
Fix readthedocs.yml format for python install configuration (#3529)
petyaslavova dec26ff
Add valid Exception type to Except in ClusterPipeline (#3516)
bssyousefi 8339b16
Make PyJWT an optional dependency (#3518)
akx 797c59f
Add force_master_ip support to async Sentinel client (#3524)
666romeo 77193ce
Fixing typing for FCALL commands to match PEP 484 (#3537)
vladvildanov 6c81598
fix(lock): Fix LockError message when releasing a lock. (#3534)
shenxiangzhuang 04eafb8
Bump rojopolis/spellcheck-github-actions from 0.38.0 to 0.47.0 (#3538)
dependabot[bot] d540d56
Fix client_list with multiple client ids (#3539)
three-kinds 5b5340f
Fix connection health check for protocol != 2 when auth credentials a…
Yard1 5eb9939
Isolate redis-entraid dependency for tests (#3521)
akx dea3d9a
Replace flake8+isort+black with `ruff` (#3147)
akx 1de69f5
Correct the typedef of lock.extend() to accept floats, and test that …
nbertram 9be806a
Removing deprecated usage of forbid_global_loop=True in pytest.mark.a…
petyaslavova 8a28b96
(tests): Added testing for auth via DefaultAzureCredential (#3544)
vladvildanov 74977eb
Fix AttributeError when client.get_default_node() returns None (#3458)
bacchuswng 4f0ee91
feat: adds option not to raise exception when leaving context manager…
julianolm 333fd8f
Got rid of `time.time()`- replacing it with time.monotonic(). (#3551)
excitoon 83db949
allow more recent pyopenssl (#3541)
dimbleby d30ebd1
Fix #3464: Correct misleading exception_handler example in docs (#3474)
byeongjulee222 dc8359f
Removing support for RedisGraph module. (#3548)
petyaslavova 6c7acbd
DOC-4736 added geo indexing examples (#3485)
andy-stark-redis 4bd3656
Fixing async cluster pipeline execution when client is created with c…
petyaslavova d18922f
Avoid the multiprocessing forkserver method (#3442)
befeleme c39c48d
Avoid stacktrace on process exit in Client.__del__() (#3397)
noirbee 527a98f
Increasing the operations-per-run for stale issues GH action (#3556)
petyaslavova 24bb8f4
Removing support for RedisGears module. (#3553)
petyaslavova 944f010
skip `ssl` import if not available (#3078)
dicej 540c3e8
Fixing search module dropindex function not to send invalid third par…
petyaslavova decec9a
fix: add TimeoutError handling in get_connection() (#1485)
donbowman c744366
Adding load balancing strategy configuration to cluster clients(repla…
petyaslavova 13e68af
Exponential with jitter backoff (#3550)
JimNero009 09c6ff9
Adding new hash commands with expiration options - HGETDEL, HGETEX, H…
petyaslavova a9d0260
Truncate pipeline exception message to a sane size (#3530)
rohansingh 8df6a6c
Support using ssl.VerifyMode enum for ssl_cert_reqs (#3346)
lattwood 9f90baf
Improvement: Use `shutdown()` Before `close()` in connection.py (#3567)
allrob23 4e2da48
Fixed infinitely recursive health checks. (#3557)
excitoon 4525c2d
Fix incorrect link to docs for fcall_ro command (#3576)
paololazzari 56e61f8
Docs/raae 724/remove redis ventures (#3579)
rbs333 71916ee
Bump rojopolis/spellcheck-github-actions from 0.47.0 to 0.48.0 (#3580)
dependabot[bot] 8093674
Run pipeline tests against latest 8.0 RC1 image. (#3585)
petyaslavova e66e35c
Adding info for sentinel handling failover when Redis client is acqui…
petyaslavova 6c07473
Adding VectorSet commands support. (#3584)
petyaslavova 266c59c
DOC-5073 added examples for vector sets intro page (#3590)
andy-stark-redis 9a64797
Fixing some sporadically failing tests - part 1 (#3589)
petyaslavova 19b9b72
DOC-5073 vector set quantization and dimension reduction examples (#3…
andy-stark-redis 4f17745
Removing 'charset' and 'errors' inputs from the Redis initialization …
petyaslavova 8bcccd4
DOC-5107 added hash examples for index/query intro page (#3609)
andy-stark-redis f5d5ff3
Marks old RediSearch 1.0 commands as deprecated (#3606)
elena-kolevska d02fbbb
Fixing flaky tests - part 2 (#3592)
petyaslavova 6573d38
Updating default retry strategy for standalone clients. 3 retries wit…
petyaslavova 8dadea2
Handling some special values when transforming responce data into lis…
petyaslavova fb547af
When SlotNotCoveredError is raised, the cluster topology should be re…
petyaslavova c918139
Fixing the versions of some deprecations that wrongly added as 5.0.3 …
petyaslavova cf5c755
Updating pipeline tests to use test libs image with RC2. Updating tim…
petyaslavova 5fe120d
Updated default value of 'require_full_coverage' argument to true for…
vladvildanov 41fdadb
Adding default retry configuration changes for cluster clients (#3622)
petyaslavova c980e95
Changing the default value for ssl_check_hostname to True, to ensure …
petyaslavova c40b98c
Fix AttributeError on ClusterPipeline (#3634)
sentrivana 18d3b32
add equality and hashability to ``Retry`` and backoff classes (#3628)
terencehonles 436ad60
Change type hints with possible None args or return types to be annot…
kesha1225 07a4bbb
Allow newer PyJWT versions (#3636)
aberres fa3067d
Updating Redis 8 test image for GH pipeline (#3639)
petyaslavova f3dfbd4
Prevent RuntimeError while reinitializing clusters - sync and async (…
petyaslavova 36fec15
Adding return types for the RedisModuleCommands class (#3632)
petyaslavova f69192a
Test against unstable hiredis-py (#3617)
uglide cda3fbd
Fix matrix in hiredis-py-integration.yaml (#3641)
uglide 6ef5d71
Export REDIS_MAJOR_VERSION correctly in run-tests (#3642)
uglide a2f7e4b
Multi exec on cluster (#3611)
robertosantamaria-scopely ed35c58
Fix RedisCluster ssl_check_hostname not set to connections. For SSL …
omerfeyzioglu 66d4a02
Updating the readme and lib version to contain the changes from the l…
petyaslavova 7c600dc
Add dynamic_startup_nodes parameter to async RedisCluster
Kakadus 6f53c02
Applying review comments
petyaslavova 5868209
Merge branch 'master' into add-dynamic-startup-nodes-flag-to-async-re…
petyaslavova File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2620,6 +2620,27 @@ def cmd_init_mock(self, r: ClusterNode) -> None: | |
assert rc.get_node(host=default_host, port=7001) is not None | ||
assert rc.get_node(host=default_host, port=7002) is not None | ||
|
||
@pytest.mark.parametrize("dynamic_startup_nodes", [True, False]) | ||
async def test_init_slots_dynamic_startup_nodes(self, dynamic_startup_nodes): | ||
rc = await get_mocked_redis_client( | ||
host="[email protected]", | ||
port=7000, | ||
cluster_slots=default_cluster_slots, | ||
dynamic_startup_nodes=dynamic_startup_nodes, | ||
) | ||
# Nodes are taken from default_cluster_slots | ||
discovered_nodes = [ | ||
"127.0.0.1:7000", | ||
"127.0.0.1:7001", | ||
"127.0.0.1:7002", | ||
"127.0.0.1:7003", | ||
] | ||
startup_nodes = list(rc.nodes_manager.startup_nodes.keys()) | ||
if dynamic_startup_nodes is True: | ||
assert startup_nodes.sort() == discovered_nodes.sort() | ||
else: | ||
assert startup_nodes == ["[email protected]:7000"] | ||
|
||
|
||
class TestClusterPipeline: | ||
"""Tests for the ClusterPipeline class.""" | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.