Upload build logs to the binary cache

[?]
Mar 15, 2017, 3:43 PM
FHVJYJFEZEGR6DVIQ2HGE7DLWA65QAGAI3K2KACGNM2JTDJTRJ4AC

Dependencies

  • [2] NSBNNM77 Add hydra.conf option "nar_buffer_size" to configure memoryTokens limit
  • [3] UVQJBDHN Move log compression to a plugin
  • [4] BG6PEOB2 Make the output size limit configurable
  • [5] HK2F7SKQ Fix std::stoi exception
  • [*] MHVIT4JY Split hydra-queue-runner.cc more
  • [*] 7LWB2J2Z Periodically clear orphaned build steps
  • [*] 24BMQDZA Start of single-process hydra-queue-runner
  • [*] HJOEIMLR Refactor
  • [*] EPWEMRI2 Allow determinism checking for entire jobsets

Change contents

  • edit in src/hydra-queue-runner/builder.cc at line 6
    [8.22]
    [7.199]
    #include "binary-cache-store.hh"
  • edit in src/hydra-queue-runner/builder.cc at line 152
    [3.33]
    [3.33]
    /* Upload the log file to the binary cache. FIXME: should
    be done on a worker thread. */
    try {
    auto store = destStore.dynamic_pointer_cast<BinaryCacheStore>();
    if (uploadLogsToBinaryCache && store && pathExists(result.logFile)) {
    store->upsertFile("log/" + baseNameOf(buildDrvPath), readFile(result.logFile), "text/plain");
    unlink(result.logFile.c_str());
    }
    } catch (...) {
    ignoreException();
    }
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 61
    [2.1151][2.1151:1214]()
    return i == options.end() ? def : i->second == "true";
    [2.1151]
    [4.3932]
    return i == options.end() ? def : (i->second == "true" || i->second == "1");
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 77
    [2.1572]
    [2.1572]
    , uploadLogsToBinaryCache(config->getBoolOption("upload_logs_to_binary_cache", false))
  • edit in src/hydra-queue-runner/state.hh at line 416
    [11.2666]
    [8.1950]
    bool uploadLogsToBinaryCache;