-
Notifications
You must be signed in to change notification settings - Fork 930
Hide secrets in source tooltip, correct ExpressionResolver logic for non-containers #7662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
751ed4a
c31bd4e
1fcc27a
bc3fe8f
247cea7
5f1db82
4357580
844a056
e102dfe
d5505ef
859060d
72ceae0
07a4b13
4c27dcc
f36a730
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -154,16 +154,14 @@ async Task<ResolvedValue> EvalValueProvider(IValueProvider vp) | |
| /// </summary> | ||
| async ValueTask<ResolvedValue> ResolveInternalAsync(object? value) | ||
| { | ||
| return (value, sourceIsContainer) switch | ||
|
adamint marked this conversation as resolved.
|
||
| return value switch | ||
| { | ||
| (ConnectionStringReference cs, true) => await ResolveInternalAsync(cs.Resource.ConnectionStringExpression).ConfigureAwait(false), | ||
| (IResourceWithConnectionString cs, true) => await ResolveInternalAsync(cs.ConnectionStringExpression).ConfigureAwait(false), | ||
| (ReferenceExpression ex, false) => await EvalExpressionAsync(ex).ConfigureAwait(false), | ||
| (ReferenceExpression ex, true) => await EvalExpressionAsync(ex).ConfigureAwait(false), | ||
| (EndpointReference endpointReference, true) => new(await EvalEndpointAsync(endpointReference, EndpointProperty.Url).ConfigureAwait(false), false), | ||
| (EndpointReferenceExpression ep, true) => new(await EvalEndpointAsync(ep.Endpoint, ep.Property).ConfigureAwait(false), false), | ||
| (IValueProvider vp, false) => await EvalValueProvider(vp).ConfigureAwait(false), | ||
| (IValueProvider vp, true) => await EvalValueProvider(vp).ConfigureAwait(false), | ||
| ConnectionStringReference cs => await ResolveInternalAsync(cs.Resource.ConnectionStringExpression).ConfigureAwait(false), | ||
| IResourceWithConnectionString cs => await ResolveInternalAsync(cs.ConnectionStringExpression).ConfigureAwait(false), | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @davidfowl @mitchdenny @davidebbo - do we even need these 2 cases? Since (Note we don't necessarily need to change this in this PR, but I'm just trying to understand if I have the logic correct. If we are going to backport this to 9.1, we may not want to risk a change here.)
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nevermind, I think I understand why this is necessary - because we want to intercept any "host" references inside the ConnectionString and redirect them to the containerHostName. Would it ever work if someone implemented an IValueProvider that contained a "host" reference, but wasn't one of these? |
||
| ReferenceExpression ex => await EvalExpressionAsync(ex).ConfigureAwait(false), | ||
| EndpointReference endpointReference => new(await EvalEndpointAsync(endpointReference, EndpointProperty.Url).ConfigureAwait(false), false), | ||
| EndpointReferenceExpression ep => new(await EvalEndpointAsync(ep.Endpoint, ep.Property).ConfigureAwait(false), false), | ||
| IValueProvider vp => await EvalValueProvider(vp).ConfigureAwait(false), | ||
| _ => throw new NotImplementedException() | ||
| }; | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.