Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Azure Blob Store #1554

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

amankrx
Copy link

@amankrx amankrx commented Dec 26, 2024

Description

This PR implements the Azure Blob Store implementation and closely aligns with the AWS S3 implementation.
This utilizes the azure_sdk libraries (azure_core, azure_storage, and azure_storage_blobs). The libraries are still unofficial and being developed, so we should be mindful of any breaking changes in the future.

Apart from that, I started my development by first creating a POC: https://gist.github.com/amankrx/45e7d2a6ed935aa13dda0318681af2ad
This POC tests the get and upload blobs with all the default features disabled for Azure SDK. This creates a custom HttpClient with manually signing the requests to perform the transactions.

My current implementation still utilizes the hmac_rust feature enabled for signing the request. Please do let me know if we
need any updates here.

The implementations are mostly the same as what we have for Amazon S3. The key difference here is that I have implemented a Custom HTTP Client for executing the requests.

I still have to test it against an actual Blob Storage and implement a testing framework. I have created this PR to get an idea if my current implementation is on the right track.

Regarding the testing framework, I believe we would have to create some custom mocking requests to test the functions. Azure SDK does support the mocking using mock transport(https://github.com/Azure/azure-sdk-for-rust/tree/main/eng/test/mock_transport), but the mocking library isn't as mature enough as what we have for S3.

Fixes #1542
/claim #1542

Type of change

Please delete options that aren't relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

I tested it locally using the bazel test command with the azure_blob_backend_with_local_fast_cas.json5 file, configured to use the actual blob storage. Additionally, I created a test suite to cover both individual happy paths and error scenarios.

Checklist

  • Updated documentation if needed
  • Tests added/amended
  • Local testing completed
  • bazel test //... passes locally
  • PR is contained in a single commit, using git amend see some docs

This change is Reviewable

@CLAassistant
Copy link

CLAassistant commented Dec 26, 2024

CLA assistant check
All committers have signed the CLA.

@amankrx amankrx marked this pull request as draft December 26, 2024 20:05
@amankrx amankrx marked this pull request as ready for review December 29, 2024 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

💎 Implement an Azure store
2 participants