kgyrtkirk commented on code in PR #15106:
URL: https://github.com/apache/druid/pull/15106#discussion_r1528241588


##########
.github/workflows/static-checks.yml:
##########
@@ -51,12 +51,33 @@ jobs:
         with:
           distribution: 'zulu'
           java-version: ${{ matrix.java }}
-          cache: 'maven'
+
+      - name: restore maven dependencies
+      # restore maven dependencies only. 'depsonly' keys are safe to restore
+      # since they don't contain any artifacts created by mvn install
+      - uses: actions/cache/restore@v3
+        with:
+          key: maven-${{ runner.os }}-depsonly-${{ hashFiles('**/pom.xml') }}
+          path: ~/.m2/repository
+          restore-keys: |
+            maven-${{ runner.os }}-depsonly-

Review Comment:
   I'm not sure how `purge-local-repository` would help here ; wouldn't that 
still remove the local repo in case there is a cache hit?
   
   I wonder if the problem is with the opportunistic caching of project 
artifacts; can't we somehow avoid them getting into the cache:
   * exclude them from the cache
      * I did experiment with this - and its a bit convoluted due to the fact 
that excludes work by filtering the included list [see 
here](https://github.com/actions/cache/issues/364)
   * remove them with an `always()` 
[step](https://github.com/kgyrtkirk/druid/blob/a50ceea91f93e43f940834675bc53a19b9f50f6b/.github/workflows/reusable-unit-tests.yml#L71C1-L74C51)
   
   I think this second approach is better - because if someone decides to add 
another exclude - it will be less likely to trigger the exclusion issue 
differently



-- 
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]

Reply via email to