Skip to content

fix: Cast port to int in ClusterNode connection string parsing#352

Merged
omirandadev merged 2 commits into
masterfrom
fix/cluster-node-port-parsing
Mar 31, 2026
Merged

fix: Cast port to int in ClusterNode connection string parsing#352
omirandadev merged 2 commits into
masterfrom
fix/cluster-node-port-parsing

Conversation

@omirandadev
Copy link
Copy Markdown
Collaborator

What this PR does / why we need it:

Fix _parse_connection_string in both redis.py and eg_valkey.py to cast the port to int and guard against malformed entries. The ClusterNode constructor requires port as an integer, but the parser was passing it as a string via dict(zip(...)), causing TypeError: ClusterNode.__init__() missing 1 required positional argument: 'port'

Which issue(s) this PR fixes:

Checks

  • I've made sure the tests are passing.
  • My commits are signed off (git commit -s)
  • My PR title follows conventional commits format

Testing Strategy

  • Unit tests
  • Integration tests
  • Manual tests
  • Testing is not required for this change

Misc

Copy link
Copy Markdown
Collaborator

@vanitabhagwat vanitabhagwat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@omirandadev omirandadev merged commit 30bb579 into master Mar 31, 2026
37 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants