Skip to content
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

Allow reading connection strings from config #133

Merged
merged 2 commits into from
Oct 9, 2023

Conversation

davidfowl
Copy link
Member

@davidfowl davidfowl commented Oct 9, 2023

  • This allows the existing components (postgres, sql, redis) to read from config as a fallback after getting their own connection string.

Contributes to #120

PS: Once we do #132, this logic will only exist in a single place.

- This allows the existing components (postgres, sql, redis) to read from config as a fallback after getting their own connection string.

#120
@@ -44,6 +44,6 @@ private static void WriteRedisComponentToManifest(Utf8JsonWriter jsonWriter, str
public static IDistributedApplicationComponentBuilder<T> WithRedis<T>(this IDistributedApplicationComponentBuilder<T> builder, IDistributedApplicationComponentBuilder<IRedisComponent> redisBuilder, string? connectionName = null)
where T : IDistributedApplicationComponentWithEnvironment
{
return builder.WithReference(redisBuilder);
return builder.WithReference(redisBuilder, connectionName);
Copy link
Member Author

Choose a reason for hiding this comment

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

This was a bug I introduced.

@davidfowl davidfowl merged commit fe3bbec into main Oct 9, 2023
@davidfowl davidfowl deleted the davidfowl/connection-strings branch October 9, 2023 07:05
@github-actions github-actions bot locked and limited conversation to collaborators May 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants