Skip to content
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

fix: align ip version preference for the wrapped emulator #1052

Merged
merged 4 commits into from
Jan 5, 2022

Conversation

igorbernstein2
Copy link
Contributor

When the emulator wrapper is started with -Djava.net.preferIPv6Addresses=true on a machine that defaults to ipv4,
the golang emulator and the java client will pick different ip stacks and not be able to connect. This change will
use java to resolve the localhost's ip address and push it down to the golang emulator

When the  emulator wrapper is started with -Djava.net.preferIPv6Addresses=true on a machine that defaults to ipv4,
the golang emulator and the java client will pick different ip stacks and not be able to connect. This change will
use java to resolve the localhost's ip address and push it down to the golang emulator
@igorbernstein2 igorbernstein2 requested a review from a team as a code owner October 28, 2021 20:31
@product-auto-label product-auto-label bot added the api: bigtable Issues related to the googleapis/java-bigtable API. label Oct 28, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 28, 2021
@igorbernstein2 igorbernstein2 requested a review from kolea2 October 28, 2021 20:31
@@ -242,6 +259,13 @@ private static String getBundledResourcePath() {

/** Gets a random open port number. */
private static int getAvailablePort() {
try {
InetAddress moo = InetAddress.getByName(null);
System.out.println(moo);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like some cleanup needed here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well thats just embarrassing 😳

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be good now

kolea2
kolea2 previously requested changes Oct 28, 2021
Copy link
Contributor

@kolea2 kolea2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a test with that system property at both true and false to ensure it passes?

@igorbernstein2 igorbernstein2 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 4, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 4, 2022
@igorbernstein2
Copy link
Contributor Author

We basically have those tests already ... mac os kokoro jobs set the flag and everything else doesnt. And I dont think its worth adding more kokoro jobs for this

@kolea2 kolea2 dismissed their stale review January 4, 2022 17:32

comments addressed

@igorbernstein2 igorbernstein2 added the automerge Merge the pull request once unit tests and other checks pass. label Jan 4, 2022
@mutianf mutianf added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 4, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 4, 2022
@gcf-merge-on-green
Copy link

Merge-on-green attempted to merge your PR for 6 hours, but it was not mergeable because either one of your required status checks failed, one of your required reviews was not approved, or there is a do not merge label. Learn more about your required status checks here: https://help.github.com/en/github/administering-a-repository/enabling-required-status-checks. You can remove and reapply the label to re-run the bot.

@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Jan 5, 2022
@mutianf mutianf merged commit 9dc93c5 into googleapis:main Jan 5, 2022
gcf-merge-on-green bot pushed a commit that referenced this pull request Jan 5, 2022
🤖 I have created a release \*beep\* \*boop\*
---
## [2.5.0](https://www.github.com/googleapis/java-bigtable/compare/v2.4.0...v2.5.0) (2022-01-05)


### Features

* add batch throttled ms metric ([#888](https://www.github.com/googleapis/java-bigtable/issues/888)) ([0d197a5](https://www.github.com/googleapis/java-bigtable/commit/0d197a5ab9b7ccd20091c1c6c4a794586d6a51dc))
* ARM support for gcloud bigtable emulator ([#1094](https://www.github.com/googleapis/java-bigtable/issues/1094)) ([d3cb4a4](https://www.github.com/googleapis/java-bigtable/commit/d3cb4a4e03ae0f7e065bfee06ac8e3b86b447a4a))


### Bug Fixes

* align ip version preference for the wrapped  emulator ([#1052](https://www.github.com/googleapis/java-bigtable/issues/1052)) ([9dc93c5](https://www.github.com/googleapis/java-bigtable/commit/9dc93c5c9372f1501006e2d3a3a7affecd65fb8e))
* remove stats from javadoc ([#1108](https://www.github.com/googleapis/java-bigtable/issues/1108)) ([33fe7fe](https://www.github.com/googleapis/java-bigtable/commit/33fe7fe162cf84339e1887b052e446ef0aaf19d6))
* remove tracking latency from channel priming requests ([#1082](https://www.github.com/googleapis/java-bigtable/issues/1082)) ([bd873bc](https://www.github.com/googleapis/java-bigtable/commit/bd873bc82f0b210312fd442678c801758291935e))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
mutianf pushed a commit to mutianf/java-bigtable that referenced this pull request Mar 18, 2022
…#1052)

* fix: align ip version preference for the wrapped  emulator

When the  emulator wrapper is started with -Djava.net.preferIPv6Addresses=true on a machine that defaults to ipv4,
the golang emulator and the java client will pick different ip stacks and not be able to connect. This change will
use java to resolve the localhost's ip address and push it down to the golang emulator

* remove debug

* whitespace
mutianf pushed a commit to mutianf/java-bigtable that referenced this pull request Mar 18, 2022
🤖 I have created a release \*beep\* \*boop\*
---
## [2.5.0](https://www.github.com/googleapis/java-bigtable/compare/v2.4.0...v2.5.0) (2022-01-05)


### Features

* add batch throttled ms metric ([googleapis#888](https://www.github.com/googleapis/java-bigtable/issues/888)) ([0d197a5](https://www.github.com/googleapis/java-bigtable/commit/0d197a5ab9b7ccd20091c1c6c4a794586d6a51dc))
* ARM support for gcloud bigtable emulator ([googleapis#1094](https://www.github.com/googleapis/java-bigtable/issues/1094)) ([d3cb4a4](https://www.github.com/googleapis/java-bigtable/commit/d3cb4a4e03ae0f7e065bfee06ac8e3b86b447a4a))


### Bug Fixes

* align ip version preference for the wrapped  emulator ([googleapis#1052](https://www.github.com/googleapis/java-bigtable/issues/1052)) ([9dc93c5](https://www.github.com/googleapis/java-bigtable/commit/9dc93c5c9372f1501006e2d3a3a7affecd65fb8e))
* remove stats from javadoc ([googleapis#1108](https://www.github.com/googleapis/java-bigtable/issues/1108)) ([33fe7fe](https://www.github.com/googleapis/java-bigtable/commit/33fe7fe162cf84339e1887b052e446ef0aaf19d6))
* remove tracking latency from channel priming requests ([googleapis#1082](https://www.github.com/googleapis/java-bigtable/issues/1082)) ([bd873bc](https://www.github.com/googleapis/java-bigtable/commit/bd873bc82f0b210312fd442678c801758291935e))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the googleapis/java-bigtable API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants