Skip to content

user auth: check for None, replace with [] #700

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

Merged

Conversation

mplsgrant
Copy link
Collaborator

Check for None in kubeconfig and replace it with [] in order to avoid #699

@mplsgrant mplsgrant changed the title check for None, replace with [] user auth: check for None, replace with [] Mar 27, 2025
@pinheadmz
Copy link
Contributor

LGTM @satsie if you're able to reproduce the issue again (resetting that stub kubeconfig file?) and verify this PR fixes the issue that would be really great.

Either way we should merge this and cut a release before the MIT event this week.

@@ -41,6 +41,8 @@ def auth(auth_config):
if not is_first_config:
for category in ["clusters", "users", "contexts"]:
if category in auth_config:
if not base_config[category]:
Copy link
Contributor

@macgyver13 macgyver13 Mar 30, 2025

Choose a reason for hiding this comment

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

This will generate a KeyError exception if category is not in base_config right?

if category in base_config and not base_config[category] should work

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nice! That works smoothly. Thank you.

Copy link
Contributor

@pinheadmz pinheadmz left a comment

Choose a reason for hiding this comment

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

tested ACK thank you!

@pinheadmz pinheadmz merged commit e992801 into bitcoin-dev-project:main Mar 31, 2025
13 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants