Skip to content

Commit

Permalink
[DPE-4616] Add support for tracing with tempo-k8s (#485)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
shayancanonical authored Jun 15, 2024
1 parent 04079ff commit d197a7a
Show file tree
Hide file tree
Showing 11 changed files with 1,827 additions and 25 deletions.
6 changes: 5 additions & 1 deletion lib/charms/data_platform_libs/v0/data_interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def _on_topic_requested(self, event: TopicRequestedEvent):

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

PYDEPS = ["ops>=2.0.0"]

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

# DPE-4182: do not create new revision if the content stay the same
if content == self.get_content():
return

if content:
self._move_to_new_label_if_needed()
self.meta.set_content(content)
Expand Down
7 changes: 5 additions & 2 deletions lib/charms/operator_libs_linux/v2/snap.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@

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


# Regex to locate 7-bit C1 ANSI sequences
Expand Down Expand Up @@ -319,7 +319,10 @@ def get(self, key: Optional[str], *, typed: bool = False) -> Any:
Default is to return a string.
"""
if typed:
config = json.loads(self._snap("get", ["-d", key]))
args = ["-d"]
if key:
args.append(key)
config = json.loads(self._snap("get", args))
if key:
return config.get(key)
return config
Expand Down
Loading

0 comments on commit d197a7a

Please sign in to comment.