Skip to content

Commit

Permalink
use cosl for JujuTopology (#331)
Browse files Browse the repository at this point in the history
* use cosl for JujuTopology

* add cosl to itests dependencies

* add cosl to the tester charm requirements
  • Loading branch information
lucabello authored Jan 15, 2024
1 parent 364bced commit 23fe4d6
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/charms/loki_k8s/v0/loki_push_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ def _alert_rules_error(self, event):
from urllib.error import HTTPError

import yaml
from charms.observability_libs.v0.juju_topology import JujuTopology
from cosl import JujuTopology
from ops.charm import (
CharmBase,
HookEvent,
Expand All @@ -480,7 +480,7 @@ def _alert_rules_error(self, event):

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

logger = logging.getLogger(__name__)

Expand Down
4 changes: 2 additions & 2 deletions lib/charms/loki_k8s/v1/loki_push_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ def _alert_rules_error(self, event):
from urllib.error import HTTPError

import yaml
from charms.observability_libs.v0.juju_topology import JujuTopology
from cosl import JujuTopology
from ops.charm import (
CharmBase,
HookEvent,
Expand All @@ -474,7 +474,7 @@ def _alert_rules_error(self, event):

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

logger = logging.getLogger(__name__)

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
cosl
ops
kubernetes
requests
Expand Down
1 change: 1 addition & 0 deletions tests/integration/log-proxy-tester/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
cosl
ops @ git+https://github.com/canonical/operator
1 change: 1 addition & 0 deletions tests/integration/loki-tester/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
cosl
ops >= 1.2.0
python-logging-loki
2 changes: 1 addition & 1 deletion tests/integration/loki-tester/src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import logging_loki # type: ignore
from charms.loki_k8s.v1.loki_push_api import LokiPushApiConsumer
from charms.observability_libs.v0.juju_topology import JujuTopology
from cosl import JujuTopology
from ops.charm import CharmBase
from ops.main import main
from ops.model import ActiveStatus
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import yaml
from charms.loki_k8s.v0.loki_push_api import AlertRules, LokiPushApiConsumer
from charms.observability_libs.v0.juju_topology import JujuTopology
from cosl import JujuTopology
from fs.tempfs import TempFS
from ops.charm import CharmBase
from ops.framework import StoredState
Expand Down
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ commands =
[testenv:static-{charm,lib}]
description = Run static analysis checks
deps =
cosl
pyright
charm: -r{toxinidir}/requirements.txt
lib: git+https://github.com/canonical/operator#egg=ops
Expand Down Expand Up @@ -96,6 +97,7 @@ commands =
[testenv:integration]
description = Run integration tests
deps =
cosl
aiohttp
juju
pytest
Expand Down

0 comments on commit 23fe4d6

Please sign in to comment.