зеркало из https://github.com/mozilla/sccache.git
chore: Add more debug log for gcs to help us diagnose
Signed-off-by: Xuanwo <github@xuanwo.io>
This commit is contained in:
Родитель
056cc6727a
Коммит
e8a234b1dd
|
@ -425,11 +425,15 @@ impl Storage for opendal::Operator {
|
|||
}
|
||||
};
|
||||
|
||||
if can_write {
|
||||
Ok(CacheMode::ReadWrite)
|
||||
let mode = if can_write {
|
||||
CacheMode::ReadWrite
|
||||
} else {
|
||||
Ok(CacheMode::ReadOnly)
|
||||
}
|
||||
CacheMode::ReadOnly
|
||||
};
|
||||
|
||||
debug!("storage check result: {mode:?}");
|
||||
|
||||
Ok(mode)
|
||||
}
|
||||
|
||||
fn location(&self) -> String {
|
||||
|
|
|
@ -95,11 +95,15 @@ struct TaskClusterTokenLoader {
|
|||
|
||||
impl GoogleTokenLoad for TaskClusterTokenLoader {
|
||||
fn load_token(&self) -> Result<Option<GoogleToken>> {
|
||||
debug!("gcs: start to load token from: {}", &self.url);
|
||||
|
||||
let res = self.client.get(&self.url).send()?;
|
||||
|
||||
if res.status().is_success() {
|
||||
let resp = res.json::<TaskClusterToken>()?;
|
||||
|
||||
debug!("gcs: token load succeeded for scope: {}", &self.scope);
|
||||
|
||||
// TODO: we can parse expire time instead using hardcode 1 hour.
|
||||
Ok(Some(GoogleToken::new(
|
||||
&resp.access_token,
|
||||
|
|
Загрузка…
Ссылка в новой задаче