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

WebHDFSHook Bugfix/optional port #24550

Merged
merged 12 commits into from
Jun 28, 2022
Merged

Conversation

ankurbajaj9
Copy link
Contributor

@ankurbajaj9 ankurbajaj9 commented Jun 19, 2022

closes: #24022
This requests makes the port number in a connection to hdfs as optional. It also allowes user to add schema to the url if he wants to.

^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, 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 newsfragement file, named {pr_number}.significant.rst, in newsfragments.

@boring-cyborg
Copy link

boring-cyborg bot commented Jun 19, 2022

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (flake8, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it’s a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@eladkal eladkal changed the title Bugfix/optional port WebHDFSHook Bugfix/optional port Jun 21, 2022
@ankurbajaj9
Copy link
Contributor Author

Hey, Can you please enable the workflow which is awaiting approval. It will help me understand if If there is anything else needed in code and then I can work on the documentation of the change.

if extra_dejson.get('use_ssl', False):
connection_str = f'https://{namenode}:{port}'
session.verify = extra_dejson.get('verify', True)
if extra_dejson.get('use_ssl', 'False') == 'True':
Copy link
Member

Choose a reason for hiding this comment

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

I think connection extra can be both strings as well as dict/JSON so not sure, actually, this change requires or not https://github.com/apache/airflow/blob/main/airflow/models/connection.py#L119 .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When using the application , it takes json input from the UI where it only accepts String . Should I change it to accept both ?

@pankajastro
Copy link
Member

Can you please add some description like case or some dummy extra where it not working

@ankurbajaj9
Copy link
Contributor Author

Can you please add some description like case or some dummy extra where it not working

Do you want me to add more tests ? bascially when you send a string "False" from the UI , it doesnt work , you have to send an empty string to make it work

@ankurbajaj9 ankurbajaj9 marked this pull request as ready for review June 27, 2022 19:32
@ankurbajaj9
Copy link
Contributor Author

Thanks for the run , I have fixed all the issues that I could find. Please enable the workflows awaiting approval once again to check if everything is working fine

@potiuk potiuk merged commit d8ec1ec into apache:main Jun 28, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Jun 28, 2022

Awesome work, congrats on your first merged pull request!

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.

Make port as optional argument
3 participants