Skip to content

Commit d197a7a

Browse files
[DPE-4616] Add support for tracing with tempo-k8s (#485)
* Add support for tracing with tempo-k8s * Update outdated charm libs + fix failing unit tests * Fix lint warnings * Revert rolling ops lib back to v0.5 * Update charm tracing lib to v1.7 * Update charm_tracing lib + skip tracing when running unit tests
1 parent 04079ff commit d197a7a

File tree

11 files changed

+1827
-25
lines changed

11 files changed

+1827
-25
lines changed

lib/charms/data_platform_libs/v0/data_interfaces.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ def _on_topic_requested(self, event: TopicRequestedEvent):
331331

332332
# Increment this PATCH version before using `charmcraft publish-lib` or reset
333333
# to 0 if you are raising the major API version
334-
LIBPATCH = 36
334+
LIBPATCH = 37
335335

336336
PYDEPS = ["ops>=2.0.0"]
337337

@@ -658,6 +658,10 @@ def set_content(self, content: Dict[str, str]) -> None:
658658
if not self.meta:
659659
return
660660

661+
# DPE-4182: do not create new revision if the content stay the same
662+
if content == self.get_content():
663+
return
664+
661665
if content:
662666
self._move_to_new_label_if_needed()
663667
self.meta.set_content(content)

lib/charms/operator_libs_linux/v2/snap.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383

8484
# Increment this PATCH version before using `charmcraft publish-lib` or reset
8585
# to 0 if you are raising the major API version
86-
LIBPATCH = 6
86+
LIBPATCH = 7
8787

8888

8989
# Regex to locate 7-bit C1 ANSI sequences
@@ -319,7 +319,10 @@ def get(self, key: Optional[str], *, typed: bool = False) -> Any:
319319
Default is to return a string.
320320
"""
321321
if typed:
322-
config = json.loads(self._snap("get", ["-d", key]))
322+
args = ["-d"]
323+
if key:
324+
args.append(key)
325+
config = json.loads(self._snap("get", args))
323326
if key:
324327
return config.get(key)
325328
return config

0 commit comments

Comments
 (0)