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

feat: Support universe domain environment variable #810

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

amanda-tarafa
Copy link
Collaborator

Towards b/325308829

@amanda-tarafa amanda-tarafa requested a review from jskeet January 14, 2025 00:46
@amanda-tarafa amanda-tarafa requested a review from a team as a code owner January 14, 2025 00:46
Copy link
Collaborator

@jskeet jskeet left a comment

Choose a reason for hiding this comment

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

A couple of nits, but generally fine.

@@ -750,6 +750,22 @@ public async Task<TClient> BuildAsync(IServiceProvider provider, CancellationTok
protected virtual ChannelBase CreateChannel(string endpoint, ChannelCredentials credentials) =>
LastCreatedChannel = EffectiveGrpcAdapter.CreateChannel(ServiceMetadata, endpoint, credentials, GetChannelOptions());

/// <summary>
/// Retrives the value of the environment variable with <paramref name="name"/>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Retrives => Retrieves

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

/// Retrives the value of the environment variable with <paramref name="name"/>,
/// mapping empty or whitespace-only strings to null.
/// </summary>
private static string GetNonEmptyOrNullEnvironmentVariable(string name) => GetNonEmptyOrNullValue(name, Environment.GetEnvironmentVariable);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe GetNonWhiteSpaceOrNull? I'd expected a call to string.IsNullOrEmpty later rather than string.IsNullOrWhiteSpace.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, that's better, changing...

Copy link
Collaborator Author

@amanda-tarafa amanda-tarafa left a comment

Choose a reason for hiding this comment

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

Thanks, I'll push the changes and merge on green.

@@ -750,6 +750,22 @@ public async Task<TClient> BuildAsync(IServiceProvider provider, CancellationTok
protected virtual ChannelBase CreateChannel(string endpoint, ChannelCredentials credentials) =>
LastCreatedChannel = EffectiveGrpcAdapter.CreateChannel(ServiceMetadata, endpoint, credentials, GetChannelOptions());

/// <summary>
/// Retrives the value of the environment variable with <paramref name="name"/>,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

/// Retrives the value of the environment variable with <paramref name="name"/>,
/// mapping empty or whitespace-only strings to null.
/// </summary>
private static string GetNonEmptyOrNullEnvironmentVariable(string name) => GetNonEmptyOrNullValue(name, Environment.GetEnvironmentVariable);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, that's better, changing...

@amanda-tarafa amanda-tarafa merged commit 1ac8d14 into googleapis:main Jan 14, 2025
3 checks passed
@amanda-tarafa amanda-tarafa deleted the universe-env-var branch January 14, 2025 08:31
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.

2 participants