canonical / canonical/pyroscope-operators

Coordinator errors on certificates-relation-broken with an uncaught SecretNotFoundError

Open
#438 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1
Forks
3
Avg merge
3h 30m
Merged PRs (30d)
2

Description

Removing the `certificates` relation leaves the coordinator stuck in `error`:

```
pyroscope/0 error hook failed: "certificates-relation-broken"
```

Running the hook by hand gives:

```
Uncaught SecretNotFoundError in charm code
```

It's deterministic. The unit errors again on `juju resolved`, and again when the hook is dispatched manually, so it isn't a transient blip.

Found while unskipping the integration tests in #435. `test_profiling_tls` passes everything except its teardown, which is what surfaced this. That teardown has since been removed, since each module gets a throwaway model anyway, so nothing is currently covering this path.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure in the certificates-relation-broken hook, using the SecretNotFoundError details and the profiling TLS integration test mentioned in #435. Trace the teardown path and relation handling, then verify that removing the certificates relation no longer leaves the unit in error and that the path has regression coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.