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.8k stars 546 forks source link

Aliyun OSS Incompatibility #1167

Open GZGavinZhao opened 2 years ago

GZGavinZhao commented 2 years ago

Hi! I'm using sccache with Aliyun Object Storage Service, which is S3-compatible. However, I keep getting cache write errors. I've tested my API credentials and made sure they were working.

I suspect the problem is with the URL. This short issue (kahing/goofys#336) explains it much better than I can. In short, OSS only supports virtual hosted-style URLs, while sccache uses path-based access.

OSS docs on S3-compatibility: https://www.alibabacloud.com/help/en/object-storage-service/latest/s3-compatibility-overview

feuvan commented 2 years ago

AliyunOSS is not exactly S3 compatible.

GZGavinZhao commented 2 years ago

@feuvan Yes, it's not 100% compatible, but for the sccache use case it is enough and the slight difference between OSS and S3 is not the cause of this issue. #1086 will fix this.

Xuanwo commented 1 year ago

I will working on this issue after existing storage services have been migrated to opendal.

I plan to add a new OSS service support via opendal's native support: opendal::services::oss

nautaa commented 1 year ago

@Xuanwo Hi, Any progress on this issue? I'm trying to use OSS now and seeing SecondLevelDomainForbidden errors. Then I found this link https://github.com/apache/incubator-opendal/blob/main/core/src/services/s3/compatible_services.md in OpenDAL. Is this a good solution?

Xuanwo commented 1 year ago

@Xuanwo Hi, Any progress on this issue? I'm trying to use OSS now and seeing SecondLevelDomainForbidden errors. Then I found this link https://github.com/apache/incubator-opendal/blob/main/core/src/services/s3/compatible_services.md in OpenDAL. Is this a good solution?

Hi, thanks for the question.

First of all, OSS native support is not added yet. I will continue this work after https://github.com/mozilla/sccache/pull/1885 get merged.

Then, as described in opendal's docs, we need a new option called enable_virtual_host_style to access OSS like bucket.oss.example.com instead of oss.example.com/bucket. We can address this in https://github.com/mozilla/sccache/issues/1887.

Please let me know if you are interested in those works. I am willing to provide assistance with implementation and review.

AJIOB commented 7 months ago

Is it still active? Looks like we’re added the Alibaba OSS support to the sccache