felipepessoto opened a new pull request, #12778: URL: https://github.com/apache/gluten/pull/12778
## What changes are proposed in this pull request? Follow-up to #12125, which added the Dev Container. As configured there, the container runs `dev/ci-velox-buildstatic-centos-9.sh` as its `postCreateCommand` on top of `apache/gluten:vcpkg-centos-9`. That is a CI packaging script rather than a development one, and running it at container creation fails or hangs: - vcpkg reuses pre-built binaries only when the manifest in the checkout hashes identically to the image's. The images are rebuilt weekly from `main`, so a checkout that has moved rebuilds all ~144 ports from source, OpenSSL, Boost, gRPC and the AWS and Azure SDKs included. - The static link step is memory hungry; `Velox.md` recommends 64 GB. - vcpkg leaves ~6 GB of sources and binaries in the workspace. - The script pins `NUM_THREADS=2` for CI runners. - A `postCreateCommand` that runs for hours stalls container creation and leaves a half-built tree behind whenever the editor disconnects or a Codespace times out. Static linking exists to produce portable release jars, which a developer never needs. This switches to `apache/gluten:centos-9-jdk8`, the dynamically linked image the cpp/UDF test job already runs on: it ships Velox's third-party libraries and Arrow under `/usr/local`, a pre-warmed Maven repository, and the Spark distributions the unit tests need under `/opt/shims`. The native build is no longer automatic. `postCreateCommand` now runs `.devcontainer/post-create.sh`, which: - installs JDK 17 alongside JDK 8, needed by Spark 4.x and by the Spark unit tests, which CI runs on JDK 17; - installs clang-format 15, which `dev/format-cpp-code.sh` requires under that exact name and tries to install with `apt`, and the `regex` module `dev/check.py` imports; - sizes `NUM_THREADS` from memory rather than cores, and exports it; - prints the build and test commands to run. The `NUM_THREADS` sizing is what keeps a build from being OOM-killed. The build scripts default it to `nproc --ignore=2` while Velox's heavier translation units peak at roughly 3.5 GB resident each, so on a 32-core, 62 GB container the default asks for 30 jobs and about 100 GB, and the OOM killer takes down the build and the container with it. Reserving a few GB and allowing ~4 GB per job gives 13 jobs there. `devcontainer.json` also: - puts GCC 12 on `PATH` through `remoteEnv`, since the image's default GCC 11 cannot compile Velox's C++20 sources and the build scripts do not enable the toolset themselves; - declares `hostRequirements`, where the 64 GB storage floor is what rules out machine types too small for the image plus the Velox build tree; - keeps the ccache and the Maven repository in named volumes so they survive a rebuild; - excludes the build trees from the editor's file watcher, which otherwise exhausts inotify handles once a build has produced more than 10 GB of artifacts. `docs/developers/dev-container.md` is rewritten to match, including a warning that the unit test command must not use `-pl gluten-ut`: `gluten-ut` is an aggregator POM, `-pl` does not select its children, and the build then finishes in seconds with no suite in the reactor. ## How was this patch tested? Dev Container configuration and documentation only; no product code is touched. Validated from inside the container that the documented commands work end to end: - Clean build after wiping `cpp/build`, `ep/build-velox/build/velox_ep/_build` and `ep/_ep`, using the documented command: `BUILD SUCCESS`, producing `cpp/build/releases/libgluten.so`, `libvelox.so` and `package/target/gluten-package-1.8.0-SNAPSHOT-3.5.jar`. - `cd cpp/build && ctest`: 5675 of 5675 tests passed, confirming `--build_tests=ON` produces working test binaries. - Memory: the computed parallelism held a 41 GB peak of 62 GB with 20 GB still available, where the core-count default was OOM-killed at 707 of 961 Velox objects. - The corrected unit test command puts `Gluten Unit Test Spark35` in the Maven reactor, where the previous `-pl gluten-ut` form selected only the aggregator POM and ran no suite. ## Was this patch authored or co-authored using generative AI tooling? Generated-by: GitHub Copilot CLI claude-opus-5 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
