Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s3 cache misses print too much info to the log #300

Closed
luser opened this issue Oct 4, 2018 · 1 comment
Closed

s3 cache misses print too much info to the log #300

luser opened this issue Oct 4, 2018 · 1 comment

Comments

@luser
Copy link
Contributor

luser commented Oct 4, 2018

When we get a cache miss in S3 we hit this case:

warn!("Got AWS error: {:?}", e);

Which winds up logging a whole unnecessary stacktrace (which can be especially useless on Windows):

WARN:sccache::cache::s3: Got AWS error: Error(BadHTTPStatus(Forbidden), State { next_error: None, backtrace: Some(stack backtrace:
   0:     0x7ff6cbaafac2 - <no info>
   1:     0x7ff6cbaaf5ae - <no info>
   2:     0x7ff6cbaaf62d - <no info>
   3:     0x7ff6cbaae93c - <no info>
   4:     0x7ff6cbaae9d3 - <no info>
   5:     0x7ff6cb9f3a5a - <no info>
   6:     0x7ff6cba0fb7c - <no info>
   7:     0x7ff6cb8d371d - <no info>
   8:     0x7ff6cb9feeb7 - <no info>
   9:     0x7ff6cb91d6dd - <no info>
  10:     0x7ff6cb84406a - <no info>
  11:     0x7ff6cba044dd - <no info>
  12:     0x7ff6cb9dab5d - <no info>
  13:     0x7ff6cb91db4d - <no info>
  14:     0x7ff6cb9ee930 - <no info>
  15:     0x7ff6cb91d92d - <no info>
  16:     0x7ff6cb9ca43c - <no info>
  17:     0x7ff6cba8dec0 - <no info>
  18:     0x7ff6cba8078f - <no info>
  19:     0x7ff6cb958b63 - <no info>
  20:     0x7ff6cb92c16a - <no info>
  21:     0x7ff6cb8b8655 - <no info>
  22:     0x7ff6cb824202 - <no info>
  23:     0x7ff6cb811006 - <no info>
  24:     0x7ff6cbb800f7 - <no info>
  25:     0x7ff6cbb9a442 - <no info>
  26:     0x7ff6cbb73a63 - <no info>
  27:     0x7ff6cb81105a - <no info>
  28:     0x7ff6cbbaff79 - <no info>
  29:     0x7ff88f7813d2 - BaseThreadInitThunk) })

We should probably match specifically for ErrorKind::BadHTTPStatus errors there and just log the status code for those. We could continue logging the entire error for other classes of errors.

@Xuanwo
Copy link
Collaborator

Xuanwo commented Feb 17, 2023

Fixed by #1404

@Xuanwo Xuanwo closed this as completed Feb 17, 2023
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

No branches or pull requests

2 participants