You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
This PR resolves a persistent, global CI pipeline issue where parallel build configurations (e.g., TSAN, ASAN, various GCC versions)
frequently crash during the log-upload stage with a cp: cannot create regular file ... Permission denied error.
The Problem
The custom action upload_bazel_testlogs_on_failure was configured to copy failed test logs from all parallel jobs into a single
shared folder on the virtual runner machine: /home/runner/work/_temp/bazel-failed-testlogs/.
Because these parallel jobs run under different user accounts/IDs (due to containerization and sandbox isolation), the first job that failed created the directory structure under its own user.
Subsequent parallel jobs attempting to write their logs to the same shared sub-directories were blocked by the OS with a Permission denied error.
Additionally, the uploader was scanning the global VM cache directories (/home/runner/.cache/bazel and /home/runner/.bazel), which belong to other repositories' builds on the VM, causing further permissions conflicts.
The Solution
Directory Isolation: We make the temporary log directory completely unique for each parallel job by appending the job's unique artifact-name, github.run_id, and github.run_attempt to the path:
OUTPUT_DIR="${RUNNER_TEMP}/bazel-testlogs-${{ inputs.artifact-name }}-${{ github.run_id }}-${{ github.run_attempt }}"`
This isolates concurrent and historic builds completely.
Search Root Restriction: We restrict SEARCH_ROOTS to scan only${GITHUB_WORKSPACE} (following symlinks with find -L). This successfully finds and uploads 100% of the failed logs generated by the current build (including all compiled dependencies), while completely bypassing global VM caches and avoiding any external permission conflicts.
Hi @crimson11 and @LittleHuba, Kindly check this CI fix. Thanks!
I got this issue while I was facing unit test failure on this #455
Run ./.github/actions/00_infrastructure/upload_bazel_testlogs_on_failure Collect Bazel test logs 1m 37s Run set -euo pipefail cp: cannot create regular file '/home/runner/work/_temp/bazel-failed-testlogs/home/runner/.bazel/execroot/_main/bazel-out/k8-fastbuild/testlogs/third_party/score_baselibs/containers_component/test.log': Permission denied Error: Process completed with exit code 1. Upload Bazel test logs artifact 2s Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ Run actions/upload-artifact@v4 (node:237476) [DEP0040] DeprecationWarning: The punycodemodule is deprecated. Please use a userland alternative instead. (Usenode --trace-deprecation ...to show where the warning was created) With the provided path, there will be 842 files uploaded Artifact name is valid! Root directory input is valid! Beginning upload of artifact content to blob storage (node:237476) [DEP0169] DeprecationWarning:url.parse()behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued forurl.parse()vulnerabilities. Uploaded bytes 1778902 Finished uploading artifact content to blob storage! SHA256 digest of uploaded artifact zip is 762f1ecd961b77bf96d989148294d095300bd3003e1cf62ea0e612d2fcab62db Finalizing artifact upload Artifact bazel-testlogs-gcc15.zip successfully finalized. Artifact ID 8850242598 Artifact bazel-testlogs-gcc15 has been successfully uploaded! Final size is 1778902 bytes. Artifact ID is 8850242598 Artifact download URL: https://github.com/eclipse-score/communication/actions/runs/30798127796/artifacts/8850242598
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR resolves a persistent, global CI pipeline issue where parallel build configurations (e.g., TSAN, ASAN, various GCC versions)
frequently crash during the log-upload stage with a
cp: cannot create regular file ... Permission deniederror.The Problem
upload_bazel_testlogs_on_failurewas configured to copy failed test logs from all parallel jobs into a singleshared folder on the virtual runner machine:
/home/runner/work/_temp/bazel-failed-testlogs/.Permission deniederror./home/runner/.cache/bazeland/home/runner/.bazel), which belong to other repositories' builds on the VM, causing further permissions conflicts.The Solution
Directory Isolation: We make the temporary log directory completely unique for each parallel job by appending the job's unique
artifact-name,github.run_id, andgithub.run_attemptto the path:OUTPUT_DIR="${RUNNER_TEMP}/bazel-testlogs-${{ inputs.artifact-name }}-${{ github.run_id }}-${{ github.run_attempt }}"`
This isolates concurrent and historic builds completely.
Search Root Restriction: We restrict
SEARCH_ROOTSto scan only${GITHUB_WORKSPACE}(following symlinks withfind -L). This successfully finds and uploads 100% of the failed logs generated by the current build (including all compiled dependencies), while completely bypassing global VM caches and avoiding any external permission conflicts.