Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Fix symbol error and Fix SSLError when connect es. #831

Merged
merged 3 commits into from
Nov 18, 2020

Conversation

7-Leaf
Copy link
Contributor

@7-Leaf 7-Leaf commented Nov 17, 2020

  1. Replace "—" with "--".
  2. Add "connection_class=RequestsHttpConnection" when create es client.
  3. Add "connection_class=RequestsHttpConnection" when test creating es client.

Replace "—" with "--".
[why]
Execute "odfesql https://localhost:9200 -u admin -w admin",
Then raise "SSLError('N/A', '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1124)', SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1124)')))"
@7-Leaf 7-Leaf changed the title Fix symbol error Fix symbol error and Fix SSLError when connect es. Nov 17, 2020
@dai-chen dai-chen added the CLI label Nov 17, 2020
@dai-chen
Copy link
Member

@twfb Thanks for contributing! The CLI GitHub action is failing. Could you please check?

[why]
Because I modify "sql-cli/src/odfe_sql_cli/esconnection.py",
and add "connection_class" parameter when get es client.
to  fix SSLError when connect es.

But the test raise " AssertionError: expected call not found."

[how]
Add "connection_class" parameter to "assert_called_with".
@7-Leaf
Copy link
Contributor Author

7-Leaf commented Nov 18, 2020

@twfb Thanks for contributing! The CLI GitHub action is failing. Could you please check?

OK.

Copy link
Member

@zhongnansu zhongnansu left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you for the fix

@chloe-zh chloe-zh merged commit 33de457 into opendistro-for-elasticsearch:develop Nov 18, 2020
penghuo pushed a commit that referenced this pull request Dec 15, 2020
* Fix symbol error

Replace "—" with "--".

* Fix SSLError when connect es.

[why]
Execute "odfesql https://localhost:9200 -u admin -w admin",
Then raise "SSLError('N/A', '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1124)', SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1124)')))"

* Add "connection_class" parameter to "assert_called_with".

[why]
Because I modify "sql-cli/src/odfe_sql_cli/esconnection.py",
and add "connection_class" parameter when get es client.
to  fix SSLError when connect es.

But the test raise " AssertionError: expected call not found."

[how]
Add "connection_class" parameter to "assert_called_with".
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants