Skip to content

Commit 57ebaa3

Browse files
authored
feat: regenerate google-cloud-firestore (#17577)
Fixes b/527895422
1 parent 140d86f commit 57ebaa3

18 files changed

Lines changed: 144 additions & 82 deletions

File tree

.librarian/generator-input/client-post-processing/firestore-integration.yaml

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -621,45 +621,45 @@ replacements:
621621
packages/google-cloud-firestore/noxfile.py
622622
]
623623
before: |
624-
# Run py.test against the system tests\.
625-
if system_test_exists:
626-
session\.run\(
627-
"py.test",
628-
"--quiet",
629-
f"--junitxml=system_\{session\.python\}_sponge_log\.xml",
630-
system_test_path,
631-
\*session\.posargs,
632-
\)
633-
if system_test_folder_exists:
634-
session\.run\(
635-
"py.test",
636-
"--quiet",
637-
f"--junitxml=system_\{session\.python\}_sponge_log\.xml",
638-
system_test_folder_path,
639-
\*session\.posargs,
640-
\)
624+
# Run py.test against the system tests.
625+
\ if system_test_exists:
626+
\ session.run\(
627+
\ "py.test",
628+
\ "--quiet",
629+
\ f"--junitxml=system_\{session.python\}_sponge_log.xml",
630+
\ system_test_path,
631+
\ \*session.posargs,
632+
\ \)
633+
\ if system_test_folder_exists:
634+
\ session.run\(
635+
\ "py.test",
636+
\ "--quiet",
637+
\ f"--junitxml=system_\{session.python\}_sponge_log.xml",
638+
\ system_test_folder_path,
639+
\ \*session.posargs,
640+
\ \)
641641
after: |
642642
# Run py.test against the system tests.
643-
if system_test_exists:
644-
session.run(
645-
"py.test",
646-
"-n",
647-
"10",
648-
"--quiet",
649-
f"--junitxml=system_{session.python}_sponge_log.xml",
650-
system_test_path,
651-
*session.posargs,
652-
)
653-
if system_test_folder_exists:
654-
session.run(
655-
"py.test",
656-
"-n",
657-
"10",
658-
"--quiet",
659-
f"--junitxml=system_{session.python}_sponge_log.xml",
660-
system_test_folder_path,
661-
*session.posargs,
662-
)
643+
if system_test_exists:
644+
session.run(
645+
"py.test",
646+
"-n",
647+
"10",
648+
"--quiet",
649+
f"--junitxml=system_{session.python}_sponge_log.xml",
650+
system_test_path,
651+
*session.posargs,
652+
)
653+
if system_test_folder_exists:
654+
session.run(
655+
"py.test",
656+
"-n",
657+
"10",
658+
"--quiet",
659+
f"--junitxml=system_{session.python}_sponge_log.xml",
660+
system_test_folder_path,
661+
*session.posargs,
662+
)
663663
count: 1
664664
- paths: [
665665
"packages/google-cloud-firestore/docs/conf.py",

.release-please-bulk-manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@
122122
"packages/google-cloud-eventarc-publishing": "0.10.1",
123123
"packages/google-cloud-filestore": "1.17.0",
124124
"packages/google-cloud-financialservices": "0.4.1",
125+
"packages/google-cloud-firestore": "2.27.0",
125126
"packages/google-cloud-functions": "1.24.0",
126127
"packages/google-cloud-gdchardwaremanagement": "0.5.1",
127128
"packages/google-cloud-geminidataanalytics": "0.13.1",

.release-please-individual-manifest.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"packages/bigframes": "2.43.0",
33
"packages/google-cloud-bigtable": "2.39.0",
4-
"packages/google-cloud-firestore": "2.27.0",
54
"packages/google-crc32c": "1.8.0",
65
"packages/pandas-gbq": "0.35.0",
76
"packages/sqlalchemy-bigquery": "1.17.0"

librarian.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,8 +1151,6 @@ libraries:
11511151
- docs/firestore_v1/transaction.rst
11521152
- docs/firestore_v1/transforms.rst
11531153
- docs/firestore_v1/types.rst
1154-
skip_generate: true
1155-
skip_release: true
11561154
python:
11571155
library_type: GAPIC_COMBO
11581156
opt_args_by_api:

packages/google-cloud-firestore/google/cloud/firestore_bundle/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757

5858
def parse_version_to_tuple(version_string: str):
5959
"""Safely converts a semantic version string to a comparable tuple of integers.
60-
Example: "4.25.8" -> (4, 25, 8)
60+
Example: "6.33.5" -> (6, 33, 5)
6161
Ignores non-numeric parts and handles common version formats.
6262
Args:
6363
version_string: Version string in the format "x.y.z" or "x.y.z<suffix>"
@@ -86,9 +86,9 @@ def _get_version(dependency_name):
8686
return (None, "--")
8787

8888
_dependency_package = "google.protobuf"
89-
_next_supported_version = "4.25.8"
90-
_next_supported_version_tuple = (4, 25, 8)
91-
_recommendation = " (we recommend 6.x)"
89+
_next_supported_version = "6.33.5"
90+
_next_supported_version_tuple = (6, 33, 5)
91+
_recommendation = " (we recommend 7.x)"
9292
(_version_used, _version_used_string) = _get_version(_dependency_package)
9393
if _version_used and _version_used < _next_supported_version_tuple:
9494
warnings.warn(

packages/google-cloud-firestore/google/cloud/firestore_v1/services/firestore/async_client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1811,6 +1811,10 @@ async def sample_list_collection_ids():
18111811
For example:
18121812
``projects/my-project/databases/my-database/documents/chatrooms/my-chatroom``
18131813
1814+
Use
1815+
``projects/{project_id}/databases/{database_id}/documents``
1816+
to list top-level collections.
1817+
18141818
This corresponds to the ``parent`` field
18151819
on the ``request`` instance; if ``request`` is provided, this
18161820
should not be set.

packages/google-cloud-firestore/google/cloud/firestore_v1/services/firestore/client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2202,6 +2202,10 @@ def sample_list_collection_ids():
22022202
For example:
22032203
``projects/my-project/databases/my-database/documents/chatrooms/my-chatroom``
22042204
2205+
Use
2206+
``projects/{project_id}/databases/{database_id}/documents``
2207+
to list top-level collections.
2208+
22052209
This corresponds to the ``parent`` field
22062210
on the ``request`` instance; if ``request`` is provided, this
22072211
should not be set.

packages/google-cloud-firestore/google/cloud/firestore_v1/services/firestore/transports/base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ def _prep_wrapped_messages(self, client_info):
303303
maximum=60.0,
304304
multiplier=1.3,
305305
predicate=retries.if_exception_type(
306-
core_exceptions.DeadlineExceeded,
307306
core_exceptions.InternalServerError,
308307
core_exceptions.ServiceUnavailable,
309308
),

packages/google-cloud-firestore/google/cloud/firestore_v1/services/firestore/transports/grpc_asyncio.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,6 @@ def _prep_wrapped_messages(self, client_info):
999999
maximum=60.0,
10001000
multiplier=1.3,
10011001
predicate=retries.if_exception_type(
1002-
core_exceptions.DeadlineExceeded,
10031002
core_exceptions.InternalServerError,
10041003
core_exceptions.ServiceUnavailable,
10051004
),

packages/google-cloud-firestore/google/cloud/firestore_v1/types/common.py

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,21 +111,54 @@ class TransactionOptions(proto.Message):
111111
This field is a member of `oneof`_ ``mode``.
112112
"""
113113

114+
class ConcurrencyMode(proto.Enum):
115+
r"""The type of concurrency control mode for transactions.
116+
117+
Values:
118+
CONCURRENCY_MODE_UNSPECIFIED (0):
119+
Start the transaction with the database-level
120+
default concurrency mode.
121+
OPTIMISTIC (1):
122+
Use optimistic concurrency control for the
123+
new transaction.
124+
PESSIMISTIC (2):
125+
Use pessimistic concurrency control for the
126+
new transaction.
127+
"""
128+
129+
CONCURRENCY_MODE_UNSPECIFIED = 0
130+
OPTIMISTIC = 1
131+
PESSIMISTIC = 2
132+
114133
class ReadWrite(proto.Message):
115134
r"""Options for a transaction that can be used to read and write
116135
documents.
117-
Firestore does not allow 3rd party auth requests to create
118-
read-write. transactions.
119136
120137
Attributes:
121138
retry_transaction (bytes):
122139
An optional transaction to retry.
140+
concurrency_mode (google.cloud.firestore_v1.types.TransactionOptions.ConcurrencyMode):
141+
Optional. The concurrency control mode to use
142+
for this transaction.
143+
A database is able to use different concurrency
144+
modes for different transactions simultaneously.
145+
146+
3rd party auth requests are only allowed to
147+
create optimistic read-write transactions and
148+
must specify that here even if the
149+
database-level setting is already configured to
150+
optimistic.
123151
"""
124152

125153
retry_transaction: bytes = proto.Field(
126154
proto.BYTES,
127155
number=1,
128156
)
157+
concurrency_mode: "TransactionOptions.ConcurrencyMode" = proto.Field(
158+
proto.ENUM,
159+
number=2,
160+
enum="TransactionOptions.ConcurrencyMode",
161+
)
129162

130163
class ReadOnly(proto.Message):
131164
r"""Options for a transaction that can only be used to read

0 commit comments

Comments
 (0)