Skip to content

Commit

Permalink
use empty string instead of "default"
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-sanche committed Nov 22, 2024
1 parent ad2a035 commit 7e6dda4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions google/cloud/bigtable/data/_async/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ def get_table(self, instance_id: str, table_id: str, *args, **kwargs) -> TableAs
table_id: The ID of the table. table_id is combined with the
instance_id and the client's project to fully specify the table
app_profile_id: The app profile to associate with requests.
If not set, will use "default".
If not set, will use empty string.
https://cloud.google.com/bigtable/docs/app-profiles
default_read_rows_operation_timeout: The default timeout for read rows
operations, in seconds. If not set, defaults to 600 seconds (10 minutes)
Expand Down Expand Up @@ -543,7 +543,7 @@ async def execute_query(
detected automatically (i.e. the value can be None, an empty list or
an empty dict).
app_profile_id: The app profile to associate with requests.
If not set, will use "default".
If not set, will use empty string.
https://cloud.google.com/bigtable/docs/app-profiles
operation_timeout: the time budget for the entire operation, in seconds.
Failed requests will be retried within the budget.
Expand Down Expand Up @@ -574,7 +574,7 @@ async def execute_query(

instance_name = self._gapic_client.instance_path(self.project, instance_id)
if app_profile_id is None:
app_profile_id = "default"
app_profile_id = ""

request_body = {
"instance_name": instance_name,
Expand Down Expand Up @@ -666,7 +666,7 @@ def __init__(
table_id: The ID of the table. table_id is combined with the
instance_id and the client's project to fully specify the table
app_profile_id: The app profile to associate with requests.
If not set, will use "default".
If not set, will use empty string.
https://cloud.google.com/bigtable/docs/app-profiles
default_read_rows_operation_timeout: The default timeout for read rows
operations, in seconds. If not set, defaults to 600 seconds (10 minutes)
Expand Down Expand Up @@ -719,7 +719,7 @@ def __init__(
self.client.project, instance_id, table_id
)
self.app_profile_id = (
app_profile_id if app_profile_id is not None else "default"
app_profile_id if app_profile_id is not None else ""
)

self.default_operation_timeout = default_operation_timeout
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/data/_async/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ async def test_table_ctor_defaults(self):
await CrossSync.yield_to_event_loop()
assert table.table_id == expected_table_id
assert table.instance_id == expected_instance_id
assert table.app_profile_id == "default"
assert table.app_profile_id == ""
assert table.client is client
assert table.default_operation_timeout == 60
assert table.default_read_rows_operation_timeout == 600
Expand Down Expand Up @@ -1290,7 +1290,7 @@ async def test_call_metadata(self, include_app_profile, fn_name, fn_args, gapic_
if include_app_profile:
assert "app_profile_id=profile" in routing_str
else:
assert "app_profile_id=default" in routing_str
assert "app_profile_id=" in routing_str


@CrossSync.convert_class(
Expand Down Expand Up @@ -2938,7 +2938,7 @@ async def test_read_modify_write_call_defaults(self):
kwargs["table_name"]
== f"projects/{project}/instances/{instance}/tables/{table_id}"
)
assert kwargs["app_profile_id"] == "default"
assert kwargs["app_profile_id"] == ""
assert kwargs["row_key"] == row_key.encode()
assert kwargs["timeout"] > 1

Expand Down

0 comments on commit 7e6dda4

Please sign in to comment.