canonical / canonical/data-platform-libs

Wrapper methods don't update their context, making harder to trace / follow in logs

Open
#186 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
13
Forks
12
PR merge metrics
No merged PRs in 30d

Description

The data_interfaces library defines 4 wrapper methods:
https://github.com/canonical/data-platform-libs/blob/c0d638734c975dcfccd89b7e294d533a96f31fd6/lib/charms/data_platform_libs/v0/data_interfaces.py#L485
https://github.com/canonical/data-platform-libs/blob/c0d638734c975dcfccd89b7e294d533a96f31fd6/lib/charms/data_platform_libs/v0/data_interfaces.py#L500
https://github.com/canonical/data-platform-libs/blob/c0d638734c975dcfccd89b7e294d533a96f31fd6/lib/charms/data_platform_libs/v0/data_interfaces.py#L511
https://github.com/canonical/data-platform-libs/blob/c0d638734c975dcfccd89b7e294d533a96f31fd6/lib/charms/data_platform_libs/v0/data_interfaces.py#L524

These method do not update the wrapper context to the original method context, making it harder to trace / follow in logs.

In the case of the charm library: charms.tempo_k8s.v1.charm_tracing. it even makes impossible as the the trace_type method will fail: https://github.com/canonical/tempo-k8s-operator/issues/155

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.