-
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
OF should gracefully handle blank application names in relation-broken hooks #693
Comments
I could be convinced to set JUJU_REMOTE_APP but you'd still want to handle
the case in OF for versions of Juju that don't have that set.
…On Tue, Feb 15, 2022 at 3:36 PM Pen Gale ***@***.***> wrote:
See the discussion here: https://bugs.launchpad.net/juju/+bug/1960934
In a relation-broken hook, Juju does not set JUJU_REMOTE_APP. This is
Working as Intended for Juju, but it raises an exception in the framework,
when iterating through relations.
We need to refactor so that we handle the empty value without throwing the
exception.
—
Reply to this email directly, view it on GitHub
<#693>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABRQ7J3PYBB5AK7XMNUEMDU3K2MLANCNFSM5OPUSLHQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Juju does not expose the RELATION_NAME over the relation_broken events (see $1) and that causes bad behaviors with OF (see $2), that we need to guard against. Closes #34 $1 https://bugs.launchpad.net/juju/+bug/1960934 $2 canonical/operator#693
Juju does not expose the RELATION_NAME over the relation_broken events (see $1) and that causes bad behaviors with OF (see $2), that we need to guard against. Closes #34 $1 https://bugs.launchpad.net/juju/+bug/1960934 $2 canonical/operator#693
I want to mention that I've encountered this type of errors before [1], and that they still happen for the nginx-ingress-integrator charm when a related application is removed (the charm iterates over its relations in order to establish what Kubernetes Services and Ingress Resources need to be created / removed). |
If someone is e.g. using the remote app name to access relation data ( |
According to the traceback (why does python reverse the compound word convention from c/c++?) in the linked juju issue, and Line 1642 in e3bc30b
relation.data[relation.app] because now relation.app will be None. If the actual relation data still does exist and relation-get calls can succeed, how can ops get access to the (gone?) remote app's name?
|
See the discussion here: https://bugs.launchpad.net/juju/+bug/1960934
In a relation-broken hook, Juju does not set JUJU_REMOTE_APP. This is Working as Intended for Juju, but it raises an exception in the framework, when iterating through relations.
We need to refactor so that we handle the empty value without throwing the exception.
The text was updated successfully, but these errors were encountered: