New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allow DirectPath by default + update integration tests #3031
feat: allow DirectPath by default + update integration tests #3031
Conversation
igorbernstein2
commented
Jun 23, 2021
- DirectPath is now opt-out by setting google.bigtable.direct.path.allowed to false
- Integration tests can now verify that they are running over the desired mode by specifying "bigtable.connection-mode" system property
- Integration tests update their user agent to signal membership in allow/deny lists
- DirectPathFallbackIT now supports IPv4
...arent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableSession.java
Show resolved
Hide resolved
...able-hbase/src/main/java/com/google/cloud/bigtable/hbase/util/IpVerificationInterceptor.java
Show resolved
Hide resolved
...ent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/BigtableOptionsFactory.java
Outdated
Show resolved
Hide resolved
* DirectPath is now opt-out by setting google.bigtable.direct.path.allowed to false * Integration tests can now verify that they are running over the desired mode by specifying "bigtable.connection-mode" system property * Integration tests update their user agent to signal membership in allow/deny lists * DirectPathFallbackIT now supports IPv4
c935655
to
414e5f7
Compare
...arent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableSession.java
Show resolved
Hide resolved
...gration-tests-common/src/test/java/com/google/cloud/bigtable/hbase/test_env/BigtableEnv.java
Show resolved
Hide resolved
public Boolean get() { | ||
String osName = System.getProperty("os.name"); | ||
if ("Linux".equals(osName)) { | ||
String cmd = "cat /sys/class/dmi/id/product_name"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drive-by:
why cat
and then read the output? That file (if it exists) /sys/class/dmi/id/produc_name
can be opened like any other file.
Also: I think this won't work on GKE, the containers in that case run without the necessary permissions to read that file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are excellent points. I was trying to keep consistent with all of the other java clients:
googleapis/gax-java#1250
It seems like that file is accessible in gke:
https://github.com/googleapis/gax-java/pull/1250/files/cf494cef60f4d9ef265e5b4690ebe3cb49537893#r589861385
I'll update both libraries to simply read the file w/o exec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooops, my recollection was wrong regarding GKE, it was Cloud Run and gVisor, but that may have changed again:
googleapis/google-cloud-cpp#3959
For these purposes it might not matter because using Direct Path with Cloud Run might not be that useful or important. If you are ever interested in supporting Windows, I wrote the code a long time ago for that:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pointer. Though registry access from java is a tough pill to swallow.
🤖 I have created a release \*beep\* \*boop\* --- ## [1.22.0](https://www.github.com/googleapis/java-bigtable-hbase/compare/v1.21.1...v1.22.0) (2021-06-30) ### Features * allow DirectPath by default + update integration tests ([#3031](https://www.github.com/googleapis/java-bigtable-hbase/issues/3031)) ([7c33b14](https://www.github.com/googleapis/java-bigtable-hbase/commit/7c33b14362614be0f2d3ad0b5cc95fa70f6a9add)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
…pis#3031) * chore: delete deprecate connection methods * feat: allow DirectPath by default + update integration tests * DirectPath is now opt-out by setting google.bigtable.direct.path.allowed to false * Integration tests can now verify that they are running over the desired mode by specifying "bigtable.connection-mode" system property * Integration tests update their user agent to signal membership in allow/deny lists * DirectPathFallbackIT now supports IPv4 * disable dns service config lookup * format * format * copyright * fix directpath regex * skip shell exec for reading files * fix direct path credential probing
🤖 I have created a release \*beep\* \*boop\* --- ## [1.22.0](https://www.github.com/googleapis/java-bigtable-hbase/compare/v1.21.1...v1.22.0) (2021-06-30) ### Features * allow DirectPath by default + update integration tests ([googleapis#3031](https://www.github.com/googleapis/java-bigtable-hbase/issues/3031)) ([7c33b14](https://www.github.com/googleapis/java-bigtable-hbase/commit/7c33b14362614be0f2d3ad0b5cc95fa70f6a9add)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).