Skip to content
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

add version selection #305

Merged
merged 15 commits into from
Jan 10, 2024
Merged

add version selection #305

merged 15 commits into from
Jan 10, 2024

Conversation

javaGitHub2022
Copy link
Contributor

close #299

@CLAassistant
Copy link

CLAassistant commented Jan 5, 2024

CLA assistant check
All committers have signed the CLA.

wey-gu
wey-gu previously approved these changes Jan 5, 2024
nebula3/gclient/net/ConnectionPool.py Outdated Show resolved Hide resolved
tests/test_connection.py Outdated Show resolved Hide resolved
@Nicole00
Copy link
Contributor

Nicole00 commented Jan 8, 2024

SessionPool config need to add config handshakeKey

@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2024

Codecov Report

Attention: 23 lines in your changes are missing coverage. Please review.

Comparison is base (3be007f) 77.83% compared to head (a881dda) 78.02%.

Files Patch % Lines
nebula3/gclient/net/SessionPool.py 26.92% 19 Missing ⚠️
nebula3/gclient/net/ConnectionPool.py 71.42% 4 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #305      +/-   ##
==========================================
+ Coverage   77.83%   78.02%   +0.18%     
==========================================
  Files          18       18              
  Lines        2423     2430       +7     
==========================================
+ Hits         1886     1896      +10     
+ Misses        537      534       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

nebula3/gclient/net/SessionPool.py Outdated Show resolved Hide resolved
nebula3/gclient/net/SessionPool.py Outdated Show resolved Hide resolved
tests/test_connection.py Outdated Show resolved Hide resolved
if __name__ == "__main__":
ip = "127.0.0.1"
port = 9669

handshakeKey = "3.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

the example does not use the config handshakeKey.

"""open the SSL connection

:param ip: the server ip
:param port: the server port
:param timeout: the timeout for connect and execute
:param handshakeKey: the server version
Copy link
Contributor

Choose a reason for hiding this comment

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

handshakeKey: the key for client and server handshake, make sure the handshakeKey is in the white list config of server: client_white_list

self._configs.idle_time != 0
and connection.idle_time() > self._configs.idle_time
):
if self._configs.idle_time != 0:
Copy link
Contributor

Choose a reason for hiding this comment

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

why remove the condition for idle_time?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Accidentally deleted

@@ -15,14 +23,15 @@

AddrIp = ["127.0.0.1", "::1"]
port = 9669
handshakeKey = "3.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

please add some tests for wrong handshakeKey value, such as "INVALID_HANDSHAKE_KEY"

Copy link
Contributor

@Nicole00 Nicole00 left a comment

Choose a reason for hiding this comment

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

LGTM

@Nicole00 Nicole00 merged commit d58b274 into vesoft-inc:master Jan 10, 2024
11 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.

support to config the version white list for client
5 participants