Skip to content

v2.0.0

Compare
Choose a tag to compare
@devbww devbww released this 06 Jul 22:28
· 3849 commits to main since this release
da4050e

BREAKING CHANGES

As previously announced, google-cloud-cpp now requires C++ >= 14. This is
motivated by similar changes in our dependencies, and because C++ 14 has been
the default C++ version in all the compilers we support for several years.

We think this change is large enough that deserves a major version bump to
signal the new requirements.

If you are already using C++ >= 14 you need to make no changes. If you are
using C++11: please consider updating as soon as possible. To ease your
transition to C++ >= 14 we will, if requested, backport critical fixes to
v1.42.0 until 2023-07-01. After 2023-07-01 we will drop all support to v1.42.0
and earlier versions.

Debian 9 (Stretch) is EOL

Debian 9 (Stretch) reached EOL on 2022-06-30. Therefore, we have stopped testing
or supporting this distribution. This was the last distribution we supported
that required GCC < 7.3, and/or CMake < 3.10. Starting with this release we
require CMake >= 3.10, and only test with GCC >= 7.3.

OTHER CHANGES

Bigtable

We introduced a new constructor for Table which accepts a
DataConnection instead of a DataClient. The DataConnection is a new
interface that more closely matches the client surface of Table. Read more
about *Connection classes in our
Architecture Design document.

What are the benefits of DataConnection?

The new API greatly simplifies mocking. Every Table::Foo(..) call has an
associated DataConnection::Foo(...) call. This allows you to set expectations
on the exact values returned by the client call. See
Mocking the Cloud Bigtable C++ Client for a complete
example on how to mock the behavior of Table with
bigtable_mocks::MockDataConnection.

The new DataConnection API offers more consistency across our libraries. It
also enables the use of some common library features, such as our
UnifiedCredentialsOption. Also, any new features will be added to
the DataConnection API first.

Do I need to update my code?

No. If the benefits are not appealing enough, you do not need to update your
code. All code that currently uses DataClient will continue to function as
before. This includes uses of testing::MockDataClient.

However, if you are using testing::MockDataClient to mock the behavior of
Table in your tests:

  1. Be aware that we have announced our intention to remove classes derived from
    DataClient on or around 2023-05. Your tests will break then.
  2. Please consider using bigtable_mocks::MockDataConnection. It will greatly
    simplify your tests.

How do I update existing DataClient code?

See Migrating from DataClient to DataConnection.

  • doc(bigtable): how to mock the Data API (#9415)
  • feat(bigtable): modern Table constructor (#9403)
  • feat(generator): support explicit routing headers (#9368)
  • fix(bigtable)!: pass app profile id to connection as options (#9388)
  • feat(bigtable): add AppProfileIdOption (#9382)
  • feat(bigtable): table resource name as a class (#9377)
  • feat(bigtable): instance name as a class (#9374)
  • feat(bigtable): introduce MockDataConnection and MakeTestRowReader (#9335)
  • feat(bigtable): introduce DataConnection (#9323)
  • feat(bigtable): modern Data API policy options (#9320)

Pub/Sub

  • doc(pubsub): improve documentation for *AckHandler (#9404)
  • feat(pubsub): update subscription builders (#9326)

Common Libraries

  • fix(generator): handle explicit routing params for nested fields (#9408)
  • feat(common): truncation support for plain strings in the RPC log (#9351)

New Libraries

We are introducing a new client library. While we do not anticipate any API
changes to this library before declaring it GA, we are releasing it early in
case it elicits some feedback that requires changes.