GH-51335: [CI] Update Matlab actions and fix Matlab Windows failure - #51378
Conversation
|
@github-actions crossbow submit matlab |
|
Revision: 3678cd3 Submitted crossbow builds: ursacomputing/crossbow @ actions-604b113958
|
There was a problem hiding this comment.
🟡 Changes recommended
Windows compiler processes must be cleaned up and cache inputs narrowed to resolve the reported failure.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Updates MATLAB GitHub Actions versions and adjusts Windows cache hashing to exclude generated build files.
Changes:
- Bumps MATLAB setup, test, and command actions.
- Updates Windows cache configuration.
File summaries
| File | Description |
|---|---|
dev/tasks/matlab/github.yml |
Updates MATLAB actions used for packaging and Archery. |
.github/workflows/matlab.yml |
Updates actions and Windows cache hashing. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Question -> Would it make sense to also exclude I've (re)checked the failure ...🤷 :
for a symlink that Windows cannot resolve: Symlink was added in Decimal (and Decimal is new library added in Boost 1.91) EDIT: Corrected link to my fork's Matlab job run showing Extra debug print |
| - name: Cache ccache | ||
| uses: actions/cache@v6 |
There was a problem hiding this comment.
See comment below.
| - name: Restore ccache | |
| uses: apache/infrastructure-actions/stash/restore@ce952724eb5210790bd5d466d70d5d60ac3e6c21 |
| ${{ steps.ccache-info.outputs.cache-dir }} | ||
| key: matlab-ccache-windows-${{ hashFiles('cpp/**', 'matlab/**') }} | ||
| key: matlab-ccache-windows-${{ hashFiles('cpp/**', 'matlab/**', '!matlab/build/**') }} | ||
| restore-keys: matlab-ccache-windows- |
There was a problem hiding this comment.
ccache hashFiles seems to fails because it can't resolve a symbolic link on windows.
Given we switched away from hashFiles keys for other caching calls I'd propose we take the same approach here if possible (copying from cpp_windows.yml). It would likely also improve cache utilization. @pitrou ?
(I did not check if cache key is good enough)
Perhaps this is out of scope here and can be a separate PR, up to you @raulcd.
| restore-keys: matlab-ccache-windows- | |
| key: matlab-ccache-windows | |
| restore-keys: matlab-ccache-windows | |
| - name: Build MATLAB Interface |
There was a problem hiding this comment.
It feels like a different thing than what I was trying to do with this PR (just bump some actions and fix the Windows CI failures). I think we can do it but I just want to fix CI at this point.
There was a problem hiding this comment.
I've opened the following issue to track it in case we want to do that:
There was a problem hiding this comment.
Yeah, let's merge this to fix the CI and change caching in another PR.
| run: | | ||
| call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 | ||
| bash -c "ci/scripts/matlab_build.sh $(pwd)" | ||
| - name: Run MATLAB Tests |
There was a problem hiding this comment.
| - name: Save ccache | |
| if: ${{ !cancelled() }} | |
| continue-on-error: true | |
| uses: apache/infrastructure-actions/stash/save@ce952724eb5210790bd5d466d70d5d60ac3e6c21 | |
| with: | |
| path: ${{ steps.ccache-info.outputs.cache-dir }} | |
| key: matlab-ccache-windows | |
| - name: Run MATLAB Tests |
There was a problem hiding this comment.
🔵 Needs a closer look
The Windows cache key still includes cpp/**, so the locked tree may cause post-job cache failure.
Review details
Suppressed comments (1)
.github/workflows/matlab.yml:168
- The linked failure is caused by
hashFilesenumerating files undercpp/, but this expression still includescpp/**; excluding onlymatlab/build/**does not avoid that tree. The Windows post-job cache can therefore fail again when MSVC still has handles there. Please remove the locked tree from the key (and apply the same correction to the Ubuntu/macOS keys if the pattern is meant to be shared).
key: matlab-ccache-windows-${{ hashFiles('cpp/**', 'matlab/**', '!matlab/build/**') }}
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Lite
Rationale for this change
Several dependabot bumps were raised but were missing the
tasks/github.ymlfile and our CI is currently failing for Windows matlab builds due to caching.What changes are included in this PR?
Bump both the matlab actions on the workflow for this repo and the one used on archery.
Do not use the built folder for computing the hash for they hash key.
Are these changes tested?
Via CI and archery.
Are there any user-facing changes?
No
Was AI used for this PR?
In accordance to the AI generation guidelines, please disclose below whether and how AI was used in this PR.
PR code and description written by:
Reviewed before submission by:
AI was used to analyze the CI failures.