Skip to content

Build: workflows cache gradle wrapper#4165

Merged
rdblue merged 1 commit intoapache:masterfrom
XN137:workflows-cache-gradle-wrapper
Sep 29, 2022
Merged

Build: workflows cache gradle wrapper#4165
rdblue merged 1 commit intoapache:masterfrom
XN137:workflows-cache-gradle-wrapper

Conversation

@XN137
Copy link
Contributor

@XN137 XN137 commented Feb 18, 2022

this avoids downloading the gradle distribution on every workflow run

also follows the recommended usage pattern for the github action:
https://github.com/actions/cache/blob/main/examples.md#java---gradle

the folder contents are deterministic:

chris@xanadu:~/code/iceberg$ tree -L 5 ~/.gradle/wrapper
/home/chris/.gradle/wrapper
└── dists
    └── gradle-7.4-bin
        └── c0gwcg53nkjbqw7r0h0umtfvt
            ├── gradle-7.4
            │   ├── bin
            │   ├── init.d
            │   ├── lib
            │   ├── LICENSE
            │   ├── NOTICE
            │   └── README
            ├── gradle-7.4-bin.zip
            ├── gradle-7.4-bin.zip.lck
            └── gradle-7.4-bin.zip.ok

7 directories, 6 files

chris@xanadu:~/code/iceberg$ rm -rf ~/.gradle/wrapper

chris@xanadu:~/code/iceberg$ ./gradlew tasks >/dev/null; echo $?
0

chris@xanadu:~/code/iceberg$ tree -L 5 ~/.gradle/wrapper
/home/chris/.gradle/wrapper
└── dists
    └── gradle-7.4-bin
        └── c0gwcg53nkjbqw7r0h0umtfvt
            ├── gradle-7.4
            │   ├── bin
            │   ├── init.d
            │   ├── lib
            │   ├── LICENSE
            │   ├── NOTICE
            │   └── README
            ├── gradle-7.4-bin.zip
            ├── gradle-7.4-bin.zip.lck
            └── gradle-7.4-bin.zip.ok

7 directories, 6 files

@github-actions github-actions bot added the INFRA label Feb 18, 2022
Copy link
Contributor

@rdblue rdblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me when tests are passing.

@nastra
Copy link
Contributor

nastra commented Feb 21, 2022

Failed spark test looks rather unrelated

org.apache.iceberg.spark.actions.TestRemoveOrphanFilesAction3 > orphanedFileRemovedWithParallelTasks FAILED
    java.lang.AssertionError: Should delete 4 files expected:<4> but was:<3>
        at org.junit.Assert.fail(Assert.java:89)
        at org.junit.Assert.failNotEquals(Assert.java:835)

@XN137
Copy link
Contributor Author

XN137 commented Feb 28, 2022

Tests seem to be passing, so should this be merged?

@XN137 XN137 force-pushed the workflows-cache-gradle-wrapper branch from 0642476 to 19e493c Compare March 10, 2022 15:47
@XN137
Copy link
Contributor Author

XN137 commented Mar 10, 2022

rebased due to merge conflict

Copy link
Member

@snazy snazy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@XN137 XN137 force-pushed the workflows-cache-gradle-wrapper branch from 19e493c to aa8b567 Compare April 29, 2022 15:33
@XN137 XN137 force-pushed the workflows-cache-gradle-wrapper branch from aa8b567 to 15197c9 Compare September 8, 2022 10:29
@XN137
Copy link
Contributor Author

XN137 commented Sep 8, 2022

rebased in case we still want to do t his

@XN137
Copy link
Contributor Author

XN137 commented Sep 8, 2022

@rdblue rdblue merged commit 731e5f0 into apache:master Sep 29, 2022
@XN137 XN137 deleted the workflows-cache-gradle-wrapper branch September 30, 2022 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants