Skip to content

Conversation

@enniomorricone123
Copy link

@enniomorricone123 enniomorricone123 commented Feb 4, 2022

When connection is defined from web UI all "extra" values get empty string for un-set values.

But in k8s hook we make decisions based on is not None.

These two ways of handling the values are incompatible. So we change to truthy evaluation here.

closes: #20626

@boring-cyborg boring-cyborg bot added provider:cncf-kubernetes Kubernetes (k8s) provider related issues area:providers labels Feb 4, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Feb 4, 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

@enniomorricone123 enniomorricone123 changed the title fixed K8S connection issue when kubeconfig is empty string fixed K8S connection issue when kubeconfig or kubeconfig_path is empty string Feb 4, 2022
@enniomorricone123 enniomorricone123 changed the title fixed K8S connection issue when kubeconfig or kubeconfig_path is empty string fixed K8S connection creation issue when kubeconfig or kubeconfig_path is empty string Feb 4, 2022
@potiuk
Copy link
Member

potiuk commented Feb 4, 2022

I think there are some test cases covering already - could you please add a test case covering this case? sounds like an easy one

@enniomorricone123
Copy link
Author

I think there are some test cases covering already - could you please add a test case covering this case? sounds like an easy one

yes, will do

@eladkal
Copy link
Contributor

eladkal commented Feb 13, 2022

@enniomorricone123 Why did you close the PR? was it by mistake?

@dstandish dstandish reopened this Feb 15, 2022
@dstandish
Copy link
Contributor

this was resolved by #19695

@dstandish dstandish closed this Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:cncf-kubernetes Kubernetes (k8s) provider related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not able to create k8s connection using airflow UI with kube config (json)

4 participants