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

ARROW-3180: [C++] Add docker-compose setup to simulate Travis CI run locally #2572

Closed
wants to merge 19 commits into from

Conversation

kszucs
Copy link
Member

@kszucs kszucs commented Sep 16, 2018

Also resolves:

ARROW-3078: [Python] Docker integration tests should not contaminate the local Python development environment

Working:

  • rust
  • go
  • c_glib
  • ruby
  • java
  • cpp
  • python
  • hdfs integration

The rest:

  • js (gulp error...)
  • matlab
  • R
  • dask integration
  • spark integration
  • gen_apidocs
  • hiveserver2
  • iwyu

Perhaps resolve them in follow-up PRs.

@kszucs kszucs added WIP PR is work in progress and removed WIP PR is work in progress labels Sep 16, 2018
@kszucs
Copy link
Member Author

kszucs commented Sep 17, 2018

@wesm could You take a look at this docker-compose setup?

Executing python tests: docker-compose run python
Executing cpp tests: docker-compose run cpp
Executing c_glib tests: docker-compose run c_glib
Executing hdfs tests: docker-compose run hdfs-integration
etc.

It's also possible to mount arrow externally for an editable setup:

docker-compose run -v local/path/to/arrow:/arrow python

Additionally docker-compose up runs all of the containers in parallel (discouraged of course, because it doesn't stop the hdfs containers).

Ideally "the rest" of the containers should be ported too.

@wesm
Copy link
Member

wesm commented Sep 18, 2018

@kszucs thanks a lot for working on this. I will take it for a spin when I can and report back feedback

@kszucs
Copy link
Member Author

kszucs commented Sep 19, 2018

Sadly we can't chain the builds to depend on each other purely with docker compose e.g.: conda -> cpp -> c_glib -> ruby, so chaining builds in a Makefile would improve the build times.

@kszucs
Copy link
Member Author

kszucs commented Sep 19, 2018

TODO: crossbow should have its own image

@wesm
Copy link
Member

wesm commented Sep 24, 2018

I'm working on code reviews, but hope to get to this soon

Copy link
Member

@wesm wesm left a comment

Choose a reason for hiding this comment

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

+1, thanks, this is good progress modularizing these dockerfiles! I think the hope of getting everything 100% working on one patch is a lot to ask, but we can work toward it in follow-up PRs. Will merge once the build passes

@xhochy
Copy link
Member

xhochy commented Sep 29, 2018

We should add a small word about these files to the docs.

@xhochy
Copy link
Member

xhochy commented Sep 29, 2018

The JS build fails for me:

(node:81) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead.
[10:20:45] The following tasks did not complete: build, build:apache-arrow, build:es5:umd, build:es2015:umd, build:esnext:umd, <parallel>, build:es5:umd, build:es2015:umd, build:es2015:umd:task, build:es2015:umd:task, build:esnext:umd:task, build:es5:umd:task, build:es5:umd:task
[10:20:45] Did you forget to signal async completion?
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! apache-arrow@0.3.0 build: `gulp build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the apache-arrow@0.3.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-09-29T10_20_45_774Z-debug.log

@wesm
Copy link
Member

wesm commented Sep 29, 2018

He mentioned that the JS build is broken in the PR description

@kszucs
Copy link
Member Author

kszucs commented Sep 29, 2018

Well, I'm a JS noob :)

Strange that the js build works outside of the docker container, I've tried to tune the dockerignore file to include all required packaging files in the image, but sadly with no luck.

Created issues for the follow-up tasks:

@kszucs
Copy link
Member Author

kszucs commented Sep 29, 2018

@wesm @xhochy ready for merge

@xhochy
Copy link
Member

xhochy commented Sep 30, 2018

The Plasma tests all fail for me, I tried adding shm_size to the compose file but it seems to be ignored:

diff --git a/docker-compose.yml b/docker-compose.yml
index 93ec11ac..394d3fda 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -15,7 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.

-version: '3'
+version: '3.5'
 services:

   # we can further improve the caching mechanism for go rust and js via
@@ -59,6 +59,7 @@ services:
     build:
       context: .
       dockerfile: python/Dockerfile
+      shm_size: '2gb'
       args:
         PYTHON_VERSION: ${PYTHON_VERSION:-3.6}

@kszucs
Copy link
Member Author

kszucs commented Sep 30, 2018

It indeed ignores shm_size. What's your docker engine? Are You using docker on mac or docker-machine?

@xhochy
Copy link
Member

xhochy commented Sep 30, 2018

Docker on mac: 18.06.1-ce-mac73

@xhochy
Copy link
Member

xhochy commented Sep 30, 2018

When running the manylinux images using docker run --shm-size… it works.

@kszucs
Copy link
Member Author

kszucs commented Sep 30, 2018

Same for me, it can be a docker on mac issue. I'm spinning up a linux box...


python:
image: arrow:python-${PYTHON_VERSION:-3.6}
shm_size: 2G
Copy link
Member Author

@kszucs kszucs Sep 30, 2018

Choose a reason for hiding this comment

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

@xhochy docker has a "great" documentation, it should't be placed under build

Copy link
Member

Choose a reason for hiding this comment

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

🙈

Copy link
Member

@xhochy xhochy left a comment

Choose a reason for hiding this comment

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

+1, Python tests now also pass for me.

@kszucs
Copy link
Member Author

kszucs commented Sep 30, 2018

Cool!

@kszucs
Copy link
Member Author

kszucs commented Sep 30, 2018

@xhochy CI error is related to the wheel issue

@codecov-io
Copy link

Codecov Report

Merging #2572 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2572      +/-   ##
==========================================
+ Coverage   87.22%   87.23%   +0.01%     
==========================================
  Files         381      381              
  Lines       59431    59432       +1     
==========================================
+ Hits        51836    51847      +11     
+ Misses       7521     7515       -6     
+ Partials       74       70       -4
Impacted Files Coverage Δ
python/pyarrow/tests/test_parquet.py 97.41% <100%> (ø) ⬆️
go/arrow/math/float64_sse4_amd64.go 0% <0%> (-100%) ⬇️
go/arrow/math/uint64_sse4_amd64.go 0% <0%> (-100%) ⬇️
go/arrow/memory/memory_sse4_amd64.go 0% <0%> (-100%) ⬇️
go/arrow/math/int64_sse4_amd64.go 0% <0%> (-100%) ⬇️
go/arrow/math/float64_amd64.go 33.33% <0%> (ø) ⬆️
go/arrow/math/int64_amd64.go 33.33% <0%> (ø) ⬆️
go/arrow/math/uint64_amd64.go 33.33% <0%> (ø) ⬆️
go/arrow/math/math_amd64.go 36.84% <0%> (+5.26%) ⬆️
go/arrow/memory/memory_amd64.go 42.85% <0%> (+14.28%) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 74e98f8...41cd810. Read the comment docs.

@wesm wesm closed this in 1649864 Sep 30, 2018
@wesm
Copy link
Member

wesm commented Sep 30, 2018

Thanks everyone. This will help a lot

kszucs pushed a commit that referenced this pull request Nov 18, 2018
Thank you to @romainfrancois and others who have pushed forward the R side of this project!

This PR is my attempt to address [ARROW-3336](https://issues.apache.org/jira/projects/ARROW/issues/ARROW-3366), providing a testing container for the R package.

This follows up on work done by @kszucs in #2572 in an R-specific way.

**NOTE:**  This PR is a WIP. `R CMD INSTALL` currently fails because it cannot find wherever I installed `arrow` to. But I felt that this is far enough along to put up for review.

Author: James Lamb <jaylamb20@gmail.com>
Author: Krisztián Szűcs <szucs.krisztian@gmail.com>

Closes #2770 from jameslamb/r_dockerfile and squashes the following commits:

9fcebe5 <James Lamb> removed failing test in the R package
dd26d4b <James Lamb> fixed failing test in the R package
343456a <James Lamb> more changes
0db3369 <James Lamb> added bit64 dependency to R package
f7c050e <Krisztián Szűcs> R_CHECK_FORCE_SUGGESTS
db9ee5b <Krisztián Szűcs> pass CXXFLAGS
8a8376d <James Lamb> Put R build steps into a separate CI script
64ea840 <James Lamb> Updated LD_LIBRARY_PATH in R container
4d7f02c <James Lamb> fixed a few issues in R container
94242b3 <James Lamb> Add explict cpp build in usage for R docker-compose
4a7112b <James Lamb> Fixed comment text in R Dockerfile
d8e55d7 <James Lamb> removed todo about R containers in docker-compose
210a774 <James Lamb> ARROW-3366:  Dockerfile for docker-compose setup
Sign up for free to 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.

4 participants