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

chore: Replace ValueError with logger.warning for missing GOOGLE_APPLICATION_CREDENTIALS environment variable #1415

Merged
merged 2 commits into from
Jan 27, 2025

Conversation

hironow
Copy link
Contributor

@hironow hironow commented Jan 27, 2025

Overview

According to the Google Auth library, authentication should be possible without the GOOGLE_APPLICATION_CREDENTIALS environment variable by using commands like gcloud auth application-default login and gcloud config set project . However, the current implementation does not support this, so this pull request addresses and fixes that issue by logging a warning instead of raising a ValueError when the environment variable is not set. This change ensures consistency with the existing implementation and allows the use of alternative Google authentication methods.

Changes

  • Replace the ValueError with a logger.warning

Related Information

By modifying the implementation to log a warning instead of raising an error, this pull request aligns the behavior with the intended flexibility of the Google Auth library (below). This allows applications to rely on other authentication methods seamlessly, enhancing compatibility with various deployment environments and configurations.

Copy link

changeset-bot bot commented Jan 27, 2025

🦋 Changeset detected

Latest commit: a57698b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
livekit-plugins-google Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@CLAassistant
Copy link

CLAassistant commented Jan 27, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@theomonnom theomonnom left a comment

Choose a reason for hiding this comment

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

Thanks!

@theomonnom theomonnom merged commit 4ce88f2 into livekit:main Jan 27, 2025
4 checks passed
@github-actions github-actions bot mentioned this pull request Jan 27, 2025
@hironow hironow deleted the hironow/google-auth-not-raise branch January 27, 2025 14:20
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.

3 participants