Closed Bug 1055872 Opened 11 years ago Closed 11 years ago

Better handle S3 failures in sccache

Categories

(Firefox Build System :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla34

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(2 files, 2 obsolete files)

So, when I tried landing bug 1045923, I hit an interesting case, in that the cache would almost immediately fallback to not cache at all because of failures (because of the changes from bug 1020827). It turns out that for a period of time, S3 was throwing 403 errors supposedly because of non-matching signatures. It seems this is not happening anymore, but in case it does happen again, we'd better be resilient to it. Hopefully, retrying /should/ work, but since I can't reproduce anymore, it's hard to tell if the workaround actually works.
Attachment #8475583 - Flags: review?(mshal)
Attachment #8475586 - Flags: review?(mshal)
Comment on attachment 8475586 [details] [diff] [review] Retry S3 PUT up to twice in case it returns a 403 error So, in fact, this is still happening, and it's because this patch is broken and hides the problem away.
Attachment #8475586 - Attachment is obsolete: true
Attachment #8475586 - Flags: review?(mshal)
The stats patch was broken too. This fixes it.
Attachment #8475583 - Attachment is obsolete: true
Attachment #8475583 - Flags: review?(mshal)
Attachment #8475693 - Flags: review?(mshal)
Comment on attachment 8475693 [details] [diff] [review] Show storage failures in sccache stats >+ if stats['cachefail'] or stats['storagefail']: > stderr.write('sccache: Failure to cache: %d\n' >- % stats['cachefail']) >+ % (stats['cachefail'] + stats['storagefail'])) IMO it would make more sense to just print the storagefails in a separate line, especially since you could have multiple storagefails per cache miss.
Attachment #8475693 - Flags: review?(mshal) → review+
Attachment #8475723 - Flags: review?(mshal) → review+
(In reply to Michael Shal [:mshal] from comment #6) > Comment on attachment 8475693 [details] [diff] [review] > Show storage failures in sccache stats > > >+ if stats['cachefail'] or stats['storagefail']: > > stderr.write('sccache: Failure to cache: %d\n' > >- % stats['cachefail']) > >+ % (stats['cachefail'] + stats['storagefail'])) > > IMO it would make more sense to just print the storagefails in a separate > line, especially since you could have multiple storagefails per cache miss. Actually, the cachefails are entirely theoretical (they can only happen if creating the CacheData raises an exception), so it's fine to just ignore them.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: