Skip to content

Commit 664c9c6

Browse files
chore: update charm libraries
1 parent db9503d commit 664c9c6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

dns-policy-operator/lib/charms/data_platform_libs/v0/data_interfaces.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ def _on_subject_requested(self, event: SubjectRequestedEvent):
453453

454454
# Increment this PATCH version before using `charmcraft publish-lib` or reset
455455
# to 0 if you are raising the major API version
456-
LIBPATCH = 56
456+
LIBPATCH = 57
457457

458458
PYDEPS = ["ops>=2.0.0"]
459459

@@ -842,6 +842,11 @@ def _legacy_compat_find_secret_by_old_label(self) -> None:
842842
self._secret_meta = self._model.get_secret(label=label)
843843
except SecretNotFoundError:
844844
pass
845+
except ModelError as e:
846+
# Permission denied can be raised if the secret exists but is not yet granted to us.
847+
if "permission denied" in str(e):
848+
return
849+
raise
845850
else:
846851
if label != self.label:
847852
self.current_label = label
@@ -876,6 +881,8 @@ def _legacy_migration_to_new_label_if_needed(self) -> None:
876881
except ModelError as err:
877882
if MODEL_ERRORS["not_leader"] not in str(err):
878883
raise
884+
if "permission denied" not in str(err):
885+
raise
879886
self.current_label = None
880887

881888
##########################################################################

0 commit comments

Comments
 (0)