Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Jul 12, 2025

Backport of #10354 to release/9.4

/cc @davidfowl

Description

This change was motivated by issues found while testing async parameter resolution. Previously, ParameterResource.Value was used in many places without properly waiting for values to resolve, causing failures. Now, ParameterResource.Value calls ParameterResource.GetValueAsync(...).GetAwaiter().GetResult(), which—while not ideal—ensures that both sync and async access behave consistently and avoid inconsistent state.

There is some risk of introducing deadlocks for consumers that previously used .Value, but if .Value is accessed before the TCS is set, it will throw as before.

  • Value now blocks (sync over async) waiting for value resolution if WaitForValueTcs is set.
  • Made GetValueAsync on ParameterResource public.
  • Updated most code outside of tests to use GetValueAsync instead of Value.

Fixes #10352

Customer Impact

  • Fixes scenarios where parameter values were not resolved synchronously, preventing initialization failures due to unresolved parameters.

Testing

  • Added/updated unit tests to verify correct blocking/waiting and error scenarios.
  • Validated in scenarios requiring async parameter resolution.

Risk

  • Potential deadlocks for consumers using .Value in a deadlock-prone context; mitigated by existing exception handling.

Regression?

  • No. This change aligns sync and async access and prevents failures previously possible.

…er async) waiting for value resolution if WaitForValueTcs is set. - Made GetValueAsync on ParameterResource public. - Changed most code outside of tests to use GetValueAsync instead of Value
@danmoseley danmoseley merged commit 462c20d into release/9.4 Jul 12, 2025
255 checks passed
@danmoseley danmoseley deleted the backport/pr-10354-to-release/9.4 branch July 12, 2025 21:27
@github-actions github-actions bot locked and limited conversation to collaborators Aug 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants