You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "clayburn (via GitHub)" <gi...@apache.org> on 2025/10/21 18:49:41 UTC

[PR] NIFI-15125: Enable Develocity build cache [nifi]

clayburn opened a new pull request, #10448:
URL: https://github.com/apache/nifi/pull/10448

   <!-- 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. -->
   
   # Summary
   
   [NIFI-15125](https://issues.apache.org/jira/browse/NIFI-15125)
   
   # Tracking
   
   Please complete the following tracking steps prior to pull request creation.
   
   ### Issue Tracking
   
   - [x] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created
   
   ### Pull Request Tracking
   
   - [x] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-00000`
   - [x] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-00000`
   
   ### Pull Request Formatting
   
   - [x] Pull Request based on current revision of the `main` branch
   - [x] Pull Request refers to a feature branch with one commit containing changes
   
   # Verification
   
   Please indicate the verification steps performed prior to pull request creation.
   
   ### Build
   
   - [x] Build completed using `./mvnw clean install -P contrib-check`
     - [x] JDK 21
     - [x] JDK 25
   
   ### Licensing
   
   - [ ] New dependencies are compatible with the [Apache License 2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License Policy](https://www.apache.org/legal/resolved.html)
   - [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` files
   
   ### Documentation
   
   - [ ] Documentation formatting appears as expected in rendered files
   


-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] NIFI-15125: Enable Develocity build cache [nifi]

Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory commented on PR #10448:
URL: https://github.com/apache/nifi/pull/10448#issuecomment-3432497687

   Thanks for the updates @clayburn.
   
   Just for clarity on the implementation, setting `enabled` to `true` for the remote build cache means that it will always be used, but the `storeEnabled` expression means that results will only be sent in the context of authenticated GitHub Actions? Are there are any concerns around network accessibility, or server availability, of the remote build cache?


-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] NIFI-15125: Enable Develocity build cache [nifi]

Posted by "clayburn (via GitHub)" <gi...@apache.org>.
clayburn commented on code in PR #10448:
URL: https://github.com/apache/nifi/pull/10448#discussion_r2451729297


##########
.mvn/develocity.xml:
##########
@@ -40,7 +40,8 @@
             <enabled>#{isFalse(env['GITHUB_ACTIONS'])}</enabled>
         </local>
         <remote>
-            <enabled>false</enabled>
+            <enabled>true</enabled>
+            <storeEnabled>#{isTrue(env['GITHUB_ACTIONS']) and isTrue(env['DEVELOCITY_ACCESS_KEY'])}</storeEnabled>

Review Comment:
   It would actually just be DEVELOCITY_ACCESS_KEY. The GitHub Actions secret is labeled NIFI_DEVELOCITY_ACCESS_KEY, but it is being mapped to a DEVELOCITY_ACCESS_KEY env var which is what is being detected here and [used by Develocity to authenticate](https://docs.gradle.com/develocity/maven-extension/current/#via_environment_variable). 



-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] NIFI-15125: Enable Develocity build cache [nifi]

Posted by "clayburn (via GitHub)" <gi...@apache.org>.
clayburn commented on PR #10448:
URL: https://github.com/apache/nifi/pull/10448#issuecomment-3432567490

   > Thanks for the updates @clayburn.
   > 
   > Just for clarity on the implementation, setting `enabled` to `true` for the remote build cache means that it will always be used, but the `storeEnabled` expression means that results will only be sent in the context of authenticated GitHub Actions? 
   
   You have the correct understanding—only authenticated GitHub Actions builds will write to the cache, which means only builds that originate from this repo. Builds originating from forks (i.e. PRs) will not be able to write to the cache.
   
   > Are there are any concerns around network accessibility, or server availability, of the remote build cache?
   
   It is a good consideration. If the server is unavailable, the builds will fallback to regular execution with the cache disabled. More specifically, the first remote cache error in any build will disable the remote cache for the remainder of the build. 
   
   The one case which might matter in the context of OSS is the speed of the connection from local users to the remote cache. Users building locally on slow connections can potentially see the remote cache slowing down a build rather than speeding it up. In these cases we usually recommend the user disable remote caching themselves via [system property](https://docs.gradle.com/develocity/maven-extension/current/#disabling_the_remote_cache). 


-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] NIFI-15125: Enable Develocity build cache [nifi]

Posted by "pvillard31 (via GitHub)" <gi...@apache.org>.
pvillard31 commented on code in PR #10448:
URL: https://github.com/apache/nifi/pull/10448#discussion_r2450600742


##########
.mvn/develocity.xml:
##########
@@ -40,7 +40,8 @@
             <enabled>#{isFalse(env['GITHUB_ACTIONS'])}</enabled>
         </local>
         <remote>
-            <enabled>false</enabled>
+            <enabled>true</enabled>
+            <storeEnabled>#{isTrue(env['GITHUB_ACTIONS']) and isTrue(env['DEVELOCITY_ACCESS_KEY'])}</storeEnabled>

Review Comment:
   Should it be?
   
   ```suggestion
               <storeEnabled>#{isTrue(env['GITHUB_ACTIONS']) and isTrue(env['NIFI_DEVELOCITY_ACCESS_KEY'])}</storeEnabled>
   ```



-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] NIFI-15125: Enable Develocity build cache [nifi]

Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory merged PR #10448:
URL: https://github.com/apache/nifi/pull/10448


-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org