Skip to content
This repository was archived by the owner on Oct 11, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions google/cloud/debugger_v2/services/controller2/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import functools
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core.client_options import ClientOptions
Expand Down Expand Up @@ -240,7 +240,6 @@ async def register_debuggee(
format. Agents must handle ``debuggee_id`` value changing upon
re-registration.


.. code-block:: python

from google.cloud import debugger_v2
Expand Down Expand Up @@ -340,7 +339,6 @@ async def list_active_breakpoints(
breakpoints that are completed until the controller removes them
from the active list to avoid setting those breakpoints again.


.. code-block:: python

from google.cloud import debugger_v2
Expand Down Expand Up @@ -406,8 +404,7 @@ def sample_list_active_breakpoints():
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=600.0,
),
Expand Down Expand Up @@ -446,7 +443,6 @@ async def update_active_breakpoint(
changes such as canonicalizing a value or snapping the location
to the correct line of code.


.. code-block:: python

from google.cloud import debugger_v2
Expand Down Expand Up @@ -526,8 +522,7 @@ def sample_update_active_breakpoint():
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=600.0,
),
Expand Down
5 changes: 1 addition & 4 deletions google/cloud/debugger_v2/services/controller2/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import os
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core import client_options as client_options_lib
Expand Down Expand Up @@ -446,7 +446,6 @@ def register_debuggee(
format. Agents must handle ``debuggee_id`` value changing upon
re-registration.


.. code-block:: python

from google.cloud import debugger_v2
Expand Down Expand Up @@ -546,7 +545,6 @@ def list_active_breakpoints(
breakpoints that are completed until the controller removes them
from the active list to avoid setting those breakpoints again.


.. code-block:: python

from google.cloud import debugger_v2
Expand Down Expand Up @@ -642,7 +640,6 @@ def update_active_breakpoint(
changes such as canonicalizing a value or snapping the location
to the correct line of code.


.. code-block:: python

from google.cloud import debugger_v2
Expand Down
11 changes: 7 additions & 4 deletions google/cloud/debugger_v2/services/controller2/transports/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def __init__(
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
be used for service account credentials.
"""

# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
host += ":443"
Expand Down Expand Up @@ -135,8 +136,7 @@ def _prep_wrapped_messages(self, client_info):
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=600.0,
),
Expand All @@ -150,8 +150,7 @@ def _prep_wrapped_messages(self, client_info):
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=600.0,
),
Expand Down Expand Up @@ -205,5 +204,9 @@ def update_active_breakpoint(
]:
raise NotImplementedError()

@property
def kind(self) -> str:
raise NotImplementedError()


__all__ = ("Controller2Transport",)
Original file line number Diff line number Diff line change
Expand Up @@ -369,5 +369,9 @@ def update_active_breakpoint(
def close(self):
self.grpc_channel.close()

@property
def kind(self) -> str:
return "grpc"


__all__ = ("Controller2GrpcTransport",)
14 changes: 5 additions & 9 deletions google/cloud/debugger_v2/services/debugger2/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import functools
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core.client_options import ClientOptions
Expand Down Expand Up @@ -417,8 +417,7 @@ def sample_get_breakpoint():
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=600.0,
),
Expand Down Expand Up @@ -529,8 +528,7 @@ def sample_delete_breakpoint():
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=600.0,
),
Expand Down Expand Up @@ -634,8 +632,7 @@ def sample_list_breakpoints():
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=600.0,
),
Expand Down Expand Up @@ -742,8 +739,7 @@ def sample_list_debuggees():
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=600.0,
),
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/debugger_v2/services/debugger2/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import os
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core import client_options as client_options_lib
Expand Down
17 changes: 9 additions & 8 deletions google/cloud/debugger_v2/services/debugger2/transports/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def __init__(
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
be used for service account credentials.
"""

# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
host += ":443"
Expand Down Expand Up @@ -136,8 +137,7 @@ def _prep_wrapped_messages(self, client_info):
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=600.0,
),
Expand All @@ -151,8 +151,7 @@ def _prep_wrapped_messages(self, client_info):
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=600.0,
),
Expand All @@ -166,8 +165,7 @@ def _prep_wrapped_messages(self, client_info):
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=600.0,
),
Expand All @@ -181,8 +179,7 @@ def _prep_wrapped_messages(self, client_info):
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=600.0,
),
Expand Down Expand Up @@ -254,5 +251,9 @@ def list_debuggees(
]:
raise NotImplementedError()

@property
def kind(self) -> str:
raise NotImplementedError()


__all__ = ("Debugger2Transport",)
Original file line number Diff line number Diff line change
Expand Up @@ -373,5 +373,9 @@ def list_debuggees(
def close(self):
self.grpc_channel.close()

@property
def kind(self) -> str:
return "grpc"


__all__ = ("Debugger2GrpcTransport",)
4 changes: 2 additions & 2 deletions google/cloud/debugger_v2/types/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ class Breakpoint(proto.Message):
their name from the referencing variable. The effective
variable is a merge of the referencing variable and the
referenced variable.
labels (Sequence[google.cloud.debugger_v2.types.Breakpoint.LabelsEntry]):
labels (Mapping[str, str]):
A set of custom breakpoint properties,
populated by the agent, to be displayed to the
user.
Expand Down Expand Up @@ -579,7 +579,7 @@ class Debuggee(proto.Message):
References to the locations and revisions of
the source code used in the deployed
application.
labels (Sequence[google.cloud.debugger_v2.types.Debuggee.LabelsEntry]):
labels (Mapping[str, str]):
A set of custom debuggee properties,
populated by the agent, to be displayed to the
user.
Expand Down
Loading