-
Notifications
You must be signed in to change notification settings - Fork 20
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
[MISC] Enable Juju 3.6 #813
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #813 +/- ##
=======================================
Coverage 75.57% 75.57%
=======================================
Files 12 12
Lines 3108 3108
Branches 464 464
=======================================
Hits 2349 2349
Misses 620 620
Partials 139 139 ☔ View full report in Codecov by Sentry. |
if not event.certificate: | ||
logger.debug("No certificate available.") | ||
event.defer() | ||
return |
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.
In local deployments there were None
certificates in the charm's internal secrets for the follower units. I think the CertificateAvailableEvent
triggers for the application, not the unit.
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.
@dragomirp Q: How MySQL charm handles this?
chain = self.charm.get_secret(SCOPE, "chain") | ||
new_chain = "\n".join(event.chain) if event.chain is not None else None | ||
if chain != new_chain: | ||
self.charm.set_secret(SCOPE, "chain", new_chain) | ||
cert = self.charm.get_secret(SCOPE, "cert") | ||
if cert != event.certificate: | ||
self.charm.set_secret(SCOPE, "cert", event.certificate) | ||
ca = self.charm.get_secret(SCOPE, "ca") | ||
if ca != event.ca: | ||
self.charm.set_secret(SCOPE, "ca", event.ca) |
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 think this fires a secret_changed
event even if the secret value is the same.
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.
So, it's worth reporting it as either a DP-Libs or a Juju bug.
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.
For focal compatibility, unrelated to the TLS issue.
if not event.certificate: | ||
logger.debug("No certificate available.") | ||
event.defer() | ||
return |
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.
@dragomirp Q: How MySQL charm handles this?
Marking label tests as unstable for the time being. The ticket to remove that logic is DPE-5443 |
chain = self.charm.get_secret(SCOPE, "chain") | ||
new_chain = "\n".join(event.chain) if event.chain is not None else None | ||
if chain != new_chain: | ||
self.charm.set_secret(SCOPE, "chain", new_chain) | ||
cert = self.charm.get_secret(SCOPE, "cert") | ||
if cert != event.certificate: | ||
self.charm.set_secret(SCOPE, "cert", event.certificate) | ||
ca = self.charm.get_secret(SCOPE, "ca") | ||
if ca != event.ca: | ||
self.charm.set_secret(SCOPE, "ca", event.ca) |
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.
So, it's worth reporting it as either a DP-Libs or a Juju bug.
Fix missing certificates in Juju 3.6