feat(tvix/*store/bigtable): limit retries connecting to cbtemulator

This kept retrying indefinitely if the socket didn't appear.

Change-Id: I4d4ef61df73cef6abda698501432f370abc8a82c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11406
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
This commit is contained in:
Florian Klink 2024-04-13 13:33:13 +03:00 committed by flokli
parent 0dd421414e
commit 31e3382129
2 changed files with 6 additions and 2 deletions

View file

@ -118,7 +118,9 @@ impl BigtableDirectoryService {
.expect("failed to spwan emulator");
Retry::spawn(
ExponentialBackoff::from_millis(20).max_delay(Duration::from_secs(1)),
ExponentialBackoff::from_millis(20)
.max_delay(Duration::from_secs(1))
.take(3),
|| async {
if socket_path.exists() {
Ok(())

View file

@ -119,7 +119,9 @@ impl BigtablePathInfoService {
.expect("failed to spwan emulator");
Retry::spawn(
ExponentialBackoff::from_millis(20).max_delay(Duration::from_secs(1)),
ExponentialBackoff::from_millis(20)
.max_delay(Duration::from_secs(1))
.take(3),
|| async {
if socket_path.exists() {
Ok(())