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

Modify ssl verification in druid operator #37673

Merged

Conversation

danielbe11
Copy link
Contributor

@danielbe11 danielbe11 commented Feb 24, 2024

  • This PR corrects the implementation problems in Adding optional SSL verification for druid operator #37629.
  • Makes DruidOperator accept only a boolean to verify SSL when submitting indexing job. By default SSL verification is True which makes it backwards compatible as this is what is default here.
  • If DruidOperator is initialised with verify_ssl=False, then the extra property of the Druid connection is checked for verify key which can be set as the path to CA bundle.
  • Cache property for the return value of self.get_connection(self.druid_ingest_conn_id) which is called >1 times.

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@danielbe11 danielbe11 marked this pull request as ready for review February 24, 2024 22:45
Copy link
Collaborator

@dirrao dirrao left a comment

Choose a reason for hiding this comment

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

Can you add the test case for this change?

@danielbe11
Copy link
Contributor Author

danielbe11 commented Feb 26, 2024

@dirrao the backwards compatibility and get_verify method are tested, I will add a small test for 'conn' method today

@danielbe11
Copy link
Contributor Author

@dirrao the backwards compatibility and get_verify method are tested, I will add a small test for 'conn' method today

I have added test_conn_property

@eladkal eladkal merged commit 479ec87 into apache:main Mar 3, 2024
58 checks passed
@danielbe11 danielbe11 deleted the modify-ssl-verification-in-druid-operator branch March 4, 2024 08:39
abhishekbhakat pushed a commit to abhishekbhakat/my_airflow that referenced this pull request Mar 5, 2024
* Use cached_property for get_connection to avoid calling >1

* Get ca bundle path from connection config if not verifying ssl

* Add type checking check

* Add tests

* Fix lint and add documentation

* Use default

* Final tidy

* Add log for when using CA bundle

* Add test_conn_property

---------

Co-authored-by: Daniel Bell <daniel.bell@skyscanner.net>
utkarsharma2 pushed a commit to astronomer/airflow that referenced this pull request Apr 22, 2024
* Use cached_property for get_connection to avoid calling >1

* Get ca bundle path from connection config if not verifying ssl

* Add type checking check

* Add tests

* Fix lint and add documentation

* Use default

* Final tidy

* Add log for when using CA bundle

* Add test_conn_property

---------

Co-authored-by: Daniel Bell <daniel.bell@skyscanner.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants