Repository navigation
[SPARK-57144][INFRA] Unify Coursier cache to a single key across all jobs #56201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
43ef9ce
18fd28b
e324e00
4628dd6
61f1007
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -381,15 +381,14 @@ jobs: | |
| key: build-${{ hashFiles('**/pom.xml', 'project/build.properties', 'build/mvn', 'build/sbt', 'build/sbt-launch-lib.bash', 'build/spark-build-info') }} | ||
| restore-keys: | | ||
| build- | ||
| - name: Cache Coursier local repository | ||
| uses: actions/cache@v5 | ||
| - name: Restore Coursier local repository | ||
| uses: actions/cache/restore@v5 | ||
| with: | ||
| path: ~/.cache/coursier | ||
| key: ${{ matrix.java }}-${{ matrix.hadoop }}-coursier-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }} | ||
| key: ${{ runner.os }}-${{ matrix.java }}-${{ matrix.hadoop }}-coursier-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }} | ||
| restore-keys: | | ||
| ${{ matrix.java }}-${{ matrix.hadoop }}-coursier- | ||
| precompile-coursier-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }} | ||
| precompile-coursier- | ||
| ${{ runner.os }}-${{ matrix.java }}-${{ matrix.hadoop }}-coursier- | ||
| ${{ runner.os }}-coursier- | ||
| - name: Free up disk space | ||
| run: | | ||
| if [ -f ./dev/free_disk_space ]; then | ||
|
|
@@ -620,9 +619,9 @@ jobs: | |
| uses: actions/cache@v5 | ||
| with: | ||
| path: ~/.cache/coursier | ||
| key: precompile-coursier-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }} | ||
| key: ${{ runner.os }}-coursier-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }} | ||
| restore-keys: | | ||
| precompile-coursier- | ||
| ${{ runner.os }}-coursier- | ||
| - name: Install Java ${{ inputs.java }} | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
|
|
@@ -745,13 +744,13 @@ jobs: | |
| key: build-${{ hashFiles('**/pom.xml', 'project/build.properties', 'build/mvn', 'build/sbt', 'build/sbt-launch-lib.bash', 'build/spark-build-info') }} | ||
| restore-keys: | | ||
| build- | ||
| - name: Cache Coursier local repository | ||
| uses: actions/cache@v5 | ||
| - name: Restore Coursier local repository | ||
| uses: actions/cache/restore@v5 | ||
| with: | ||
| path: ~/.cache/coursier | ||
| key: pyspark-coursier-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }} | ||
| key: ${{ runner.os }}-coursier-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }} | ||
| restore-keys: | | ||
| pyspark-coursier- | ||
| ${{ runner.os }}-coursier- | ||
| - name: Free up disk space | ||
| shell: 'script -q -e -c "bash {0}"' | ||
| run: ./dev/free_disk_space_container | ||
|
|
@@ -936,13 +935,13 @@ jobs: | |
| key: build-${{ hashFiles('**/pom.xml', 'project/build.properties', 'build/mvn', 'build/sbt', 'build/sbt-launch-lib.bash', 'build/spark-build-info') }} | ||
| restore-keys: | | ||
| build- | ||
| - name: Cache Coursier local repository | ||
| uses: actions/cache@v5 | ||
| - name: Restore Coursier local repository | ||
| uses: actions/cache/restore@v5 | ||
| with: | ||
| path: ~/.cache/coursier | ||
| key: sparkr-coursier-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }} | ||
| key: ${{ runner.os }}-coursier-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }} | ||
| restore-keys: | | ||
| sparkr-coursier- | ||
| ${{ runner.os }}-coursier- | ||
| - name: Free up disk space | ||
| run: ./dev/free_disk_space_container | ||
| - name: Install Java ${{ inputs.java }} | ||
|
|
@@ -1087,13 +1086,13 @@ jobs: | |
| key: build-${{ hashFiles('**/pom.xml', 'project/build.properties', 'build/mvn', 'build/sbt', 'build/sbt-launch-lib.bash', 'build/spark-build-info') }} | ||
| restore-keys: | | ||
| build- | ||
| - name: Cache Coursier local repository | ||
| uses: actions/cache@v5 | ||
| - name: Restore Coursier local repository | ||
| uses: actions/cache/restore@v5 | ||
| with: | ||
| path: ~/.cache/coursier | ||
| key: docs-coursier-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }} | ||
| key: ${{ runner.os }}-coursier-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }} | ||
| restore-keys: | | ||
| docs-coursier- | ||
| ${{ runner.os }}-coursier- | ||
| - name: Cache Maven local repository | ||
| uses: actions/cache@v5 | ||
| with: | ||
|
|
@@ -1286,13 +1285,13 @@ jobs: | |
| key: build-${{ hashFiles('**/pom.xml', 'project/build.properties', 'build/mvn', 'build/sbt', 'build/sbt-launch-lib.bash', 'build/spark-build-info') }} | ||
| restore-keys: | | ||
| build- | ||
| - name: Cache Coursier local repository | ||
| uses: actions/cache@v5 | ||
| - name: Restore Coursier local repository | ||
| uses: actions/cache/restore@v5 | ||
| with: | ||
| path: ~/.cache/coursier | ||
| key: docs-coursier-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }} | ||
| key: ${{ runner.os }}-coursier-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }} | ||
| restore-keys: | | ||
| docs-coursier- | ||
| ${{ runner.os }}-coursier- | ||
| - name: Cache Maven local repository | ||
| uses: actions/cache@v5 | ||
| with: | ||
|
|
@@ -1481,15 +1480,13 @@ jobs: | |
| key: build-${{ hashFiles('**/pom.xml', 'project/build.properties', 'build/mvn', 'build/sbt', 'build/sbt-launch-lib.bash', 'build/spark-build-info') }} | ||
| restore-keys: | | ||
| build- | ||
| - name: Cache Coursier local repository | ||
| uses: actions/cache@v5 | ||
| - name: Restore Coursier local repository | ||
| uses: actions/cache/restore@v5 | ||
| with: | ||
| path: ~/.cache/coursier | ||
| key: tpcds-coursier-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }} | ||
| key: ${{ runner.os }}-coursier-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }} | ||
| restore-keys: | | ||
| tpcds-coursier- | ||
| precompile-coursier-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }} | ||
| precompile-coursier- | ||
| ${{ runner.os }}-coursier- | ||
| - name: Install Java ${{ inputs.java }} | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
|
|
@@ -1615,15 +1612,13 @@ jobs: | |
| key: build-${{ hashFiles('**/pom.xml', 'project/build.properties', 'build/mvn', 'build/sbt', 'build/sbt-launch-lib.bash', 'build/spark-build-info') }} | ||
| restore-keys: | | ||
| build- | ||
| - name: Cache Coursier local repository | ||
| uses: actions/cache@v5 | ||
| - name: Restore Coursier local repository | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These downstream jobs depend on
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Valid point. In practice |
||
| uses: actions/cache/restore@v5 | ||
| with: | ||
| path: ~/.cache/coursier | ||
| key: docker-integration-coursier-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }} | ||
| key: ${{ runner.os }}-coursier-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }} | ||
| restore-keys: | | ||
| docker-integration-coursier- | ||
| precompile-coursier-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }} | ||
| precompile-coursier- | ||
| ${{ runner.os }}-coursier- | ||
| - name: Install Java ${{ inputs.java }} | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
|
|
@@ -1703,15 +1698,13 @@ jobs: | |
| key: build-${{ hashFiles('**/pom.xml', 'project/build.properties', 'build/mvn', 'build/sbt', 'build/sbt-launch-lib.bash', 'build/spark-build-info') }} | ||
| restore-keys: | | ||
| build- | ||
| - name: Cache Coursier local repository | ||
| uses: actions/cache@v5 | ||
| - name: Restore Coursier local repository | ||
| uses: actions/cache/restore@v5 | ||
| with: | ||
| path: ~/.cache/coursier | ||
| key: k8s-integration-coursier-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }} | ||
| key: ${{ runner.os }}-coursier-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }} | ||
| restore-keys: | | ||
| k8s-integration-coursier- | ||
| precompile-coursier-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }} | ||
| precompile-coursier- | ||
| ${{ runner.os }}-coursier- | ||
| - name: Free up disk space | ||
| run: | | ||
| if [ -f ./dev/free_disk_space ]; then | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
tpcds-1gCoursier step is also restore-only, but the job only depends onprecondition, notprecompile. Normal SQL changes and explicit full workflows can trigger both jobs, yettpcds-1gmay start beforeprecompilesaves the shared cache; the oldtpcds-coursier-*writer was also removed. TPC-DS can still cold-download dependencies in that run.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed by SPARK-57142 which was merged before this PR.
tpcds-1gnow depends onprecompile, so it always waits forprecompileto finish (and its cache to be saved) before starting. The restore-only approach is fully valid.