vinishjail97 commented on code in PR #867:
URL: https://github.com/apache/incubator-xtable/pull/867#discussion_r3661030443
##########
.github/workflows/mvn-ci-build.yml:
##########
@@ -43,5 +43,15 @@ jobs:
distribution: 'temurin'
cache: maven
+ # Anyone building the source release runs `mvn package` without a prior
+ # `mvn install`, so xtable-service has to resolve xtable-core from the
+ # reactor rather than from a repository. Delete locally installed XTable
+ # artifacts first, otherwise the ~/.m2 restored by `cache: maven` hides
+ # such a failure.
+ - name: Verify xtable-service builds without installed XTable artifacts
+ run: |
+ rm -rf ~/.m2/repository/org/apache/xtable
+ ./mvnw clean package -pl xtable-service -am -DskipTests -ntp -B
+
Review Comment:
Good catch, thanks. I had only dealt with one of the two caches here.
The `rm -rf` covers the dependency cache that `cache: maven` restores, but
the maven-build-cache-extension from .mvn/extensions.xml is also active in CI
and I had left it on. From the last run on this PR:
```
[INFO] Cache configuration is not available at configured path
.../.mvn/maven-build-cache-config.xml, cache is enabled with defaults
[INFO] Saved Build to local file:
/home/runner/.m2/build-cache/v1/org.apache.xtable/xtable/...
```
If that ever restores a module instead of building it, the step passes
without resolving xtable-core from the reactor at all, so the check quietly
stops checking anything. Added `-Dmaven.build.cache.enabled=false` in bf970d38
so both caches are out of the way, and expanded the comment to say why each one
is there.
On moving it to its own workflow, that does give the same isolation
structurally rather than through two flags someone has to keep, which I like.
The reason it is a step here is that Vinish asked earlier in this PR to fold it
into the existing xtable-service CI rather than run a second job on every push,
and without `cache: maven` a separate workflow cold-downloads Spark, Hudi and
Iceberg each time, roughly 4 to 6 minutes against the 73 seconds this step took
in the last run. Happy to move it if you would still rather have the separate
workflow, just say the word.
--
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]