fix(bigtable)!: pass app profile id to connection as options #9388
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #9349
This tedious PR does two things:
Table::options_
instead ofTable::app_profile_id_
. (Note thatoptions_
is already passed in anOptionsSpan
for each RPC). Legacy uses ofapp_profile_id_
becomeapp_profile_id()
.std::string const& app_profile_id
from the Connection methods. We set upOptionsSpan
s in the Connection unit tests so we can verify that all RPCs set a request'sapp_profile_id
field.While this is a breaking change at HEAD, the methods are less than 2 weeks old and have not been included in a release yet. The upside of this change is that the method signature of the Connection is closer to that of the Table. And it's nice to have one less field to type.
My apologies for not validating the Table API surface before writing all the connection code.
Also, I decided not to perpetuate the
if-call-options-use-call-options-else-use-conn-options
logic. As @devbww pointed out earlier, the connection options are set once. They are merged into the client options. The client options are merged into the call options. So it must be the case that either the call options have a given option, or that neither the call options nor the connection options have a given option. Therefore, we should just use the call options.This change is