Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Commit

Permalink
feat!: default to Firebase backend. (#86)
Browse files Browse the repository at this point in the history
The Cloud Debugger API is shut down, so all agents must use the Firebase
backend.
  • Loading branch information
mctavish authored May 31, 2023
1 parent 3170738 commit 75c678b
Show file tree
Hide file tree
Showing 6 changed files with 611 additions and 1,713 deletions.
4 changes: 0 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
google-auth>=1.0.0
google-auth-httplib2
google-api-python-client
google-api-core
firebase_admin>=5.3.0
pyyaml
19 changes: 4 additions & 15 deletions src/googleclouddebugger/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
from . import breakpoints_manager
from . import collector
from . import error_data_visibility_policy
from . import gcp_hub_client
from . import firebase_client
from . import glob_data_visibility_policy
from . import yaml_data_visibility_config_reader
Expand All @@ -52,20 +51,10 @@ def _StartDebugger():
cdbg_native.LogInfo(
f'Initializing Cloud Debugger Python agent version: {__version__}')

use_firebase = _flags.get('use_firebase')
if use_firebase:
_backend_client = firebase_client.FirebaseClient()
_backend_client.SetupAuth(
_flags.get('project_id'), _flags.get('service_account_json_file'),
_flags.get('firebase_db_url'))
else:
_backend_client = gcp_hub_client.GcpHubClient()
_backend_client.SetupAuth(
_flags.get('project_id'), _flags.get('project_number'),
_flags.get('service_account_json_file'))
_backend_client.SetupCanaryMode(
_flags.get('breakpoint_enable_canary'),
_flags.get('breakpoint_allow_canary_override'))
_backend_client = firebase_client.FirebaseClient()
_backend_client.SetupAuth(
_flags.get('project_id'), _flags.get('service_account_json_file'),
_flags.get('firebase_db_url'))

visibility_policy = _GetVisibilityPolicy()

Expand Down
Loading

0 comments on commit 75c678b

Please sign in to comment.