You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "clayburn (via GitHub)" <gi...@apache.org> on 2024/01/19 16:03:26 UTC
[PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
clayburn opened a new pull request, #39708:
URL: https://github.com/apache/arrow/pull/39708
### Rationale for this change
This change has two main benefits:
#### Enabling local build caching
Enabling local build cache can speed up builds that occur on the same machine by skipping the execution of certain deterministic goals, such as Java compilation, when no change has occurred.
In the future, (ge.apache.org)[https://ge.apache.org] will support remote build caching as well so that results can be shared between builds (e.g. ephemeral CI build agents).
#### Enabling build scans
This change enables the publishing of build scans of the Apache Arrow project to the Develocity instance at [ge.apache.org](https://ge.apache.org/), hosted by the Apache Software Foundation and run in partnership between the ASF and Gradle. This Develocity instance has all features and extensions enabled and is freely available for use by the Apache Arrow project and all other Apache projects. Currently, Maven-built projects such as [Pulsar](https://ge.apache.org/scans?search.buildToolType=maven&search.rootProjectNames=*Pulsar*&search.timeZoneId=America%2FChicago), [IoTDB](https://ge.apache.org/scans?search.buildToolType=maven&search.rootProjectNames=*iotdb*&search.timeZoneId=America%2FChicago), [Ozone](https://ge.apache.org/scans?search.buildToolType=maven&search.rootProjectNames=*ozone*&search.timeZoneId=America%2FChicago), and others are using this instance.
On this Develocity instance, Apache Arrow will have access not only to all of the published build scans but other aggregate data features such as:
- Dashboards to view all historical build scans, along with performance trends over time
- Build failure analytics for enhanced investigation and diagnosis of build failures
- Test failure analytics to better understand trends and causes around slow, failing, and flaky tests
### What changes are included in this PR?
- Adds the Gradle Enterprise Maven Extension to enable local caching
- Publishes build scans to [ge.apache.org](https://ge.apache.org) from CI builds and authenticated local builds
- Adds the [Common Custom User Data Maven Extension](https://github.com/gradle/common-custom-user-data-maven-extension) to enhance build scans with more metadata
### Are these changes tested?
No (these changes are for the build and do not affect the code)
### Are there any user-facing changes?
No
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #39708:
URL: https://github.com/apache/arrow/pull/39708#issuecomment-2012720832
Revision: 988562f31eedb2ffd8229b47f1db10a11966a1a5
Submitted crossbow builds: [ursacomputing/crossbow @ actions-be6617b977](https://github.com/ursacomputing/crossbow/branches/all?query=actions-be6617b977)
|Task|Status|
|----|------|
|java-jars|[](https://github.com/ursacomputing/crossbow/actions/runs/8377840567/job/22940903888)|
|verify-rc-source-java-linux-almalinux-8-amd64|[](https://github.com/ursacomputing/crossbow/actions/runs/8377839758/job/22940898892)|
|verify-rc-source-java-linux-conda-latest-amd64|[](https://github.com/ursacomputing/crossbow/actions/runs/8377840277/job/22940900709)|
|verify-rc-source-java-linux-ubuntu-20.04-amd64|[](https://github.com/ursacomputing/crossbow/actions/runs/8377839716/job/22940898923)|
|verify-rc-source-java-linux-ubuntu-22.04-amd64|[](https://github.com/ursacomputing/crossbow/actions/runs/8377840663/job/22940902374)|
|verify-rc-source-java-macos-amd64|[](https://github.com/ursacomputing/crossbow/actions/runs/8377840064/job/22940899814)|
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "danepitkin (via GitHub)" <gi...@apache.org>.
danepitkin commented on PR #39708:
URL: https://github.com/apache/arrow/pull/39708#issuecomment-2023859081
I think disabling DEBUG logs should be good enough. I'll try it out.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "clayburn (via GitHub)" <gi...@apache.org>.
clayburn commented on PR #39708:
URL: https://github.com/apache/arrow/pull/39708#issuecomment-1908655754
@pitrou - Looking through the workflow, you are already [caching the right directory](https://github.com/apache/arrow/blob/main/.github/workflows/java.yml#L71). It's all of `$HOME/.m2`, but it will include the default build cache directory. The cache key there being constructed by all files under `java/**` may be overly specific for the build cache, but the `restore-keys` configuration should handle it. We can see as you publish build scans and generate that data.
I've pushed two changes to further optimize this:
- One that enables the local cache. It also adds the clean lifecycle to the CI invocations of Maven, as the build cache is in read-only mode when clean isn't used.
- One that defines some normalizations so that, for example, a change to a properties file that exists in a runtime classpath won't cause a cache miss.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "clayburn (via GitHub)" <gi...@apache.org>.
clayburn commented on PR #39708:
URL: https://github.com/apache/arrow/pull/39708#issuecomment-2012657931
@lidavidm Done ✅
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on PR #39708:
URL: https://github.com/apache/arrow/pull/39708#issuecomment-2015089950
Verification failure is unrelated. However, another improvement might be to run `mvn -B` in our verification script; I don't think we need to see the entire download progress in logs and it makes scanning the log much harder...
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on PR #39708:
URL: https://github.com/apache/arrow/pull/39708#issuecomment-2023852996
Do we want to revert, or do you think disabling the log is good enough?
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on PR #39708:
URL: https://github.com/apache/arrow/pull/39708#issuecomment-2015085839
@danepitkin @vibhatha A potential CI improvement might be to have a post-run step that captures and uploads dump files like these so we can get to the bottom of this instability.
```
Error: Caused by: org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
Error: Command was cmd.exe /X /C "C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\11.0.22-7\x64\bin\java --add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED -jar C:\Users\runneradmin\AppData\Local\Temp\surefire832983470661055534\surefirebooter-20240322025403947_28.jar C:\Users\runneradmin\AppData\Local\Temp\surefire832983470661055534 2024-03-22T02-53-37_914-jvmRun2 surefire-20240322025403947_24tmp surefire_6-20240322025403947_26tmp"
```
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #39708:
URL: https://github.com/apache/arrow/pull/39708#issuecomment-1903743878
> The local cache by default is located at `$HOME/.m2/.gradle-enterprise/build-cache`.
Can it be directed to another directory using an environment variable? In C++ we direct ccache data to a [custom directory](https://github.com/apache/arrow/blob/c33ffb033a49c17619f2547d873569980ee91b9c/docker-compose.yml#L61-L66) which is then persisted as [Docker volumes](https://github.com/apache/arrow/blob/c33ffb033a49c17619f2547d873569980ee91b9c/docker-compose.yml#L178-L200). This is then used together with [GHA caching](https://github.com/apache/arrow/blob/c33ffb033a49c17619f2547d873569980ee91b9c/.github/workflows/cpp.yml#L103-L108) to shorten CI times.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "jduo (via GitHub)" <gi...@apache.org>.
jduo commented on code in PR #39708:
URL: https://github.com/apache/arrow/pull/39708#discussion_r1465722394
##########
.mvn/gradle-enterprise.xml:
##########
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<gradleEnterprise xmlns="https://www.gradle.com/gradle-enterprise-maven" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://www.gradle.com/gradle-enterprise-maven https://www.gradle.com/schema/gradle-enterprise-maven.xsd">
+ <server>
+ <url>https://ge.apache.org</url>
+ <allowUntrusted>false</allowUntrusted>
+ </server>
+ <buildScan>
+ <capture>
+ <goalInputFiles>true</goalInputFiles>
+ <buildLogging>true</buildLogging>
+ <testLogging>true</testLogging>
+ </capture>
+ <backgroundBuildScanUpload>#{isFalse(env['CI'])}</backgroundBuildScanUpload>
+ <publish>ALWAYS</publish>
+ <publishIfAuthenticated>true</publishIfAuthenticated>
+ <obfuscation>
+ <ipAddresses>#{{'0.0.0.0'}}</ipAddresses>
+ </obfuscation>
+ </buildScan>
+ <buildCache>
+ <remote>
+ <enabled>false</enabled>
+ </remote>
+ </buildCache>
+</gradleEnterprise>
Review Comment:
Please add newlines to EOF
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "davisusanibar (via GitHub)" <gi...@apache.org>.
davisusanibar commented on PR #39708:
URL: https://github.com/apache/arrow/pull/39708#issuecomment-1939279966
> For caching, there is no action needed. The one stipulation that should be noted is that the local cache is machine local
@clayburn If you could help me with doubts regarding local development, I would appreciate it:
1. I am running `$ mvn clean install` and seeing that `/.m2/.gradle-enterprise` is populating with information. If I run `$ mvn clean install` again and haven't made any changes to my Java module projects, should it use the last cache?
2. Is there a list of tasks that will be fetched from the cache before building it again (e.g. compile,...)?
I would like to identify/map what the new advantages will be for developers on their loca machines.
Thank you in advance for your support.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "clayburn (via GitHub)" <gi...@apache.org>.
clayburn commented on PR #39708:
URL: https://github.com/apache/arrow/pull/39708#issuecomment-1906495036
> > The local cache by default is located at `$HOME/.m2/.gradle-enterprise/build-cache`.
>
> Can it be directed to another directory using an environment variable? In C++ we direct ccache data to a [custom directory](https://github.com/apache/arrow/blob/c33ffb033a49c17619f2547d873569980ee91b9c/docker-compose.yml#L61-L66) which is then persisted as [Docker volumes](https://github.com/apache/arrow/blob/c33ffb033a49c17619f2547d873569980ee91b9c/docker-compose.yml#L178-L200). This is then used together with [GHA caching](https://github.com/apache/arrow/blob/c33ffb033a49c17619f2547d873569980ee91b9c/.github/workflows/cpp.yml#L103-L108) to shorten CI times.
I think this is plausible. I'll give it a shot and update back here.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "danepitkin (via GitHub)" <gi...@apache.org>.
danepitkin commented on PR #39708:
URL: https://github.com/apache/arrow/pull/39708#issuecomment-1900830067
Thank you @clayburn! This is an exciting improvement. For local build execution, would we have to change anything in our developer docs[1] on how to build Arrow java in order to take advantage of this?
[1]https://arrow.apache.org/docs/developers/java/building.html#building-java-modules
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on PR #39708:
URL: https://github.com/apache/arrow/pull/39708#issuecomment-1910765320
@github-actions crossbow submit *java*
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "clayburn (via GitHub)" <gi...@apache.org>.
clayburn commented on PR #39708:
URL: https://github.com/apache/arrow/pull/39708#issuecomment-2012673472
> > For caching, there is no action needed. The one stipulation that should be noted is that the local cache is machine local
>
> @clayburn If you could help me with doubts regarding local development, I would appreciate it:
>
> 1. I am running `$ mvn clean install` and seeing that `/.m2/.gradle-enterprise` is populating with information. If I run `$ mvn clean install` again and haven't made any changes to my Java module projects, should it use the last cache?
> 2. Is there a list of tasks that will be fetched from the cache before building it again (e.g. compile,...)?
>
> I would like to identify/map what the new advantages will be for developers on their loca machines.
>
> Thank you in advance for your support.
@davisusanibar - So sorry for losing track of this:
1. Yes, such a build will use the cache. It also isn't necessarily even the "last" cache (i.e. the last build). It could be the case that you use cache entries from older builds as well. This can help, for example, when switching back and forth between feature branches.
2. We document the default cacheable goals [here](https://docs.gradle.com/enterprise/maven-extension/#cacheable_plugins_and_goals). It is possible to add goals if needed. We can explore this in the future to see if any in your project make sense to add.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm merged PR #39708:
URL: https://github.com/apache/arrow/pull/39708
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "danepitkin (via GitHub)" <gi...@apache.org>.
danepitkin commented on PR #39708:
URL: https://github.com/apache/arrow/pull/39708#issuecomment-2023831471
Hmm, I mightve found the culprit.. DEBUG messages are enabled in the build now causing a huge amount of logging.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "clayburn (via GitHub)" <gi...@apache.org>.
clayburn commented on PR #39708:
URL: https://github.com/apache/arrow/pull/39708#issuecomment-1900919170
> Thank you @clayburn! This is an exciting improvement. For local build execution, would we have to change anything in our developer docs[1] on how to build Arrow java in order to take advantage of this?
>
> [1]https://arrow.apache.org/docs/developers/java/building.html#building-java-modules
@danepitkin - For caching, there is no action needed. The one stipulation that should be noted is that the local cache is machine local, so with some of your containerized builds, it would be local to the container itself without any special handling. The local cache by default is located at `$HOME/.m2/.gradle-enterprise/build-cache`.
For build scans, you won't see any changes unless you explicitly authenticate to https://ge.apache.org. Instructions to do so are [here](https://docs.gradle.com/enterprise/maven-extension/#authenticating_with_gradle_enterprise). All ASF committers can authenticate to ge.apache.org with LDAP credentials. Contributors cannot authenticate, so they won't see anything regarding build scans. The access key is either stored in `~/.m2` or pulled from an env var, so again, the containerized builds may not authenticate easily without intention from the user.
> @clayburn I have approved the CI runs, I assume that only builds on main will be able to upload data due to the use of secrets? For similar things I have used a two step process in the past where the unprivileged workflow creates the data/artifacts and a second privileged workflow that doesn't run any user code would upload the data. Is this something gradle could support? Or maybe data for each PR build would be a bit much ^^
Build scans will only be produced for builds that run from the `apache/arrow` repo. In other words, not from forks. Forked builds will still build just fine, but will not produce a scan. We are working on methods to handle this in the way you described, performing the upload of the scan in a "trusted" environment, but this is not yet ready.
The caching functionality will work without the secret, although the benefits may not be apparent in your CI builds since they are presumably running on ephemeral agents and the cache is machine local. This is where the remote cache will help more, which we hope to enable in the future.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "danepitkin (via GitHub)" <gi...@apache.org>.
danepitkin commented on PR #39708:
URL: https://github.com/apache/arrow/pull/39708#issuecomment-2012711371
@github-actions crossbow submit -g java
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #39708:
URL: https://github.com/apache/arrow/pull/39708#issuecomment-1910768589
Revision: aa0ffadb0e87ad24b464b6d43cbb6ac1028ecb2f
Submitted crossbow builds: [ursacomputing/crossbow @ actions-f432146f72](https://github.com/ursacomputing/crossbow/branches/all?query=actions-f432146f72)
|Task|Status|
|----|------|
|java-jars|[](https://github.com/ursacomputing/crossbow/actions/runs/7658927287/job/20872913292)|
|verify-rc-source-java-linux-almalinux-8-amd64|[](https://github.com/ursacomputing/crossbow/actions/runs/7658927247/job/20872911376)|
|verify-rc-source-java-linux-conda-latest-amd64|[](https://github.com/ursacomputing/crossbow/actions/runs/7658927426/job/20872912455)|
|verify-rc-source-java-linux-ubuntu-20.04-amd64|[](https://github.com/ursacomputing/crossbow/actions/runs/7658927253/job/20872912886)|
|verify-rc-source-java-linux-ubuntu-22.04-amd64|[](https://github.com/ursacomputing/crossbow/actions/runs/7658927238/job/20872911421)|
|verify-rc-source-java-macos-amd64|[](https://github.com/ursacomputing/crossbow/actions/runs/7658927324/job/20872911488)|
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on code in PR #39708:
URL: https://github.com/apache/arrow/pull/39708#discussion_r1466773780
##########
ci/scripts/java_build.sh:
##########
@@ -89,12 +89,12 @@ if [ "${ARROW_JAVA_JNI}" = "ON" ]; then
mvn="${mvn} -Darrow.cpp.build.dir=${java_jni_dist_dir} -Parrow-jni"
fi
-${mvn} install
+${mvn} clean install
if [ "${BUILD_DOCS_JAVA}" == "ON" ]; then
# HTTP pooling is turned of to avoid download issues https://issues.apache.org/jira/browse/ARROW-11633
mkdir -p ${build_dir}/docs/java/reference
- ${mvn} -Dcheckstyle.skip=true -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false install site
+ ${mvn} -Dcheckstyle.skip=true -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false clean install site
Review Comment:
I suppose build caching means that the 'clean' here isn't actually a clean build?
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #39708:
URL: https://github.com/apache/arrow/pull/39708#discussion_r1534669784
##########
.github/workflows/java_jni.yml:
##########
@@ -118,7 +118,8 @@ jobs:
env:
ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
- run: archery docker run conda-python-java-integration
+ GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
+ run: archery docker run conda-python-java-integration -e "GRADLE_ENTERPRISE_ACCESS_KEY=$GRADLE_ENTERPRISE_ACCESS_KEY" -e CI=true
Review Comment:
ditto.
##########
.github/workflows/java.yml:
##########
@@ -84,7 +84,8 @@ jobs:
env:
ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
- run: archery docker run ${{ matrix.image }}
+ GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
+ run: archery docker run ${{ matrix.image }} -e "GRADLE_ENTERPRISE_ACCESS_KEY=$GRADLE_ENTERPRISE_ACCESS_KEY" -e CI=true
Review Comment:
Could you use `archery docker run -e ... ${{ matrix.image }}` style like we did in other places?
```suggestion
run: |
archery docker run \
-e CI=true \
-e "GRADLE_ENTERPRISE_ACCESS_KEY=$GRADLE_ENTERPRISE_ACCESS_KEY" \
${{ matrix.image }}
```
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on PR #39708:
URL: https://github.com/apache/arrow/pull/39708#issuecomment-2012645428
Sorry, can we rebase here before merging?
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "danepitkin (via GitHub)" <gi...@apache.org>.
danepitkin commented on PR #39708:
URL: https://github.com/apache/arrow/pull/39708#issuecomment-2023793524
Hey @clayburn , one of our systems used for benchmarking is hitting OOM after merging this PR: https://github.com/apache/arrow/issues/40775
By any chance are you familiar with the stack trace containing gradle and apache.commons.exec?
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #39708:
URL: https://github.com/apache/arrow/pull/39708#issuecomment-2015693416
After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 6e54b7b4068eb5478e0b4bf938400e40f9860002.
There were no benchmark performance regressions. 🎉
The [full Conbench report](https://github.com/apache/arrow/runs/22993137156) has more details. It also includes information about 3 possible false positives for unstable benchmarks that are known to sometimes produce them.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "clayburn (via GitHub)" <gi...@apache.org>.
clayburn commented on code in PR #39708:
URL: https://github.com/apache/arrow/pull/39708#discussion_r1466784201
##########
ci/scripts/java_build.sh:
##########
@@ -89,12 +89,12 @@ if [ "${ARROW_JAVA_JNI}" = "ON" ]; then
mvn="${mvn} -Darrow.cpp.build.dir=${java_jni_dist_dir} -Parrow-jni"
fi
-${mvn} install
+${mvn} clean install
if [ "${BUILD_DOCS_JAVA}" == "ON" ]; then
# HTTP pooling is turned of to avoid download issues https://issues.apache.org/jira/browse/ARROW-11633
mkdir -p ${build_dir}/docs/java/reference
- ${mvn} -Dcheckstyle.skip=true -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false install site
+ ${mvn} -Dcheckstyle.skip=true -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false clean install site
Review Comment:
Add `clean` simply runs the clean lifecycle before running other requested lifecycles. We need this to safely write cache entries so that we can know that which goal invocation produced particular files.
So this will clean the workspace, but it may restore cache entries to the workspace during execution rather than running the goals. Just depends on your definition of "clean" here. [-DrerunGoals](https://docs.gradle.com/enterprise/maven-extension/#rerunning_goals) can be used to explicitly rerun goals in cases where that is desired.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "assignUser (via GitHub)" <gi...@apache.org>.
assignUser commented on PR #39708:
URL: https://github.com/apache/arrow/pull/39708#issuecomment-1900855982
@clayburn I have approved the CI runs, I assume that only builds on main will be able to upload data due to the use of secrets? For similar things I have used a two step process in the past where the unprivileged workflow creates the data/artifacts and a second privileged workflow that doesn't run any user code would upload the data. Is this something gradle could support? Or maybe data for each PR build would be a bit much ^^
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-39707: [Java] Enable local build cache for Maven/Java build [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #39708:
URL: https://github.com/apache/arrow/pull/39708#issuecomment-1900685819
:warning: GitHub issue #39707 **has been automatically assigned in GitHub** to PR creator.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org