-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[CI] Use out-of-source build for all languages in Docker build #41429
Comments
Why is this needed to do an out-of-source build? Is that only relevant for artifacts that are generated we want to move out of the docker image later, like documentation artifact? But in that case, another solution can also be to only ensure those artifacts are generated outside of the source? |
Oh, sorry. I had a typo in the description: -We should use out-of-source build to create files in source tree on host.
+We should use out-of-source build to avoid creating files in source tree on host. It's for avoiding creating files in source tree on host. If files are created in Docker container, |
For Python dev versions were we extract the version based on the |
I understood that. But my question is still: why is that needed in practice (except for artifacts like docs)? You mention "They can't be removed by a normal user. It may break a build on host.", but did we have such issues in the past? (it has been done in-source forever) As Raúl mentions, this is quite annoying for the python build which assumes to be either in the git repo, or otherwise built from an sdist which has the version encoded in its files (but so not from a plain copy of the sources) |
I can't remember details but I had some problems when I use We can map uid:gid but is there any portable way for it? I hope that it's enabled by default. #41041 has the diff --git a/ci/scripts/python_build.sh b/ci/scripts/python_build.sh
index 9455baf353..80fd417644 100755
--- a/ci/scripts/python_build.sh
+++ b/ci/scripts/python_build.sh
@@ -25,6 +25,8 @@ build_dir=${2}
source_dir=${arrow_dir}/python
python_build_dir=${build_dir}/python
+export GIT_DIR=${arrow_dir}
+
: ${BUILD_DOCS_PYTHON:=OFF}
if [ -x "$(command -v git)" ]; then If we can remove arrow/ci/scripts/python_build.sh Lines 88 to 92 in 8169d6e
arrow/ci/scripts/python_build.sh Lines 81 to 86 in 8169d6e
--no-build-isolation by #41041 ?
|
Yeah, I don't use our docker builds very often locally, so can't say much about that.
I would think that the build isolation should not matter for whether files are generated in the source or not (this is about whether a temporary python venv is created, or whether your current python session is used, while building), although exactly what pip/setuptools do depending on certain flags passed can be quite difficult to guess. But, I think it should be possible to specify to pip to use a |
Looking a bit further into it, So in short, if we want to have the same out-of-source build as we had with older pip, it seems that you indeed need to do that manually yourself |
Thanks for looking into it. I see. |
Describe the enhancement requested
If we use in-source build, we have files owned by
root
in source tree on host. Because we useroot
in Docker containers.We should use out-of-source build to avoid creating files in source tree on host.
At least
python/
,js/
andjava/
use in-source build.Component(s)
Continuous Integration
The text was updated successfully, but these errors were encountered: