Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • B Buildkit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Custom issue tracker
    • Custom issue tracker
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • repos
  • relengreleng
  • Buildkit
  • Merge requests
  • !19

client: Ensure active/healthy connection prior to solve

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Dduvall requested to merge review/client-preflight into wmf/v0.11 Feb 06, 2023
  • Overview 5
  • Commits 1
  • Pipelines 1
  • Changes 4

Provide a WaitForReady client method that performs a preflight request and specifies grpc.WaitForReady(true) to ensure that the grpc.ClientConn has established the underlying connection and that it can be considered available.

Performing this request prior to solves makes the client more robust in environments where the server is behind a proxy or part of a service mesh (e.g. Istio/Envoy). In these environments, connections may be prematurely closed prior to any client requests due to circuit breaking on max connections.

For the moment, this incurs a redundant request to ListWorkers which seemed to be the more backwards compatible request to make as a preflight; Info is not available in older versions. If buildkitd ever implements the grpc.health.v1.Health directly on its server endpoint, a grpc.health.v1.Health/Check may make more sense.

Signed-off-by: Dan Duvall dduvall@wikimedia.org

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: review/client-preflight