Skip to content

Commit

Permalink
Lock file maintenance Python dependencies (canonical#632)
Browse files Browse the repository at this point in the history
* Lock file maintenance Python dependencies

* Backoff lib juju

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Dragomir Penev <[email protected]>
  • Loading branch information
renovate[bot] and dragomirp authored Oct 11, 2024
1 parent 085f68a commit 2e96ca2
Show file tree
Hide file tree
Showing 3 changed files with 297 additions and 290 deletions.
8 changes: 4 additions & 4 deletions lib/charms/data_platform_libs/v0/data_interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,7 @@ def _on_relation_changed_event(self, event: RelationChangedEvent) -> None:
class ProviderData(Data):
"""Base provides-side of the data products relation."""

DATABASE_FIELD = "database"
RESOURCE_FIELD = "database"

def __init__(
self,
Expand Down Expand Up @@ -1626,7 +1626,7 @@ def _update_relation_data(self, relation: Relation, data: Dict[str, str]) -> Non
req_secret_fields = []

keys = set(data.keys())
if self.fetch_relation_field(relation.id, self.DATABASE_FIELD) is None and (
if self.fetch_relation_field(relation.id, self.RESOURCE_FIELD) is None and (
keys - {"endpoints", "read-only-endpoints", "replset"}
):
raise PrematureDataAccessError(
Expand Down Expand Up @@ -3305,7 +3305,7 @@ class KafkaRequiresEvents(CharmEvents):
class KafkaProviderData(ProviderData):
"""Provider-side of the Kafka relation."""

DATABASE_FIELD = "topic"
RESOURCE_FIELD = "topic"

def __init__(self, model: Model, relation_name: str) -> None:
super().__init__(model, relation_name)
Expand Down Expand Up @@ -3556,7 +3556,7 @@ class OpenSearchRequiresEvents(CharmEvents):
class OpenSearchProvidesData(ProviderData):
"""Provider-side of the OpenSearch relation."""

DATABASE_FIELD = "index"
RESOURCE_FIELD = "index"

def __init__(self, model: Model, relation_name: str) -> None:
super().__init__(model, relation_name)
Expand Down
Loading

0 comments on commit 2e96ca2

Please sign in to comment.