@@ -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 = 47
334+ LIBPATCH = 49
335335
336336PYDEPS = ["ops>=2.0.0" ]
337337
@@ -3527,16 +3527,20 @@ def __init__(
35273527 self .consumer_group_prefix = consumer_group_prefix or ""
35283528 self .mtls_cert = mtls_cert
35293529
3530+ @staticmethod
3531+ def is_topic_value_acceptable (topic_value : str ) -> bool :
3532+ """Check whether the given Kafka topic value is acceptable."""
3533+ return "*" not in topic_value [:3 ]
3534+
35303535 @property
35313536 def topic (self ):
35323537 """Topic to use in Kafka."""
35333538 return self ._topic
35343539
35353540 @topic .setter
35363541 def topic (self , value ):
3537- # Avoid wildcards
3538- if value == "*" :
3539- raise ValueError (f"Error on topic '{ value } ', cannot be a wildcard." )
3542+ if not self .is_topic_value_acceptable (value ):
3543+ raise ValueError (f"Error on topic '{ value } ', unacceptable value." )
35403544 self ._topic = value
35413545
35423546 def set_mtls_cert (self , relation_id : int , mtls_cert : str ) -> None :
@@ -3760,6 +3764,10 @@ def _on_relation_changed_event(self, event: RelationChangedEvent) -> None:
37603764 event .relation , app = event .app , unit = event .unit
37613765 )
37623766
3767+ def _on_secret_changed_event (self , event : SecretChangedEvent ) -> None :
3768+ """Event emitted when the relation data has changed."""
3769+ pass
3770+
37633771
37643772class OpenSearchProvides (OpenSearchProvidesData , OpenSearchProvidesEventHandlers ):
37653773 """Provider-side of the OpenSearch relation."""
0 commit comments