Skip to content

Add await attempt timeout#10416

Open
stephanos wants to merge 2 commits into
mainfrom
stephanos/await-attempt-timeout
Open

Add await attempt timeout#10416
stephanos wants to merge 2 commits into
mainfrom
stephanos/await-attempt-timeout

Conversation

@stephanos
Copy link
Copy Markdown
Contributor

@stephanos stephanos commented May 28, 2026

What changed?

Added a timeout for an Await attempt.

Why?

Prevent an Await attempt from being stuck for too long and consume the entire timeout.

@stephanos stephanos force-pushed the stephanos/await-attempt-timeout branch from e50e5de to 4fcfeab Compare May 28, 2026 22:25
@stephanos stephanos changed the title Add await attempt timeout env Add await attempt timeout May 28, 2026
@stephanos stephanos force-pushed the stephanos/await-attempt-timeout branch 7 times, most recently from be3a125 to 0543253 Compare May 28, 2026 23:06

func newConfig() config {
return config{
attemptTimeout: envDuration(attemptTimeoutEnvVar, 10*time.Second) * debug.TimeoutMultiplier,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

intentionally omitting the ability to override it per test for now; will be in follow-up PR

@stephanos stephanos force-pushed the stephanos/await-attempt-timeout branch 15 times, most recently from 1a65b19 to d5bfc5d Compare May 29, 2026 00:35
@stephanos stephanos force-pushed the stephanos/await-attempt-timeout branch from d5bfc5d to 1a89d66 Compare May 29, 2026 00:35
tb.Fatalf("%s: condition not satisfied after %v (%d polls)", funcName, effectiveTimeout, polls)
message = fmt.Sprintf("%s (not satisfied after %v)", timeoutMsg, r.effectiveTimeout)
}
tb.Fatalf("%s: %s\ndetails:\n attempts = %d\n attempt timeouts = %d",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expose details to reason about failure (more to come here ...)

cfg.pollInterval = pollInterval
cfg.timeoutMsg = timeoutMsg
return cfg
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ this will disappear once we migrated all the Await calls to a new option-based approach that uses reasonable defaults

@stephanos stephanos requested a review from spkane31 May 29, 2026 01:49
@stephanos stephanos marked this pull request as ready for review May 29, 2026 15:38
@stephanos stephanos requested review from a team as code owners May 29, 2026 15:38
PR_BASE_COMMIT: ${{ github.event.pull_request.base.sha }}
DOCKER_COMPOSE_FILE: ./develop/github/docker-compose.yml
TEMPORAL_VERSION_CHECK_DISABLED: 1
TEMPORAL_AWAIT_ATTEMPT_TIMEOUT: 15s
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+5s for CI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant