Skip to content

Add Timer Function to delete Cloudflare R2 snippets#162

Merged
paul-fresquet merged 3 commits intofeature/data-nodes-and-local-syncfrom
feature/data-nodes-and-local-sync-delete-r2-snippets
Aug 7, 2025
Merged

Add Timer Function to delete Cloudflare R2 snippets#162
paul-fresquet merged 3 commits intofeature/data-nodes-and-local-syncfrom
feature/data-nodes-and-local-sync-delete-r2-snippets

Conversation

@paul-fresquet
Copy link
Contributor

This pull request introduces support for cleaning up expired Cloudflare R2 storage snippets in addition to the existing Azure Blob Storage cleanup functionality. It refactors and renames Azure-related code for clarity and consistency, and adds comprehensive tests for both storage providers.

Cloudflare R2 cleanup feature:

  • Added new Cloudflare R2 cleanup function CleanupCloudflareR2SnippetsFunction and corresponding request/handler classes, enabling scheduled deletion of expired objects from R2 buckets. [1] [2] [3] [4]
  • Implemented ICloudflareR2Service interface and CloudflareR2Service class to abstract Cloudflare R2 S3 API operations (ListObjectsAsync, DeleteObjectAsync). [1] [2]

Azure Blob Storage cleanup refactor:

  • Renamed Azure Blob Storage cleanup function and request/handler classes for clarity (CleanupBlobStorageSnippetsFunctionCleanupAzureBlobStorageSnippetsFunction, CleanupBlobStorageSnippetsRequestCleanupAzureBlobStorageSnippetsRequest). [1] [2] [3] [4] [5] [6]

Testing improvements:

  • Added unit tests for the new Cloudflare R2 cleanup function and handler, covering deletion logic, retention policy, and error handling. [1] [2]
  • Updated Azure Blob Storage cleanup handler tests to use the new request class. [1] [2] [3] [4]

@paul-fresquet paul-fresquet marked this pull request as ready for review August 7, 2025 11:55
@Ghass-M Ghass-M assigned Ghass-M and unassigned Ghass-M Aug 7, 2025
@paul-fresquet paul-fresquet merged commit 930aed9 into feature/data-nodes-and-local-sync Aug 7, 2025
19 checks passed
@paul-fresquet paul-fresquet deleted the feature/data-nodes-and-local-sync-delete-r2-snippets branch August 7, 2025 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants