Skip to content

Commit f614e46

Browse files
committed
PYCBC-1727: Deprecate Support for MapReduce Views
Motivation ========== Server has (finally) deprecated views, following up w/ deprecation in client. Modification ============ * Add deprecation notice to view_query and view_indexes bucket methods doc strings. * Update C++ core and ignore core deprecations (cleaner build output) Change-Id: Id6887e6bb9f70bb46ac38077b24e27f5b1f9a1bc Reviewed-on: https://review.couchbase.org/c/couchbase-python-client/+/238231 Reviewed-by: Dimitris Christodoulou <dimitris.christodoulou@couchbase.com> Tested-by: Jared Casey <jared.casey@couchbase.com> Tested-by: Build Bot <build@couchbase.com>
1 parent 3899df8 commit f614e46

File tree

5 files changed

+39
-1
lines changed

5 files changed

+39
-1
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ set(COUCHBASE_CXX_CLIENT_BUILD_TESTS
182182
set(COUCHBASE_CXX_CLIENT_BUILD_TOOLS
183183
OFF
184184
CACHE BOOL "" FORCE)
185+
set(COUCHBASE_CXX_CLIENT_BUILD_OPENTELEMETRY
186+
OFF
187+
CACHE BOOL "" FORCE)
185188

186189
# cmake-format: off
187190
# PYCBC-1374 + PYCBC-1495: Move to dynamically link against static stdlib to avoid issues with:
@@ -250,6 +253,8 @@ file(
250253
"src/transactions/*.cxx")
251254
add_library(pycbc_core SHARED ${SOURCE_FILES})
252255

256+
target_compile_definitions(pycbc_core PRIVATE COUCHBASE_CXX_CLIENT_IGNORE_CORE_DEPRECATIONS)
257+
253258
target_include_directories(
254259
pycbc_core PRIVATE SYSTEM
255260
"${COUCHBASE_CXX_BINARY_DIR}/generated"

acouchbase/bucket.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,12 @@ def view_query(self,
190190
) -> ViewResult:
191191
"""Executes a View query against the bucket.
192192
193+
.. deprecated:: 4.6.0
194+
195+
Views are deprecated in Couchbase Server 7.0+, and will be removed from a future server version.
196+
Views are not compatible with the Magma storage engine. Instead of views, use indexes and queries using the
197+
Index Service (GSI) and the Query Service (SQL++).
198+
193199
.. note::
194200
195201
The query is executed lazily in that it is executed once iteration over the
@@ -252,6 +258,12 @@ def view_indexes(self) -> ViewIndexManager:
252258
Get a :class:`~acouchbase.management.views.ViewIndexManager` which can be used to manage the view design documents
253259
and views of this bucket.
254260
261+
.. deprecated:: 4.6.0
262+
263+
Views are deprecated in Couchbase Server 7.0+, and will be removed from a future server version.
264+
Views are not compatible with the Magma storage engine. Instead of views, use indexes and queries using the
265+
Index Service (GSI) and the Query Service (SQL++).
266+
255267
Returns:
256268
:class:`~acouchbase.management.views.ViewIndexManager`: A :class:`~couchbase.management.views.ViewIndexManager` instance.
257269
""" # noqa: E501

couchbase/bucket.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,12 @@ def view_query(self,
155155
) -> ViewResult:
156156
"""Executes a View query against the bucket.
157157
158+
.. deprecated:: 4.6.0
159+
160+
Views are deprecated in Couchbase Server 7.0+, and will be removed from a future server version.
161+
Views are not compatible with the Magma storage engine. Instead of views, use indexes and queries using the
162+
Index Service (GSI) and the Query Service (SQL++).
163+
158164
.. note::
159165
160166
The query is executed lazily in that it is executed once iteration over the
@@ -217,6 +223,12 @@ def view_indexes(self) -> ViewIndexManager:
217223
Get a :class:`~couchbase.management.views.ViewIndexManager` which can be used to manage the view design documents
218224
and views of this bucket.
219225
226+
.. deprecated:: 4.6.0
227+
228+
Views are deprecated in Couchbase Server 7.0+, and will be removed from a future server version.
229+
Views are not compatible with the Magma storage engine. Instead of views, use indexes and queries using the
230+
Index Service (GSI) and the Query Service (SQL++).
231+
220232
Returns:
221233
:class:`~couchbase.management.views.ViewIndexManager`: A :class:`~couchbase.management.views.ViewIndexManager` instance.
222234
""" # noqa: E501

deps/couchbase-cxx-client

txcouchbase/bucket.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,15 @@ def view_query(self,
127127
*view_options, # type: ViewOptions
128128
**kwargs
129129
) -> Deferred[ViewResult]:
130+
"""Executes a View query against the bucket.
131+
132+
.. deprecated:: 4.6.0
133+
134+
Views are deprecated in Couchbase Server 7.0+, and will be removed from a future server version.
135+
Views are not compatible with the Magma storage engine. Instead of views, use indexes and queries using the
136+
Index Service (GSI) and the Query Service (SQL++).
137+
138+
"""
130139

131140
query = ViewQuery.create_view_query_object(
132141
self.name, design_doc, view_name, *view_options, **kwargs

0 commit comments

Comments
 (0)