siso: test what the gRPC service config retries

Our REAPI connections carry a gRPC method config that retries RPCs
transparently, but nothing exercised it, so it was hard to tell what it
really does. Any layer we add on top has to know which codes are already
covered, otherwise the two layers multiply their attempts and backoff.

Add a test that serves a fake ActionCache over bufconn, dials it with
the production DialOptions, and counts attempts on the server. The
client makes one call per case, so every extra attempt the server sees
comes from gRPC itself.

It records the behavior for GetActionResult:

Unavailable, then OK 3 attempts, caller sees success
  Unavailable (persistent)        5 attempts (maxAttempts), then fails
  Internal (persistent)           5 attempts, then fails
  DeadlineExceeded                1 attempt, not retried
  NotFound                        1 attempt, not retried

maxAttempts counts the original call, so a persistently failing backend
is tried 5 times in total.

Also drop the "no retry for ActionCache" comment in DialOptions. It sat
right above the line that installs the service config, which does retry
ActionCache, and the test now shows what the config does instead.

Change-Id: I5b3e9c7d1a4f8206e3c9b5d7f1a8e4c62d0b9f37
Reviewed-on: https://chromium-review.googlesource.com/c/build/+/8114148
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Yuke Liao <liaoyuke@google.com>
Commit-Queue: Philipp Wollermann <philwo@google.com>
2 files changed
tree: 96448753acf08f0543a0f45e0d660a5b9f3fa687
  1. bench/
  2. gong/
  3. hashigo/
  4. infra/
  5. kajiya/
  6. kzipinfo/
  7. remote-apis/
  8. runmc/
  9. siso/
  10. .gitignore
  11. .golangci.yml
  12. .style.yapf
  13. BUILD_OWNERS
  14. BUILD_TEAM_OWNERS
  15. CONTRIBUTING.md
  16. LICENSE
  17. OWNERS
  18. PRESUBMIT.py
  19. README.md
  20. WATCHLISTS
README.md

build.git repository

This repository contains tools developed and owned by the Chrome Build Team.

Quick start

The steps for getting the code are:

  1. Install depot_tools
  2. Run git clone https://chromium.googlesource.com/build

We use the standard Go module workflow to work on our projects.

Links