Skip to content

Commit 9ed1b7c

Browse files
[DPE-6053] Fix ports (#846)
* Fix ports Signed-off-by: Marcelo Henrique Neppel <[email protected]> * Remove unused import Signed-off-by: Marcelo Henrique Neppel <[email protected]> * Remove unused charm library and fix unit tests Signed-off-by: Marcelo Henrique Neppel <[email protected]> * Fix identation Signed-off-by: Marcelo Henrique Neppel <[email protected]> * Bump libs * Conditional set_ports logic * Unit test * Don't expect juju managed resources --------- Signed-off-by: Marcelo Henrique Neppel <[email protected]> Co-authored-by: Marcelo Henrique Neppel <[email protected]>
1 parent ae169ae commit 9ed1b7c

File tree

18 files changed

+673
-919
lines changed

18 files changed

+673
-919
lines changed

lib/charms/data_platform_libs/v0/data_interfaces.py

Lines changed: 2 additions & 3 deletions
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 = 40
334+
LIBPATCH = 41
335335

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

@@ -609,7 +609,7 @@ def get_group(self, group: str) -> Optional[SecretGroup]:
609609
class CachedSecret:
610610
"""Locally cache a secret.
611611
612-
The data structure is precisely re-using/simulating as in the actual Secret Storage
612+
The data structure is precisely reusing/simulating as in the actual Secret Storage
613613
"""
614614

615615
KNOWN_MODEL_ERRORS = [MODEL_ERRORS["no_label_and_uri"], MODEL_ERRORS["owner_no_refresh"]]
@@ -2363,7 +2363,6 @@ def _update_relation_data(self, relation: Relation, data: Dict[str, str]) -> Non
23632363
def _delete_relation_data(self, relation: Relation, fields: List[str]) -> None:
23642364
"""Delete data available (directily or indirectly -- i.e. secrets) from the relation for owner/this_app."""
23652365
if self.secret_fields and self.deleted_label:
2366-
23672366
_, normal_fields = self._process_secret_fields(
23682367
relation,
23692368
self.secret_fields,

lib/charms/data_platform_libs/v0/data_models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ class MergedDataBag(ProviderDataBag, RequirerDataBag):
168168

169169
# Increment this PATCH version before using `charmcraft publish-lib` or reset
170170
# to 0 if you are raising the major API version
171-
LIBPATCH = 4
171+
LIBPATCH = 5
172172

173173
PYDEPS = ["ops>=2.0.0", "pydantic>=1.10,<2"]
174174

@@ -209,7 +209,7 @@ def validate_params(cls: Type[T]):
209209
"""
210210

211211
def decorator(
212-
f: Callable[[CharmBase, ActionEvent, Union[T, ValidationError]], G]
212+
f: Callable[[CharmBase, ActionEvent, Union[T, ValidationError]], G],
213213
) -> Callable[[CharmBase, ActionEvent], G]:
214214
@wraps(f)
215215
def event_wrapper(self: CharmBase, event: ActionEvent):
@@ -287,7 +287,7 @@ def decorator(
287287
Optional[Union[UnitModel, ValidationError]],
288288
],
289289
G,
290-
]
290+
],
291291
) -> Callable[[CharmBase, RelationEvent], G]:
292292
@wraps(f)
293293
def event_wrapper(self: CharmBase, event: RelationEvent):

0 commit comments

Comments
 (0)