Rework handling of cached failures
Description
Seeing that retrying failures doesn't work properly, I set out to try and fix it. In the depths of the scheduler code, I found this gem
# XXX: Fix this, See https://mail.gnome.org/archives/buildstream-list/2018-September/msg00029.html
# Bypass queue processing entirely the first time it's tried.
and went further down the rabbit hole. This is what I came up with.
Changes proposed in this merge request:
- Job environment is printed to the log as part of
Element._assemble
rather than byElementJob
. It is only printed when starting a build. - Cached failures are handled in
Element._assemble
by retrieving the failed build log from the artifact and raising aCachedFailure
exception rather than being special-cased in theBuildQueue
. - An element with a cached failure is considered buildable and can be scheduled again.
This merge request, when approved, will close: #967 (closed)