Skip to content
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

Bump to ops 2.10 and remove workaround for excluding breaking apps from relation-broken events #177

Open
ca-scribner opened this issue Feb 1, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@ca-scribner
Copy link
Contributor

Why it needs to get done

The kubeflow_dashboard libraryu has the following workaround:

def get_name_of_breaking_app(relation_name: str) -> Optional[str]:
"""Returns breaking app name if called during RELATION_NAME-relation-broken and the breaking app name is available. # noqa
Else, returns None.
Relation type and app name are inferred from juju environment variables.
"""
if not os.environ.get("JUJU_REMOTE_APP", None):
# No remote app is defined
return None
if not os.environ.get("JUJU_RELATION", None) == relation_name:
# Not this relation
return None
if not os.environ.get("JUJU_HOOK_NAME", None) == f"{relation_name}-relation-broken":
# Not the relation-broken event
return None
return os.environ.get("JUJU_REMOTE_APP", None)

This should not be needed as of ops 2.10.0 release. We should test whether 2.10.0 successfully fixes this issue, and if so remove the current workaround.

What needs to get done

  1. test whether ops 2.10.0 fixes the relation-broken handling issue
  2. remove the workaround
  3. update any charms that use this library to remove the workaround from all charms

When is the task considered done

  1. publish an updated charm library with the hack removed
  2. update all charms that use the library (or create separate issues for them to be updated)
@ca-scribner ca-scribner added the enhancement New feature or request label Feb 1, 2024
Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/KF-5293.

This message was autogenerated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Labeled
Development

No branches or pull requests

1 participant