mozilla / sccache

Sccache is a ccache-like tool. It is used as a compiler wrapper and avoids compilation when possible. Sccache has the capability to utilize caching in remote storage environments, including various cloud storage options, or alternatively, in local storage.
Apache License 2.0
5.72k stars 540 forks source link

Possible to use public readonly access with Azure storage? #2258

Open ScottTodd opened 1 week ago

ScottTodd commented 1 week ago

We're trying to set up our GitHub project to use sccache with Azure Blob Storage to speed up our CMake builds in GitHub Actions running on pull_request and push events. We'd like for contributors sending pull requests from forks to be able to read from the shared cache without granting them write access.

We configured an Azure Blob Storage container with "anonymous read access" then followed the docs here: https://github.com/mozilla/sccache/blob/main/docs/Azure.md. Here's what we've tried so far to get readonly / unauthenticated access to the shared cache:

Am I missing something? Would it be possible to add direct support for public readonly access? Any suggestions for other things to try?

Thanks!

Xuanwo commented 1 week ago

Hi, @ScottTodd. Thank you very much for these detailed issues. To support public access to Azure without credentials, we need efforts from both the opendal and sccache sides:

Would you like to cross post this issue to opendal side too?

ScottTodd commented 1 week ago

Would you like to cross post this issue to opendal side too?

I'm not familiar with opendal or the implementation details of sccache, so I wouldn't really know what to say there 😅

Another option we're considering is running our own server to use with sccache, possibly hosted on Azure close to our build machines, instead of using Azure Blob Storage. That would give us more direct control over endpoints, authentication, etc.