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

Add deprecation warning re unset namespace in k8s hook #27202

Merged
merged 6 commits into from
Oct 26, 2022

Conversation

dstandish
Copy link
Contributor

Currently when k8s conn defined but namespace not set, we return 'default'. This is not good behavior because e.g. in KPO we aren't able to tell whether user explicitly set namespace or whether it's just inserted as a fallback -- something that's important for applying precedence.

So we deprecate the return of 'default'. In next major, we'll just return None.

@boring-cyborg boring-cyborg bot added provider:cncf-kubernetes Kubernetes provider related issues area:providers labels Oct 22, 2022
@dstandish dstandish force-pushed the change-get-namespace-allow-unset branch 2 times, most recently from f8ea8dc to 784e1bb Compare October 22, 2022 21:30
Currently when k8s conn defined but namespace not set, we return 'default'.  This is not good behavior because e.g. in KPO we aren't able to tell whether user explicitly set namespace or whether it's just inserted as a fallback -- something that's important for applying precedence.

So we deprecate the return of 'default'.  In next major, we'll just return None.
@dstandish dstandish force-pushed the change-get-namespace-allow-unset branch from 784e1bb to 14d0cb0 Compare October 24, 2022 05:28
airflow/providers/cncf/kubernetes/CHANGELOG.rst Outdated Show resolved Hide resolved
airflow/providers/cncf/kubernetes/hooks/kubernetes.py Outdated Show resolved Hide resolved
airflow/providers/cncf/kubernetes/hooks/kubernetes.py Outdated Show resolved Hide resolved
dstandish and others added 3 commits October 26, 2022 13:53
Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
@dstandish dstandish merged commit 734995f into apache:main Oct 26, 2022
@dstandish dstandish deleted the change-get-namespace-allow-unset branch October 26, 2022 22:10
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 provider related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants