-
Notifications
You must be signed in to change notification settings - Fork 119
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 supports_open_port_on_k8s to JujuVersion #965
Add supports_open_port_on_k8s to JujuVersion #965
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!
It's annoying we have some methods and some properties on this object -- but I think that was my fault when we introduced has_secrets
as a property (and all the others were methods). Now that we have both, I think properties is the simpler way forward.
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.
Approved, but I'd like us to think about the naming a bit.
@@ -123,3 +123,9 @@ def has_secrets(self) -> bool: | |||
# * In 3.0.3, a bug with observer labels was fixed (juju/juju#14916) | |||
# TODO(benhoyt): update to 3.0.3+ once shipped (for juju/juju#14916 fix) | |||
return (self.major, self.minor, self.patch) >= (3, 0, 2) |
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.
I'm guessing you want to set this to 3,0,3 given the associated comment. (Not necessarily in this PR, but looks like a TODO that we forgot to follow up on)
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.
Fixed in #967. Is it kosher to remove the fallback now that 3.0.3 has been out for a long time? get_secret
will fail if some people are still running 3.0.2, but that seems unlikely, and if it happens, we can just tell people "please upgrade to 3.0.3 or a later 3.x version". Do you know what we normally do in cases like this?
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.
I would mark it clearly in the release notes associated with that version of python-libjuju.
All of the major places that are running 3.x are running 3.1, neither 3.0.2 or 3.0.3 are "supported" by the Juju team at this point.
But if you make it clear, then a charm author can decide if they want to specifically support 3.0.2 for their charm. (I think it is fine, IMO, this is pretty minor.)
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.
I would mark it clearly in the release notes associated with that version of python-libjuju.
Thanks. I presume you mean "that version of ops"?
@@ -123,3 +123,9 @@ def has_secrets(self) -> bool: | |||
# * In 3.0.3, a bug with observer labels was fixed (juju/juju#14916) | |||
# TODO(benhoyt): update to 3.0.3+ once shipped (for juju/juju#14916 fix) | |||
return (self.major, self.minor, self.patch) >= (3, 0, 2) |
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.
I would mark it clearly in the release notes associated with that version of python-libjuju.
All of the major places that are running 3.x are running 3.1, neither 3.0.2 or 3.0.3 are "supported" by the Juju team at this point.
But if you make it clear, then a charm author can decide if they want to specifically support 3.0.2 for their charm. (I think it is fine, IMO, this is pretty minor.)
has_open_port_k8s
to JujuVersion
Merged. Thanks @carlcsaposs-canonical! |
open-port is not supported before Juju 3.0.3 on Kubernetes
Context: https://chat.charmhub.io/charmhub/pl/91t6ip37ybncuqe11eudfx38xw