cros/cmd/paris: Add timeout for TLW access initialization in local recovery [infra/infra : main]

0 views
Skip to first unread message

Jason Stanko (Gerrit)

unread,
3:04 PM (6 hours ago) 3:04 PM
to chromium...@chromium.org, infra-rev...@chromium.org

Jason Stanko has uploaded the change for review

Commit message

cros/cmd/paris: Add timeout for TLW access initialization in local recovery

Initialize local TLW access with a 10-second timeout to prevent CLI executions from hanging indefinitely if the lab gRPC service or proxy is unreachable.

BUG=b:536041360
Change-Id: Ibf0d5d383aa870c5216b3a4054b95963a0167ad5

Change diff

diff --git a/go/src/infra/cros/cmd/paris/internal/tasks/local_recovery.go b/go/src/infra/cros/cmd/paris/internal/tasks/local_recovery.go
index 2ddcf18..25ec7fc 100644
--- a/go/src/infra/cros/cmd/paris/internal/tasks/local_recovery.go
+++ b/go/src/infra/cros/cmd/paris/internal/tasks/local_recovery.go
@@ -12,6 +12,7 @@
"path/filepath"
"strings"
"sync/atomic"
+ "time"

"github.com/maruel/subcommands"

@@ -285,7 +286,7 @@
}
}
ctx = scopes.WithParams(ctx, params)
- access, err := recovery.NewLocalTLWAccess(ctx, ic)
+ access, err := newLocalTLWAccessWithTimeout(ctx, ic)
if err != nil {
return errors.Fmt("local recovery: create tlw access: %w", err)
}
@@ -318,6 +319,14 @@
return nil
}

+// newLocalTLWAccessWithTimeout initializes local TLW access with a 10-second timeout
+// to prevent CLI executions from hanging indefinitely if the lab gRPC service or proxy is unreachable.
+func newLocalTLWAccessWithTimeout(ctx context.Context, ic *recovery.LocalTLWConfig) (tlw.Access, error) {
+ initCtx, cancel := context.WithTimeout(ctx, 10*time.Second)
+ defer cancel()
+ return recovery.NewLocalTLWAccess(initCtx, ic)
+}
+
func (c *localRecoveryRun) getLogRoot() (string, error) {
// TODO(gregorynisbet): Clean up the logs, include the current timestamp, or generally
// do something smarter than just setting the logs to "./logs".

Change information

Files:
  • M go/src/infra/cros/cmd/paris/internal/tasks/local_recovery.go
Change size: S
Delta: 1 file changed, 10 insertions(+), 1 deletion(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: infra/infra
Gerrit-Branch: main
Gerrit-Change-Id: Ibf0d5d383aa870c5216b3a4054b95963a0167ad5
Gerrit-Change-Number: 8134740
Gerrit-PatchSet: 1
Gerrit-Owner: Jason Stanko <jst...@google.com>
unsatisfied_requirement
open
diffy

Otabek Kasimov (Gerrit)

unread,
4:49 PM (4 hours ago) 4:49 PM
to Jason Stanko, chromium...@chromium.org, infra-rev...@chromium.org
Attention needed from Jason Stanko

Otabek Kasimov voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Jason Stanko
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: infra/infra
Gerrit-Branch: main
Gerrit-Change-Id: Ibf0d5d383aa870c5216b3a4054b95963a0167ad5
Gerrit-Change-Number: 8134740
Gerrit-PatchSet: 2
Gerrit-Owner: Jason Stanko <jst...@google.com>
Gerrit-Reviewer: Otabek Kasimov <ota...@google.com>
Gerrit-Attention: Jason Stanko <jst...@google.com>
Gerrit-Comment-Date: Wed, 22 Jul 2026 20:49:21 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Jason Stanko (Gerrit)

unread,
6:56 PM (2 hours ago) 6:56 PM
to Otabek Kasimov, chromium...@chromium.org, infra-rev...@chromium.org

Jason Stanko voted Commit-Queue+2

Commit-Queue+2
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: infra/infra
Gerrit-Branch: main
Gerrit-Change-Id: Ibf0d5d383aa870c5216b3a4054b95963a0167ad5
Gerrit-Change-Number: 8134740
Gerrit-PatchSet: 2
Gerrit-Owner: Jason Stanko <jst...@google.com>
Gerrit-Reviewer: Jason Stanko <jst...@google.com>
Gerrit-Reviewer: Otabek Kasimov <ota...@google.com>
Gerrit-Comment-Date: Wed, 22 Jul 2026 22:55:57 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

LUCI CQ (Gerrit)

unread,
7:16 PM (2 hours ago) 7:16 PM
to Jason Stanko, Otabek Kasimov, chromium...@chromium.org, infra-rev...@chromium.org

LUCI CQ submitted the change

Change information

Commit message:
cros/cmd/paris: Add timeout for TLW access initialization in local recovery

Initialize local TLW access with a 10-second timeout to prevent CLI executions from hanging indefinitely if the lab gRPC service or proxy is unreachable.

BUG=b:536041360
Change-Id: Ibf0d5d383aa870c5216b3a4054b95963a0167ad5
Commit-Queue: Jason Stanko <jst...@google.com>
Reviewed-by: Otabek Kasimov <ota...@google.com>
Cr-Commit-Position: refs/heads/main@{#82045}
Files:
  • M go/src/infra/cros/cmd/paris/internal/tasks/local_recovery.go
Change size: S
Delta: 1 file changed, 11 insertions(+), 1 deletion(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Otabek Kasimov
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: infra/infra
Gerrit-Branch: main
Gerrit-Change-Id: Ibf0d5d383aa870c5216b3a4054b95963a0167ad5
Gerrit-Change-Number: 8134740
Gerrit-PatchSet: 3
Gerrit-Owner: Jason Stanko <jst...@google.com>
Gerrit-Reviewer: Jason Stanko <jst...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages