mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 04:06:34 +09:00
Deleting a system-bucket Backup now deletes its archive through the clickhouse-backup sidecar, and the Backup is held until that delete is answered. The delete reaches S3 at s3.example.org only through the CoreDNS rewrite and the Ingress certificate the round-trip installs, and the script's EXIT trap removes both. The round-trip therefore deletes its Backup inside the script, before the trap runs, and waits for the cleanup; the preconditions and the step's finally mark a Backup they still find with skip-artifact-cleanup, since no S3 host is mapped by then. The wait covers a cleanup Job that runs out its 600s deadline, the 30s retry delay and a second Job, so the route is not removed while a retried delete still needs it. The test then checks the delete itself by listing the objects under the archive's prefix in the system bucket, through the S3 Ingress with the projected credentials and with folder entries left out: some before the delete, none once the Backup is gone. clickhouse-backup's list/remote is not used for this: it reports an archive for every prefix at the top of the bucket, and SeaweedFS was seen to keep the folders the delete emptied for minutes after all their objects were gone. Co-authored-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com> Assisted-by: LLM Signed-off-by: Andrey Kolkov <androndo@gmail.com> Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>