google-cloud-cpp icon indicating copy to clipboard operation
google-cloud-cpp copied to clipboard

Consider dropping or simplifying `ConnectionImpl::*_policy()` getters

Open dbolduc opened this issue 3 years ago • 1 comments

We do not need the else branch that uses the connection's options_ in this code: https://github.com/googleapis/google-cloud-cpp/blob/292265193edcbe6737cde4053145610a5f3e267d/google/cloud/tpu/internal/tpu_connection_impl.h#L89-L119

These policy options are defaulted in the connection, and passed back to the client. This means that any OptionsSpan the client creates will have the policy options we should use present.

We may need to update some unit tests for the ConnectionImpls which do not have a client present to create such a span.

dbolduc avatar Jun 06 '22 00:06 dbolduc

We may need to update some unit tests for the ConnectionImpls which do not have a client present to create such a span.

For the record, here is the comment that describes the current behavior of those tests.

https://github.com/googleapis/google-cloud-cpp/blob/292265193edcbe6737cde4053145610a5f3e267d/generator/internal/connection_impl_generator.cc#L113-L117

devbww avatar Jun 06 '22 08:06 devbww

@dbolduc thinks there is not enough value. Closing.

coryan avatar Jan 11 '23 19:01 coryan

This is now fixed.

coryan avatar Aug 19 '23 22:08 coryan