Skip to content

Commit 227e26a

Browse files
committed
chore: revert firestore changes
1 parent a1f897e commit 227e26a

8 files changed

Lines changed: 9 additions & 70 deletions

File tree

librarian.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,6 +1152,7 @@ libraries:
11521152
- docs/firestore_v1/transforms.rst
11531153
- docs/firestore_v1/types.rst
11541154
skip_release: true
1155+
skip_generate: true
11551156
python:
11561157
library_type: GAPIC_COMBO
11571158
opt_args_by_api:

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1811,10 +1811,6 @@ 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-
18181814
This corresponds to the ``parent`` field
18191815
on the ``request`` instance; if ``request`` is provided, this
18201816
should not be set.

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2202,10 +2202,6 @@ 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-
22092205
This corresponds to the ``parent`` field
22102206
on the ``request`` instance; if ``request`` is provided, this
22112207
should not be set.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ 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,
306307
core_exceptions.InternalServerError,
307308
core_exceptions.ServiceUnavailable,
308309
),

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -999,6 +999,7 @@ 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,
10021003
core_exceptions.InternalServerError,
10031004
core_exceptions.ServiceUnavailable,
10041005
),

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

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -111,54 +111,21 @@ 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-
133114
class ReadWrite(proto.Message):
134115
r"""Options for a transaction that can be used to read and write
135116
documents.
117+
Firestore does not allow 3rd party auth requests to create
118+
read-write. transactions.
136119
137120
Attributes:
138121
retry_transaction (bytes):
139122
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.
151123
"""
152124

153125
retry_transaction: bytes = proto.Field(
154126
proto.BYTES,
155127
number=1,
156128
)
157-
concurrency_mode: "TransactionOptions.ConcurrencyMode" = proto.Field(
158-
proto.ENUM,
159-
number=2,
160-
enum="TransactionOptions.ConcurrencyMode",
161-
)
162129

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

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -884,10 +884,6 @@ class ExecutePipelineRequest(proto.Message):
884884
minute timestamp within the past 7 days.
885885
886886
This field is a member of `oneof`_ ``consistency_selector``.
887-
auto_commit_transaction (bool):
888-
Optional. Automatically commits the transaction after the
889-
pipeline has been executed. Only permitted in combination
890-
with ``transaction`` or ``new_transaction``.
891887
"""
892888

893889
database: str = proto.Field(
@@ -917,10 +913,6 @@ class ExecutePipelineRequest(proto.Message):
917913
oneof="consistency_selector",
918914
message=timestamp_pb2.Timestamp,
919915
)
920-
auto_commit_transaction: bool = proto.Field(
921-
proto.BOOL,
922-
number=9,
923-
)
924916

925917

926918
class ExecutePipelineResponse(proto.Message):
@@ -1789,10 +1781,6 @@ class ListCollectionIdsRequest(proto.Message):
17891781
``projects/{project_id}/databases/{database_id}/documents/{document_path}``.
17901782
For example:
17911783
``projects/my-project/databases/my-database/documents/chatrooms/my-chatroom``
1792-
1793-
Use
1794-
``projects/{project_id}/databases/{database_id}/documents``
1795-
to list top-level collections.
17961784
page_size (int):
17971785
The maximum number of results to return.
17981786
page_token (str):

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

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,10 @@ class StructuredQuery(proto.Message):
6060
order_by (MutableSequence[google.cloud.firestore_v1.types.StructuredQuery.Order]):
6161
The order to apply to the query results.
6262
63-
Callers can provide a full ordering, a partial ordering, or
64-
no ordering at all. While Firestore will always respect the
65-
provided order, the behavior for queries without a full
66-
ordering is different per database edition:
67-
68-
In Standard edition, Firestore guarantees a stable ordering
69-
through the following rules:
63+
Firestore allows callers to provide a full ordering, a
64+
partial ordering, or no ordering at all. In all cases,
65+
Firestore guarantees a stable ordering through the following
66+
rules:
7067
7168
- The ``order_by`` is required to reference all fields used
7269
with an inequality filter.
@@ -87,14 +84,6 @@ class StructuredQuery(proto.Message):
8784
``WHERE a > 1 ORDER BY a ASC, __name__ ASC``
8885
- ``WHERE __name__ > ... AND a > 1`` becomes
8986
``WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC``
90-
91-
In Enterprise edition, Firestore does not guarantee a stable
92-
ordering. Instead it will pick the most efficient ordering
93-
based on the indexes available at the time of query
94-
execution. This will result in a different ordering for
95-
queries that are otherwise identical. To ensure a stable
96-
ordering, always include a unique field in the ``order_by``
97-
clause, such as ``__name__``.
9887
start_at (google.cloud.firestore_v1.types.Cursor):
9988
A potential prefix of a position in the result set to start
10089
the query at.

0 commit comments

Comments
 (0)