Better AWS error messages

[?]
Feb 26, 2016, 9:40 PM
RX6UB7YWLTJXJTFHFHU3W4W5LZIFHZJ4E6WGACPTQONBROFCNWNQC

Dependencies

  • [2] QSBS2ISO S3BinaryCacheStore::isValidPath(): Do a GET instead of HEAD
  • [3] AMXZL5OR Use US standard S3 region
  • [4] QDEGRYZV Reduce severity level of some message
  • [5] ZM34T2NW Typo
  • [6] GTUZLZRH Add an S3-backed binary cache store
  • [7] SOB276BA Keep some statistics for the binary cache stores

Change contents

  • replacement in src/hydra-queue-runner/s3-binary-cache-store.cc at line 25
    [5.1804][5.1804:1856]()
    R && checkAws(Aws::Utils::Outcome<R, E> && outcome)
    [5.1804]
    [5.1856]
    R && checkAws(const FormatOrString & fs, Aws::Utils::Outcome<R, E> && outcome)
  • replacement in src/hydra-queue-runner/s3-binary-cache-store.cc at line 30
    [2.296][2.296:369]()
    format("AWS error: %1%") % outcome.GetError().GetMessage());
    [2.296]
    [5.1969]
    fs.s + ": " + outcome.GetError().GetMessage());
  • replacement in src/hydra-queue-runner/s3-binary-cache-store.cc at line 62
    [5.3014][5.3014:3095]()
    throw Error(format("AWS error: %1%") % res.GetError().GetMessage());
    [5.3014]
    [5.3095]
    throw Error(format("AWS error checking bucket ‘%s’: %s") % bucketName % res.GetError().GetMessage());
  • replacement in src/hydra-queue-runner/s3-binary-cache-store.cc at line 64
    [5.3096][5.3096:3325](),[5.3325][3.43:161]()
    checkAws(client->CreateBucket(
    Aws::S3::Model::CreateBucketRequest()
    .WithBucket(bucketName)
    .WithCreateBucketConfiguration(
    Aws::S3::Model::CreateBucketConfiguration()
    /* .WithLocationConstraint(
    Aws::S3::Model::BucketLocationConstraint::US) */ )));
    [5.3096]
    [5.3443]
    checkAws(format("AWS error creating bucket ‘%s’") % bucketName,
    client->CreateBucket(
    Aws::S3::Model::CreateBucketRequest()
    .WithBucket(bucketName)
    .WithCreateBucketConfiguration(
    Aws::S3::Model::CreateBucketConfiguration()
    /* .WithLocationConstraint(
    Aws::S3::Model::BucketLocationConstraint::US) */ )));
  • replacement in src/hydra-queue-runner/s3-binary-cache-store.cc at line 111
    [5.3917][5.3917:3985]()
    throw Error(format("AWS error: %1%") % error.GetMessage());
    [5.3917]
    [5.3985]
    throw Error(format("AWS error fetching ‘%s’") % path % error.GetMessage());
  • replacement in src/hydra-queue-runner/s3-binary-cache-store.cc at line 133
    [5.4364][5.4364:4420]()
    auto result = checkAws(client->PutObject(request));
    [5.4364]
    [5.4420]
    auto result = checkAws(format("AWS error uploading ‘%s’") % path,
    client->PutObject(request));
  • replacement in src/hydra-queue-runner/s3-binary-cache-store.cc at line 161
    [5.5047][5.5047:5103]()
    auto result = checkAws(client->GetObject(request));
    [5.5047]
    [5.5103]
    auto result = checkAws(format("AWS error fetching ‘%s’") % path,
    client->GetObject(request));
  • replacement in src/hydra-queue-runner/s3-binary-cache-store.cc at line 170
    [5.5230][4.83:167]()
    printMsg(lvlInfo, format("downloaded ‘s3://%1%/%2%’ (%3% bytes) in %4% ms")
    [5.5230]
    [5.5367]
    printMsg(lvlTalkative, format("downloaded ‘s3://%1%/%2%’ (%3% bytes) in %4% ms")