Skip to content

Commit

Permalink
chore(deps): update dependency ops to v2.13.0 (#332)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency ops to v2.13.0

* Update requirements.txt

* fix linting

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Christopher Bartz <christopherbartz@gmx.de>
Co-authored-by: Amanda H. L. de Andrade Katz <amanda.katz@canonical.com>
Co-authored-by: arturo-seijas <102022572+arturo-seijas@users.noreply.github.com>
Co-authored-by: Arturo Seijas <arturo.seijas@canonical.com>
  • Loading branch information
5 people committed May 3, 2024
1 parent 7875423 commit 9ba6c67
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
jsonschema ==4.22.0
ops ==2.12.0
ops ==2.13.0
pydantic ==1.10.15
psycopg2-binary ==2.9.9
requests == 2.31.0
Expand Down
2 changes: 1 addition & 1 deletion src/admin_access_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def _renew_token(self, container: ops.Container) -> typing.Optional[str]:
if JUJU_HAS_SECRETS:
logger.debug("Adding admin_access_token secret to peer relation")
secret = self._app.add_secret({SECRET_KEY: admin_user.access_token})
peer_relation.data[self._app].update({SECRET_ID: secret.id})
peer_relation.data[self._app].update({SECRET_ID: typing.cast(str, secret.id)})
admin_access_token = admin_user.access_token
else:
logger.debug("Adding admin_access_token to peer relation")
Expand Down
5 changes: 3 additions & 2 deletions src/backup_observer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"""S3 Backup relation observer for Synapse."""

import logging
import typing

import ops
from charms.data_platform_libs.v0.s3 import CredentialsChangedEvent, S3Requirer
Expand Down Expand Up @@ -85,7 +86,7 @@ def _on_create_backup_action(self, event: ActionEvent) -> None:
event.fail("Wrong S3 configuration on create backup action. Check S3 integration.")
return

backup_passphrase = self._charm.config.get("backup_passphrase")
backup_passphrase = typing.cast(str, self._charm.config.get("backup_passphrase"))
if not backup_passphrase:
event.fail("Missing backup_passphrase config option.")
return
Expand Down Expand Up @@ -180,7 +181,7 @@ def _on_restore_backup_action(self, event: ActionEvent) -> None:
event.fail("Error accessing S3 in restore backup action.")
return

backup_passphrase = self._charm.config.get("backup_passphrase")
backup_passphrase = typing.cast(str, self._charm.config.get("backup_passphrase"))
if not backup_passphrase:
event.fail("Missing backup_passphrase config option.")
return
Expand Down

0 comments on commit 9ba6c67

Please sign in to comment.