From 4646c32c1236239e817b89f01b6bc1f6259264d7 Mon Sep 17 00:00:00 2001 From: James McTavish Date: Tue, 9 Aug 2022 13:08:36 +0000 Subject: [PATCH 1/3] Pin to stable firebase_admin version --- requirements.txt | 2 +- src/setup.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 6b75f8c..4de89aa 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,5 +2,5 @@ google-auth>=1.0.0 google-auth-httplib2 google-api-python-client google-api-core -firebase_admin +firebase_admin==5.2.0 pyyaml diff --git a/src/setup.py b/src/setup.py index ef92e7c..61c8262 100644 --- a/src/setup.py +++ b/src/setup.py @@ -105,6 +105,7 @@ def ReadConfig(section, value, default): 'google-auth>=1.0.0', 'google-auth-httplib2', 'google-api-core', + 'firebase-admin==5.2.0', 'pyyaml', ], packages=['googleclouddebugger'], From 0603b12f130f8478df79ad0632847ac0dba036fc Mon Sep 17 00:00:00 2001 From: James McTavish Date: Tue, 9 Aug 2022 13:08:55 +0000 Subject: [PATCH 2/3] Update README with section on firebase backend --- README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/README.md b/README.md index ed3f487..51adde7 100644 --- a/README.md +++ b/README.md @@ -224,6 +224,43 @@ Alternatively, you can pass the `--noreload` flag when running the Django using the `--noreload` flag disables the autoreload feature in Django, which means local changes to files will not be automatically picked up by Django. +### Experimental Firebase Realtime Database Backend + +This functionality is available for release 3.0 onward of this agent. + +The agent can be configured to use Firebase Realtime Database as a backend +instead of the deprecated Cloud Debugger service. If the Firebase backend is +used, breakpoints can be viewed and set using the Snapshot Debugger CLI instead +of the Cloud Console. + +To use the Firebase backend, set the flag when enabling the agent: + +```python +try: + import googleclouddebugger + googleclouddebugger.enable(use_firebase=True) +except ImportError: + pass +``` + +Additional configuration can be provided if necessary: + +```python +try: + import googleclouddebugger + googleclouddebugger.enable( + use_firebase=True, + project_id='my-project-id', + firebase_db_url='https://my-database-url.firebaseio.com', + service_account_json_file='path/to/service_account.json', + ) +except ImportError: + pass +``` + +See https://github.com/GoogleCloudPlatform/snapshot-debugger for more details. + + ## Flag Reference The agent offers various flags to configure its behavior. Flags can be specified From cdda8ee0964ce32dc05892099a85364f0f0cd9ac Mon Sep 17 00:00:00 2001 From: James McTavish Date: Tue, 9 Aug 2022 13:09:21 +0000 Subject: [PATCH 3/3] Bump version number to 3.0 --- src/googleclouddebugger/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/googleclouddebugger/version.py b/src/googleclouddebugger/version.py index 413f974..30aa735 100644 --- a/src/googleclouddebugger/version.py +++ b/src/googleclouddebugger/version.py @@ -4,4 +4,4 @@ # The major version should only change on breaking changes. Minor version # changes go between regular updates. Instances running debuggers with # different major versions will show up as two different debuggees. -__version__ = '2.19' +__version__ = '3.0'