-
-
Notifications
You must be signed in to change notification settings - Fork 153
KubeCluster.shutdown_on_close should be False when created from_name #727
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for raising this. I wonder if we can somehow allow folks to specify these options if they really want to.
For example with this change a user wouldn't be able to do the following
cluster = KubeCluster.from_name("foo", shutdown_on_close=True)
return cls( | ||
name=name, | ||
create_mode=CreateMode.CONNECT_ONLY, | ||
shutdown_on_close=False, | ||
**kwargs, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pseudo code and probably wont pass linting. But we could use the dict pipe merge now that 3.9 is our minimum!
return cls( | |
name=name, | |
create_mode=CreateMode.CONNECT_ONLY, | |
shutdown_on_close=False, | |
**kwargs, | |
) | |
defaults = {"create_mode": CreateMode.CONNECT_ONLY, "shutdown_on_close": False} | |
kwargs = defaults | kwargs | |
return cls( | |
name=name, | |
**kwargs, | |
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for raising this. I wonder if we can somehow allow folks to specify these options if they really want to.
For example with this change a user wouldn't be able to do the following
cluster = KubeCluster.from_name("foo", shutdown_on_close=True)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like CI is passing here. Could I ask you to add/update a test to cover this functionality?
133cef2
to
41b3908
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome thanks!
The first kr8s
PR has landed with #721 so we can start using it 🎉.
I made some quick suggestions here that you should be able to use to swap them out.
Sweet! thanks |
Closes #725 .