diff --git a/pkgs/clan-cli/clan_cli/secrets/modules/__init__.py b/pkgs/clan-cli/clan_cli/secrets/modules/__init__.py index 591e4a5fe..5e26009c7 100644 --- a/pkgs/clan-cli/clan_cli/secrets/modules/__init__.py +++ b/pkgs/clan-cli/clan_cli/secrets/modules/__init__.py @@ -23,13 +23,8 @@ class SecretStoreBase(ABC): def exists(self, service: str, name: str) -> bool: pass - @abstractmethod - def generate_hash(self) -> bytes: - pass - - @abstractmethod def update_check(self) -> bool: - pass + return False @abstractmethod def upload(self, output_dir: Path) -> None: diff --git a/pkgs/clan-cli/clan_cli/secrets/modules/password_store.py b/pkgs/clan-cli/clan_cli/secrets/modules/password_store.py index a1164a9f9..cc83dfb5b 100644 --- a/pkgs/clan-cli/clan_cli/secrets/modules/password_store.py +++ b/pkgs/clan-cli/clan_cli/secrets/modules/password_store.py @@ -88,6 +88,8 @@ class SecretStore(SecretStoreBase): hashes.sort() return b"\n".join(hashes) + # FIXME: add this when we switch to python3.12 + # @override def update_check(self) -> bool: local_hash = self.generate_hash() remote_hash = self.machine.target_host.run( diff --git a/pkgs/clan-cli/clan_cli/secrets/modules/sops.py b/pkgs/clan-cli/clan_cli/secrets/modules/sops.py index 081223132..3f91d6040 100644 --- a/pkgs/clan-cli/clan_cli/secrets/modules/sops.py +++ b/pkgs/clan-cli/clan_cli/secrets/modules/sops.py @@ -6,8 +6,10 @@ from clan_cli.secrets.machines import add_machine, has_machine from clan_cli.secrets.secrets import decrypt_secret, encrypt_secret, has_secret from clan_cli.secrets.sops import generate_private_key +from . import SecretStoreBase -class SecretStore: + +class SecretStore(SecretStoreBase): def __init__(self, machine: Machine) -> None: self.machine = machine @@ -52,9 +54,6 @@ class SecretStore: f"{self.machine.name}-{name}", ) - def update_check(self) -> bool: - return False - def upload(self, output_dir: Path) -> None: key_name = f"{self.machine.name}-age.key" if not has_secret(self.machine.flake_dir, key_name): diff --git a/pkgs/clan-cli/clan_cli/secrets/modules/vm.py b/pkgs/clan-cli/clan_cli/secrets/modules/vm.py index 6ae5acbac..fc3ea3cdd 100644 --- a/pkgs/clan-cli/clan_cli/secrets/modules/vm.py +++ b/pkgs/clan-cli/clan_cli/secrets/modules/vm.py @@ -29,9 +29,6 @@ class SecretStore(SecretStoreBase): def exists(self, service: str, name: str) -> bool: return (self.dir / service / name).exists() - def update_check(self) -> bool: - return False - def upload(self, output_dir: Path) -> None: if os.path.exists(output_dir): shutil.rmtree(output_dir)