Skip to content

Conversation

@rklaehn
Copy link
Contributor

@rklaehn rklaehn commented Dec 19, 2025

This required a signature change in the BlobWriter trait to return an Url instead of just ().

I also added a way to provide credentials via an environment variable AZURE_STORAGE_ACCESS_KEY.

Questions:

  • should the blob bucket or whatever it is called be created if it does not exist? Currently the code assumes that it exists.
  • should the URLs that the azure provider uses be changed to be relative? Currently the provider uses absolute URLs, so if you were to point the provider to a different account you would either have to modify the db, or things would stop working.

Current URL scheme:

https://eueast.blob.core.windows.net/blobs/bafkr4ifzfd6kvgwfd35v2iyz3gqjrtyjssgiqrgwxu25tegq352hwzzbju
        |----| configured in the provider
                                     |---| configured in the provider
              |--------------------| also implicitly configured in the provider by using MS

My proposal would be to use the url field in the db only in the case where the data is not in a canonical location that the provider can figure out using the cid, and even then only add the extra info needed. So in this case url would be just the file name to allow the case where we have an azure bucket with named files that we want to content address.

provider_type was used twice!
I am not sure if the way the azure blob writer assigns URLs is good. But
it is possible that a blob provider might store blobs under a name that
si not the cid, e.g. the underlying storage does not allow assigning free
names, or there are some constraints regarding directory size.

So we need the ability for the azure provider to assign and return an url.
@rklaehn rklaehn force-pushed the azure-write branch 2 times, most recently from c25f3fb to acad31b Compare January 5, 2026 12:36
@cameronfyfe
Copy link
Contributor

Answering questions:

should the blob bucket or whatever it is called be created if it does not exist? Currently the code assumes that it exists.
We can just assume it's been set up and exists for now

should the URLs that the azure provider uses be changed to be relative? Currently the provider uses absolute URLs, so if you were to point the provider to a different account you would either have to modify the db, or things would stop working.
This sounds good to me, makes more sense to construct full urls on the fly

- Remove cid constraint
- Add integration tests
@rklaehn
Copy link
Contributor Author

rklaehn commented Jan 15, 2026

Added some integration tests that just push some data to an azure bucket.

They are currently ignored since you need azure credentials.

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