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.74k stars 542 forks source link

SCCACHE_REGION needed for Minio S3 server #1783

Open fhaefemeier opened 1 year ago

fhaefemeier commented 1 year ago

Documentation describe:

If using the default endpoint, you must configure the region using the SCCACHE_REGION environment variable, or specify the region key in ~/.aws/credentials.

I understand, SCCACHE_REGION is optional in case connecting a minio storage and it was working with version v0.4.2.

But since v0.5.1 without a region configuration the minio server return HTTP 400 ("Bad Request", code: "AuthorizationHeaderMalformed", message: "The authorization header is malformed; the region is wrong; expecting 'de-local-1'.")

Xuanwo commented 1 year ago

Sorry for the inconvenience. We have removed the region detection logic in OpenDAL to prevent blocking HTTP calls during build, which can cause runtime hang under Tokio.

We require REGION set for AWS S3 and use us-east-1 as a fallback for other compatible services. Unfortunately, this approach does not work with Minio that has another region set (in this case, de-local-1). Therefore, in such cases, it is necessary to manually set the correct region by hand.

We will update the docs for this.