Skip to content

[release/9.4] Made changes to how parameter.Value works - #10357

Merged
Dan Moseley (danmoseley) merged 3 commits into
release/9.4from
backport/pr-10354-to-release/9.4
Jul 12, 2025
Merged

Dan Moseley (danmoseley) merged 3 commits into
release/9.4from
backport/pr-10354-to-release/9.4

Conversation

@github-actions

@github-actions github-actions Bot commented Jul 12, 2025 •

Copy link
Copy Markdown
Contributor

Backport of #10354 to release/9.4

/cc David Fowler (@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
Dan Moseley (danmoseley) merged commit 462c20d into release/9.4 Jul 12, 2025
@danmoseley
Dan Moseley (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