Skip to content

GH-51335: [CI] Update Matlab actions and fix Matlab Windows failure - #51378

Merged
raulcd merged 2 commits into
apache:mainfrom
raulcd:GH-51335
Sep 18, 2026
Merged

raulcd merged 2 commits into
apache:mainfrom
raulcd:GH-51335

Conversation

@raulcd

@raulcd raulcd commented Sep 17, 2026

Copy link
Copy Markdown
Member

Rationale for this change

Several dependabot bumps were raised but were missing the tasks/github.yml file 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:

  • Human
  • AI

Reviewed before submission by:

  • Human
  • AI
  • Not reviewed

AI was used to analyze the CI failures.

@github-actions github-actions Bot added the awaiting committer review Awaiting committer review label Sep 17, 2026
@raulcd

raulcd commented Sep 17, 2026

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit matlab

@raulcd raulcd changed the title GH-51335: [CI] Update matlab actions and fix matlab Windows failure GH-51335: [CI] Update Matlab actions and fix Matlab Windows failure Sep 17, 2026
@github-actions

Copy link
Copy Markdown

Revision: 3678cd3

Submitted crossbow builds: ursacomputing/crossbow @ actions-604b113958

Task Status
matlab GitHub Actions

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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.

Comment thread .github/workflows/matlab.yml
Comment thread dev/tasks/matlab/github.yml
@github-actions github-actions Bot added awaiting changes Awaiting changes and removed awaiting committer review Awaiting committer review labels Sep 17, 2026
@tadeja

tadeja commented Sep 17, 2026

Copy link
Copy Markdown
Member

Question -> Would it make sense to also exclude '!matlab/build/**' for matlab-ccache-ubuntu at line 77 & matlab-ccache-macos at line 126 (for consistency)?

I've (re)checked the failure ...🤷 :
The failure happens in wrapping up cleanup step Post Cache ccache
Error: The template is not valid. .github/workflows/matlab.yml (Line: 168, Col: 16): hashFiles('cpp/**, matlab/**') failed. Fail to hash files under directory 'D:\a\arrow\arrow'

EPERM: operation not permitted, stat 'D:\a\arrow\arrow\matlab\build\arrow_ep-build\_deps\boost-src\libs\decimal\doc\modules\ROOT\examples'

for a symlink that Windows cannot resolve:

D:\a\arrow\arrow\matlab\build\arrow_ep-build\_deps\boost-src\libs\decimal\doc\modules\ROOT\examples -> ..\..\..\example [SymbolicLink] container=False

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

@github-actions github-actions Bot added awaiting merge Awaiting merge and removed awaiting changes Awaiting changes labels Sep 17, 2026

@kou kou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1

Comment on lines 163 to 164
- name: Cache ccache
uses: actions/cache@v6

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

See comment below.

Suggested change
- 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-

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

Suggested change
restore-keys: matlab-ccache-windows-
key: matlab-ccache-windows
restore-keys: matlab-ccache-windows
- name: Build MATLAB Interface

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I've opened the following issue to track it in case we want to do that:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
- 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

@github-actions github-actions Bot added awaiting changes Awaiting changes and removed awaiting merge Awaiting merge labels Sep 18, 2026
Copilot AI review requested due to automatic review settings September 18, 2026 10:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 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 hashFiles enumerating files under cpp/, but this expression still includes cpp/**; excluding only matlab/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

@github-actions github-actions Bot added awaiting changes Awaiting changes and removed awaiting change review Awaiting change review labels Sep 18, 2026
@raulcd
raulcd merged commit b241bf7 into apache:main Sep 18, 2026
37 checks passed
@raulcd raulcd removed the awaiting changes Awaiting changes label Sep 18, 2026
@raulcd
raulcd deleted the GH-51335 branch September 18, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants