Skip to content

ZEPPELIN-5543 Use TravisCI for testing on Linux ARM64 - #4243

Closed
martin-g wants to merge 3 commits into
apache:masterfrom
martin-g:use-travis-ci-for-linux-arm64
Closed

ZEPPELIN-5543 Use TravisCI for testing on Linux ARM64#4243
martin-g wants to merge 3 commits into
apache:masterfrom
martin-g:use-travis-ci-for-linux-arm64

Conversation

@martin-g

@martin-gmartin-g commented Oct 5, 2021

Copy link
Copy Markdown
Member

What is this PR for?

Build and test on Linux ARM64 at TravisCI.
It uses Partner Queue Solution at Equinix Metal ARM64 nodes, so the jobs do not consume build credits!

The PR is based on the latest version of .travis.yml from branch-0.9 and the Miniconda3 with Python 3.8 with the packages listed in testing/env_python_3.8_with_R.yml

What type of PR is it?

Improvement

Todos

testSharedInterpreter(org.apache.zeppelin.livy.LivyInterpreterIT) Time elapsed: 26.146 sec <<< FAILURE!
java.lang.AssertionError: %text No module named matplotlib.pyplot
Traceback (most recent call last):
ImportError: No module named matplotlib.pyplot
expected:<SUCCESS> but was:<ERROR>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:834)
at org.junit.Assert.assertEquals(Assert.java:118)
at org.apache.zeppelin.livy.LivyInterpreterIT.testSharedInterpreter(LivyInterpreterIT.java:807)
INFO [2021-10-05 09:37:15,548] ({Thread-0} Logging.scala[info]:39) - Shutting down cluster pool.
Results :
Failed tests: LivyInterpreterIT.testSharedInterpreter:807 %text No module named matplotlib.pyplot
Traceback (most recent call last):
ImportError: No module named matplotlib.pyplot
expected:<SUCCESS> but was:<ERROR>

What is the Jira issue?

How should this be tested?

  • Make sure that the build at TravisCI passes!

Questions:

  • Does the licenses files need update? - NO
  • Is there breaking changes for older versions? - NO
  • Does this needs documentation? - Update the How to contribute documents to mention that Linux ARM64 is being tested

@zjffdu

Copy link
Copy Markdown
Contributor

#4237 is merged, @martin-g Could you rebase this PR ?

@martin-g

Copy link
Copy Markdown
MemberAuthor

@zjffdu I've rebased the branch but I don't see the TravisCI check. Should it be enabled manually via GitHub UI ?!

@zjffdu

zjffdu commented Oct 14, 2021

Copy link
Copy Markdown
Contributor

@martin-g Have you tried use travis CI for your forked zeppelin repo first ?
https://docs.travis-ci.com/user/tutorial/#to-get-started-with-travis-ci-using-github

@martin-g

Copy link
Copy Markdown
MemberAuthor

Yes! It works fine on my fork!
Let me investigate!

@martin-g

Copy link
Copy Markdown
MemberAuthor

Apache Infra team enabled it: https://issues.apache.org/jira/browse/INFRA-22411

@martin-g
martin-g marked this pull request as draft October 14, 2021 18:01
@martin-g

Copy link
Copy Markdown
MemberAuthor

I've started working few times on this PR but the build is very unstable on Travis.
Part of the reason is also that I don't quite get the build setup. As a Maven project I expect that mvn clean install should do everything that is needed. But it fails because some Maven modules cannot find other modules. One has to mvn install -DskipTests first and then execute mvn test in a second pass.

Last Thursday there was a meeting with Apache Infra where we discussed how we could use Linux ARM64 build nodes for Github Actions CI. The idea is to use self-hosted Linux ARM64 runner + custom Github Action runner with security enhancements to prevent abuses from contributors. Also see https://cwiki.apache.org/confluence/display/INFRA/GitHub+-+self-hosted+runners
This way Zeppelin will continue using just Github Actions as a CI.
I'll let you know once I have a working POC!

@zjffdu

Copy link
Copy Markdown
Contributor

Thanks @martin-g

@martin-g

Copy link
Copy Markdown
MemberAuthor

@zjffdu I've documented the approach at https://martin-grigorov.medium.com/github-actions-arm64-runner-on-oracle-cloud-a77cdf7a325a
If you are interested in this solution then you will need to contact Apache Infra for the token needed by ./config.sh and to setup the security/approvals. Everything else could be done by any member of the Zeppelin team!

@martin-g

Copy link
Copy Markdown
MemberAuthor

@zjffdu Did you have a chance to take a look at the GitHub Actions self-hosted runners on Oracle Cloud approach ?

@zjffdu

Copy link
Copy Markdown
Contributor

Sorry for late response @martin-g , this approach LGTM, have you tried to build Zeppelin in oracle cloud?

@martin-g

Copy link
Copy Markdown
MemberAuthor

I haven't tried yet!
Before I do it I want to explain something that was a stopper for another project:

When creating an account at Oracle Cloud (OCI) they will ask you for a credit card details. It won't be charged if you use the Free Tier (and this is enough for testing on ARM64)! But if you want to share this OCI account with the rest of the Zeppelin team then this might be problematic, because someone may add a paid resource to the account and OCI will start charging your card!

If the above is a problem for Zeppelin too then I could offer you a VM donated by my employer (OpenLab Testing) that could be used the same way!

@martin-g

Copy link
Copy Markdown
MemberAuthor

I've setup 4 self-hosted runners on my ARM64 VM at Oracle Cloud.
With https://github.com/martin-g/zeppelin/pull/1/files I've started using them.
But there is a problem with Miniconda: https://github.com/martin-g/zeppelin/runs/4507098156?check_suite_focus=true

Error: No installed conda 'base' enviroment found at 

I've asked for help at conda-incubator/setup-miniconda#203 (comment)

@zjffdu

Copy link
Copy Markdown
Contributor

Thanks for your update @martin-g

@zjffdu

Copy link
Copy Markdown
Contributor

I haven't tried yet! Before I do it I want to explain something that was a stopper for another project:

When creating an account at Oracle Cloud (OCI) they will ask you for a credit card details. It won't be charged if you use the Free Tier (and this is enough for testing on ARM64)! But if you want to share this OCI account with the rest of the Zeppelin team then this might be problematic, because someone may add a paid resource to the account and OCI will start charging your card!

If the above is a problem for Zeppelin too then I could offer you a VM donated by my employer (OpenLab Testing) that could be used the same way!

This is indeed a problem, it would be great if your employer can help with that.

@martin-g

Copy link
Copy Markdown
MemberAuthor

OK! I will request a VM for Zeppelin project!

In the meantime I have started testing at OracleCloud with Github Actions self-hosted runner and I've found some issues with setup-miniconda action but I was able to work them around!
The latest state could be seen at https://github.com/martin-g/zeppelin/runs/4560861885?check_suite_focus=true:

Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.452 sec <<< FAILURE! - in org.apache.zeppelin.notebook.repo.MongoNotebookRepoTest
testGetNotePath(org.apache.zeppelin.notebook.repo.MongoNotebookRepoTest) Time elapsed: 0.198 sec <<< ERROR!
java.lang.IllegalArgumentException: this version does not support 32Bit: PRODUCTION:Linux:B32

Embedded Mongo supports Linux ARM64 since recently: flapdoodle-oss/de.flapdoodle.embed.mongo#343

I will open new PRs for the new improvements!

asfgit pushed a commit that referenced this pull request Jan 6, 2022
…s Linux ARM64
### What is this PR for?
Update the version of Embedded Mongo to a new version that supports Linux ARM64.
Also update the version of Mongo driver
### What type of PR is it?
Improvement
### Todos
No,
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-5615
### How should this be tested?
* The build and tests should pass on Linux ARM64 once it is enabled. See #4243
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? - NO
* Is there breaking changes for older versions? - NO
* Does this needs documentation? - NO
Author: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
Closes#4276 from martin-g/update-embedded-mongo and squashes the following commits:
61a98c0 [Martin Tzvetanov Grigorov] ZEPPELIN-5615 Update the version of mongo-java-driver in bin_license/LICENSE
fd6e563 [Martin Tzvetanov Grigorov] ZEPPELIN-5615 Update the version of mongo-java-driver in bin_license/LICENSE
17af869 [Martin Tzvetanov Grigorov] ZEPPELIN-5615 Fix the build. Use the new APIs
342442f [Martin Tzvetanov Grigorov] ZEPPELIN-5615 Update flapdoodle-mongo to a newer version that supports Linux ARM64
zlosim pushed a commit to zlosim/zeppelin that referenced this pull request Feb 3, 2022
…s Linux ARM64
### What is this PR for?
Update the version of Embedded Mongo to a new version that supports Linux ARM64.
Also update the version of Mongo driver
### What type of PR is it?
Improvement
### Todos
No,
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-5615
### How should this be tested?
* The build and tests should pass on Linux ARM64 once it is enabled. See apache#4243
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? - NO
* Is there breaking changes for older versions? - NO
* Does this needs documentation? - NO
Author: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
Closesapache#4276 from martin-g/update-embedded-mongo and squashes the following commits:
61a98c0 [Martin Tzvetanov Grigorov] ZEPPELIN-5615 Update the version of mongo-java-driver in bin_license/LICENSE
fd6e563 [Martin Tzvetanov Grigorov] ZEPPELIN-5615 Update the version of mongo-java-driver in bin_license/LICENSE
17af869 [Martin Tzvetanov Grigorov] ZEPPELIN-5615 Fix the build. Use the new APIs
342442f [Martin Tzvetanov Grigorov] ZEPPELIN-5615 Update flapdoodle-mongo to a newer version that supports Linux ARM64
@zjffdu

Copy link
Copy Markdown
Contributor

@martin-g Are you still working on it?

@martin-g

Copy link
Copy Markdown
MemberAuthor

I was waiting for d8d18f5 to be merged.
I will resume/restart my work on this in the coming days!

@martin-g

Copy link
Copy Markdown
MemberAuthor

Closing this PR because TravisCI won't be used.
I will work on self-hosted runner for Github Actions.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@martin-g@zjffdu