mirror of
https://github.com/floci-io/floci.git
synced 2026-11-25 23:00:59 -05:00
* fix(backup): publish BACKUP_JOB_COMPLETED to the vault's SNS topic PutBackupVaultNotifications stored the configuration but job completion never read it, so a subscriber received nothing. When a backup job completes in a vault whose BackupVaultEvents include BACKUP_JOB_COMPLETED, publish one message to the configured SNSTopicArn after the job and recovery point are stored. A failed publish is logged and never undoes the completion. Other events remain stored-only; docs say which. * fix(backup): log the exception when a BACKUP_JOB_COMPLETED publish fails * test(backup): import log-capture classes instead of qualifying them inline * fix(backup): notify only the vault a job started in, not a same-name replacement completeJob looked the vault up by name at completion time, so a job whose vault was deleted and recreated mid-run published BACKUP_JOB_COMPLETED to the replacement vault's topic. Pin the vault's sub-resource key (which carries its creation date) when the job starts and read the notification configuration through it; a deleted vault's configuration goes with it, so nothing is sent. * fix(backup): match AWS's BACKUP_JOB_COMPLETED message and pin vaults by id The published notification now follows AWS's documented "Backup job completed" example: the body ends at the BackupJob ID with no vault name, and the publish carries the EventType, State, AccountId, Id and StartTime message attributes that subscription filter policies match on. Vault sub-resources and in-flight jobs were bound to a vault by its creation second, so a vault deleted and recreated within the same second shared a key with its predecessor and a running job could notify the replacement. Each vault now gets a random FlociVaultId at creation and the sub-resource key uses it; vaults stored before the field existed fall back to the creation date, so their stored configuration is still found. The id is persisted but stripped from DescribeBackupVault and ListBackupVaults responses. * test(backup): spell out the RequestSpecification type instead of var