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

Bigtable emulator does not support ARM #677

Closed
chingor13 opened this issue Mar 16, 2021 · 10 comments
Closed

Bigtable emulator does not support ARM #677

chingor13 opened this issue Mar 16, 2021 · 10 comments
Labels
api: bigtable Issues related to the googleapis/java-bigtable API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@chingor13
Copy link
Collaborator

It looks the the emulator only works on x64 architectures for Linux, OSX, and Windows.

@product-auto-label product-auto-label bot added the api: bigtable Issues related to the googleapis/java-bigtable API. label Mar 16, 2021
@suztomo
Copy link
Member

suztomo commented Mar 16, 2021

Memo for the error

~/suztomo/java-bigtable/google-cloud-bigtable-emulator$ mvn test -DtrimStackTrace=false  -Dtest=com.google.cloud.bigtable.emulator.v2.EmulatorTest 

...
INFO] Running com.google.cloud.bigtable.emulator.v2.EmulatorTest
[ERROR] Tests run: 4, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 0.042 s <<< FAILURE! - in com.google.cloud.bigtable.emulator.v2.EmulatorTest
[ERROR] com.google.cloud.bigtable.emulator.v2.EmulatorTest.testDataClient  Time elapsed: 0.016 s  <<< ERROR!
java.lang.UnsupportedOperationException: Unsupported architecture: aarch64
	at com.google.cloud.bigtable.emulator.v2.Emulator.getBundledResourcePath(Emulator.java:236)
	at com.google.cloud.bigtable.emulator.v2.Emulator.createBundled(Emulator.java:65)
	at com.google.cloud.bigtable.emulator.v2.EmulatorTest.setUp(EmulatorTest.java:49)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...

From Emulator.java:

    String unformattedArch = System.getProperty("os.arch");
    String arch;

    switch (unformattedArch) {
      case "x86":
        arch = "x86";
        break;
      case "x86_64":
      case "amd64":
        arch = "x86_64";
        break;
      default:
        throw new UnsupportedOperationException("Unsupported architecture: " + unformattedArch);
    }

    return String.format(
        "/gcloud/bigtable-%s-%s/platform/bigtable-emulator/cbtemulator%s", os, arch, suffix);

@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Mar 17, 2021
@crwilcox crwilcox added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. priority: p3 Desirable enhancement or fix. May not be included in next release. and removed triage me I really want to be triaged. labels Mar 22, 2021
@kolea2 kolea2 removed the 🚨 This issue needs some love. label Mar 22, 2021
@igorbernstein2
Copy link
Contributor

We need to start publishing aarch64 to gcloud sdk and then we can update this wrapper

@tkaymak
Copy link

tkaymak commented Aug 13, 2021

Is the publishing on the horizon? <3

@liufuyang
Copy link

Any update and temproray solutions for this?

This is what I see if I try to run gcloud beta emulators bigtable start

WARNING: The ARM versions of the components [bigtable] are not available yet. To download and execute the x86_64 version of the components, please install Rosetta 2 first by running the command: softwareupdate --install-rosetta.
ERROR: (gcloud.beta.emulators.bigtable.start) The following components are unknown [bigtable].

@alejandrolujan
Copy link

Any updates on this? Is there a plan to release an ARM-compatible emulator? Any timelines?

Shopify is moving all of its engineers to Apple M1 laptops and this is blocking several repositories from being compatible with the ARM architecture.

@rameshdharan
Copy link
Contributor

Hi @liufuyang and @alejandrolujan, we can confirm that the emulator update for ARM64 (macOS and Linux) is complete, and should be included in a gcloud SDK release happening soon (currently I'd expect this to release in mid-December).

You can follow the Cloud SDK release notes here, and the ARM emulator update will be noted there once included in the release:
https://cloud.google.com/sdk/docs/release-notes

As a workaround I believe It's possible to manually build the emulator (it's OSS) with a golang SDK and then put the binary in the right place but I have not tried it - though since the emulator is releasing shortly you may just want to wait for it rather than trying such workarounds?

@sap1ens
Copy link

sap1ens commented Dec 6, 2021

Hey @rameshdharan, thanks for the update! I assume this library will be updated at the same time? We don't use the SDK, but this library directly.

@rameshdharan
Copy link
Contributor

@sap1ens yes, thanks for mentioning that - I believe we will still need to (trivially) update this library shortly thereafter; specifically AIUI the google-cloud-bigtable-emulator's pom.xml will need to include bigtable-darwin-arm and bigtable-linux-arm in the <componentNames> section, and that will start working once the components are released (via the Cloud SDK release).

rameshdharan added a commit to rameshdharan/java-bigtable that referenced this issue Dec 7, 2021
@meredithslota
Copy link

Confirming that it looks like ARM64 support was added in the emulator in late 2021: https://cloud.google.com/sdk/docs/release-notes#36700_2021-12-14 so this should be unblocked now.

@caseyduquettesc
Copy link

Seems like it was fixed? #1094

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. priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests