Skip to content

Conversation

@neotrow
Copy link
Contributor

@neotrow neotrow commented Apr 15, 2025

This pull request introduces several significant changes to the GoogleSecrets configuration functionality. The most important updates include the addition of a new overload for AddGoogleSecrets, the removal of redundant code, and enhancements to the handling of GoogleSecretsOptions.

Key Changes:

New Features:

  • Added a new overload for AddGoogleSecrets to allow passing GoogleSecretsOptions.

Code Simplification:

  • Removed the redundant environment variable check for GoogleSecretsProject in ConfigurationBuilderExtensions. [1] [2]
  • Simplified the AddGoogleSecrets method by removing the check for ProjectName in GoogleSecretsOptions.

Enhancements:

  • Set the ProjectName property in GoogleSecretsOptions to default to the environment variable GoogleSecretsProject if available.
  • Added a warning log and early return in GoogleSecretsProvider if ProjectName is not set.

@neotrow neotrow enabled auto-merge (squash) April 15, 2025 13:11
@neotrow neotrow requested a review from Copilot April 15, 2025 13:11
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

GoogleSecrets/ConfigurationBuilderExtensions.cs:35

  • Removing the explicit exception for missing ProjectName may lead to silent misconfiguration. If the behavior is intentional and relying on the provider to log a warning, please ensure that this change is clearly documented.
if (string.IsNullOrWhiteSpace(googleSecretsOptions.ProjectName)) { throw new ArgumentNullException(nameof(googleSecretsOptions.ProjectName)); }

@neotrow neotrow requested a review from neoscie April 15, 2025 13:21
@neotrow neotrow merged commit 9f512a0 into main Apr 15, 2025
2 checks passed
@neotrow neotrow deleted the feature/add-overload branch April 15, 2025 13:37
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