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

do not raise on missing peer relation when being destroyed #293

Merged
merged 10 commits into from
Feb 6, 2024

Conversation

PietroPasotti
Copy link
Contributor

@PietroPasotti PietroPasotti commented Jan 26, 2024

Issue

Some codepaths try and access peer relation data without checking that a peer relation exists; when the app is being nuked, this raises resulting in #292

Fixes #292

Also I noticed there were a few inconsistencies in the assumed return type of get_peer_data, so I fixed those as well.

added a scenario test to catch this case

Copy link
Contributor

@mmkay mmkay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

tests/scenario/conftest.py Show resolved Hide resolved
lib/charms/grafana_k8s/v0/grafana_source.py Outdated Show resolved Hide resolved
lib/charms/grafana_k8s/v0/grafana_source.py Show resolved Hide resolved
@PietroPasotti PietroPasotti merged commit 60fa058 into main Feb 6, 2024
13 checks passed
@PietroPasotti PietroPasotti deleted the tolerate-missing-peer branch February 6, 2024 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hook failed: "grafana-dashboard-relation-broken"
3 participants