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

Issue with Neo4j provider using some schemes #30153

Closed
2 tasks done
eldar-elne opened this issue Mar 16, 2023 · 2 comments · Fixed by #30418
Closed
2 tasks done

Issue with Neo4j provider using some schemes #30153

eldar-elne opened this issue Mar 16, 2023 · 2 comments · Fixed by #30418

Comments

@eldar-elne
Copy link
Contributor

Apache Airflow version

Other Airflow 2 version (please specify below)

What happened

Hi,
I've run into some issues when using the neo4j operator.
I've tried running a simple query and got an exception from the driver itself.
Using: Airflow 2.2.2

What you think should happen instead

The exception stated that when using bolt+ssc URI scheme, it is not allowed to use the encrypted parameter which is mandatory in the hook (but actually not mandatory when using the driver standalone).

The exception:
neo4j.exceptions.ConfigurationError: The config settings "encrypted", "trust", "trusted_certificates", and "ssl_context" can only be used with the URI schemes ['bolt', 'neo4j']. Use the other URI schemes ['bolt+ssc', 'bolt+s', 'neo4j+ssc', 'neo4j+s'] for setting encryption settings.

In my opinion:
if there's a URI scheme with bolt+ssc, and a GraphDatabase.driver was chosen in the connection settings, it should not be used with the encrypted parameter.
I did edit the hook myself and tried this, worked great for me.

How to reproduce

install the neo4j provider (I used v3.1.0)
Create a neo4j connection in the UI.
Add your host, user/login, password and extras.
In the extras:
{
"encrypted": false,
"neo4j_scheme": false,
"certs_self_signed": true
}

Operating System

Linux

Versions of Apache Airflow Providers

pyairtable==1.0.0
tableauserverclient==0.17.0
apache-airflow-providers-mysql==2.1.1
apache-airflow-providers-salesforce==3.3.0
apache-airflow-providers-slack==4.1.0
apache-airflow-providers-tableau==2.1.2
apache-airflow-providers-postgres==2.3.0
apache-airflow-providers-jdbc==2.0.1
apache-airflow-providers-neo4j==3.1.0
mysql-connector-python==8.0.27
slackclient>=1.0.0,<2.0.0
boto3==1.20.26
cached-property==1.5.2

Deployment

Amazon (AWS) MWAA

Deployment details

No response

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@eldar-elne eldar-elne added area:core kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet labels Mar 16, 2023
@boring-cyborg
Copy link

boring-cyborg bot commented Mar 16, 2023

Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

@potiuk potiuk added good first issue and removed needs-triage label for new issues that we didn't triage yet labels Mar 16, 2023
@potiuk
Copy link
Member

potiuk commented Mar 16, 2023

Feel free to work on it. Assigned you.

@potiuk potiuk added kind:feature Feature Requests and removed kind:bug This is a clearly a bug labels Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants