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

Bug Report: (codecov/codecov-api) Regression in 24.11.1: GitLab OAuth signup fails due to unchecked Pub/Sub initialization #598

Open
CerebralXor opened this issue Dec 1, 2024 · 0 comments

Comments

@CerebralXor
Copy link

In version 24.11.1, a regression was introduced in PR codecov/codecov-api#940 (commit codecov/codecov-api@8d317ae) where the new ShelterPubsub implementation unconditionally tries to initialize a Google Cloud Pub/Sub client, even when Pub/Sub is not configured. This causes user signup to fail when using GitLab OAuth.

The previous implementation (commit codecov/codecov-api@63bcae7) had a guard clause that only initialized Pub/Sub if both project_id and topic_id were configured. This guard was lost in the refactor.

Steps to reproduce:

Deploy self-hosted with the codecov/self-hosted-api:24.11.1 container image and without any Google Cloud Pub/Sub configuration
Attempt to sign up using GitLab OAuth
Signup fails with error:
google.auth.exceptions.DefaultCredentialsError: Your default credentials were not found
Fix suggestion:
Add a guard clause in ShelterPubsub.init to only initialize the Pub/Sub client if both SHELTER_PUBSUB_PROJECT_ID and SHELTER_PUBSUB_SYNC_REPO_TOPIC_ID are configured.

@covecod covecod bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Product Owner
Development

No branches or pull requests

1 participant