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 NullPointerException on QEMU #5199

Merged
merged 1 commit into from May 2, 2018

Conversation

Projects
None yet
2 participants
@alexandrebouthinon
Contributor

alexandrebouthinon commented Apr 27, 2018

Iterate only if Enumeration is not null

Context

I'm working on a cross plateform CI using Docker and QEMU.
And when I tried to run a gradle build it fail with that error caused by a NPE :

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine a usable local IP for this machine.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
/go/src/github.com/kuzzleio/sdk-go

This is due to the fact that my container runs inside a ARMV7 QEMU VM.

After applying this little fix and rebuild gradle, I was able to build and run tests for my project inside .

Step to reproduce bug

  • Have docker installed on a AMD64 desktop.
  • Run docker run --rm --privileged multiarch/qemu-user-static:register to enable Docker QEMU support.
  • Download Kuzzle SDK Go
  • Checkout to branch test-automation
  • Then run docker run --rm --name build-machine --privileged --mount type=bind,source="$(pwd)",target=/go/src/github.com/kuzzleio/sdk-go kuzzleio/sdk-cross:armv7 /build.sh
Fix NPE on QEMU
Iterate only if Enumeration is not null

Signed-off-by: Alexandre Bouthinon <bouthinon.alexandre@gmail.com>

@alexandrebouthinon alexandrebouthinon changed the title from Fix NPE on QEMU to Fix NullPointerException on QEMU Apr 27, 2018

@blindpirate blindpirate merged commit 1569e60 into gradle:master May 2, 2018

7 checks passed

Branch Build Accept (Trigger) (Check) TeamCity build finished
Details
DCO All commits have a DCO sign-off from the author
Details
Performance Test Coordinator - Linux (Branch Build Accept) TeamCity build finished
Details
Quick Feedback (Trigger) (Check) TeamCity build finished
Details
Quick Feedback - Linux Only (Trigger) (Check) TeamCity build finished
Details
Sanity Check (Quick Feedback - Linux Only) TeamCity build finished
Details
WIP ready for review
Details
@blindpirate

This comment has been minimized.

Member

blindpirate commented May 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment