Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 22, 2025

Fixes #issue_number

Description

macOS PR builds fail during cache restoration with:

hashFiles('.build/packagelockhash') failed. Fail to hash files under directory '/Users/runner/work/vscode/vscode'

GitHub Actions' hashFiles() function errors when encountering broken symlinks during directory traversal—a known runner issue particularly affecting macOS.

Changes

  • Broken symlink cleanup: Added find command to remove broken symlinks before hashFiles() calls, optimized to skip node_modules
  • Cache key verification: Added validation that .build/packagelockhash and .build/builtindepshash files are created and non-empty
  • Debug output: Log cache key hashes for troubleshooting

Modified steps in .github/workflows/pr-darwin-test.yml:

  • Prepare node_modules cache key
  • Prepare built-in extensions cache key
Original prompt

This section details on the original issue you should resolve

<issue_title>Mac OS PR builds fail with 'The template is not valid'</issue_title>
<issue_description>E.g. https://github.com/microsoft/vscode/actions/runs/19597747630/job/56124714358?pr=278624

Error: The template is not valid. microsoft/vscode/.github/workflows/pr-darwin-test.yml@7fbb6cfc7f88ab49739d74ce2aced0e8f7b1fe00 (Line: 42, Col: 16): hashFiles('.build/packagelockhash') failed. Fail to hash files under directory '/Users/runner/work/vscode/vscode'

Image</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fix Mac OS PR builds failing due to invalid template Fix macOS PR builds failing with hashFiles broken symlink error Nov 22, 2025
Copilot AI requested a review from TylerLeonhardt November 22, 2025 16:52
Copilot finished work on behalf of TylerLeonhardt November 22, 2025 16:52
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.

Mac OS PR builds fail with 'The template is not valid'

2 participants