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 handling of missing relation data during relation-broken events #378

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

Comments

@ca-scribner
Copy link
Contributor

Context

To handle broken relations, istio-pilot has the following workaround:

if isinstance(event, RelationBrokenEvent) and event.relation.name == INGRESS_RELATION_NAME:
if event.app is None:
self.log.info(
f"When handling event '{event}', event.app found to be None. We cannot pop"
f" the departing application's data from 'routes' because we do not know the"
f" departing application's name. We assume that the departing application's"
f" is not in routes.keys='{list(routes.keys())}'."
)
else:
routes.pop((event.relation, event.app))

This was needed because a breaking application's data may or may not be present in the databag.

This behaviour has changed in ops 2.10.0 and the workaround should no longer be needed. We should test and remove it if possible

What needs to get done

  1. test whether ops 2.10.0 fixes the relation-broken handling issue
  2. remove the workaround

Definition of Done

  1. charm is updated and pushed to main
@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-5294.

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