Skip to content

Commit 87d5186

Browse files
committed
[SPARK-52131][INFRA] Upload the application directory when tests for the yarn module fail
### What changes were proposed in this pull request? This pr adds functionality to upload the contents of the `target/test/data/` directory when the `yarn` module tests fail in GitHub Actions. This directory stores information related to Yarn Applications, such as logs and job configurations. The upload of this directory's contents facilitates troubleshooting when `yarn` module tests encounter failures. ### Why are the changes needed? This facilitates troubleshooting when tests for the `yarn` module fail. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? - Pass GitHub Actions - It has been confirmed that the expected files can be downloaded when test failures occur in the `yarn` module. https://github.com/LuciferYang/spark/actions/runs/15019569409 ![image](https://github.com/user-attachments/assets/fd22f7d9-64fd-4d6f-a0d8-5e13c70de272) After unzipping, the contents of the folder are as follows: ![image](https://github.com/user-attachments/assets/a2dce30f-add2-4671-9f64-2c26a25a8bab) ### Was this patch authored or co-authored using generative AI tooling? No Closes #50891 from LuciferYang/upload-yarn-app-log. Lead-authored-by: yangjie01 <[email protected]> Co-authored-by: YangJie <[email protected]> Signed-off-by: yangjie01 <[email protected]>
1 parent d4c8f79 commit 87d5186

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/build_and_test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,12 @@ jobs:
389389
with:
390390
name: unit-tests-log-${{ matrix.modules }}-${{ matrix.comment }}-${{ matrix.java }}-${{ matrix.hadoop }}-${{ matrix.hive }}
391391
path: "**/target/*.log"
392+
- name: Upload yarn app log files
393+
if: ${{ !success() && contains(matrix.modules, 'yarn') }}
394+
uses: actions/upload-artifact@v4
395+
with:
396+
name: yarn-app-log-${{ matrix.comment }}-${{ matrix.java }}-${{ matrix.hadoop }}-${{ matrix.hive }}
397+
path: "**/target/test/data/"
392398

393399
infra-image:
394400
name: "Base image build"

0 commit comments

Comments
 (0)