Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,13 @@ jobs:
echo "musl-${{ matrix.java_version }}-${{ matrix.config }}-aarch64" >> failures_musl-${{ matrix.java_version }}-${{ matrix.config }}-aarch64.txt
exit 1
fi
- name: Fix permissions for artifact upload

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Sphinx Review — LOW] This fixes the symptom (root-owned files left by the container) rather than the cause. The Docker invocations run as root by default (no --user flag) and bind-mount the workspace, so every file the container writes is owned by root and unreadable/undeletable by the runner user. The chmod-after-the-fact approach must be replicated at every container step (already two copies, with diverging scope) and re-applied for any future container step.

Suggestion: Consider running the containers with --user $(id -u):$(id -g) so emitted files are owned by the runner user, removing the need for repeated post-hoc sudo chmod. If the in-container toolchain requires root, keep the chmod but extract it to a single reused step.

if: always()
run: |
# Files created by Docker container may have restrictive permissions
# that prevent GitHub Actions from reading them during artifact creation.
# Use a+rX (umask-independent) where X adds execute only to directories.
sudo chmod -R a+rX build/ ddprof-test/build/ ddprof-lib/build/ || true
- name: Generate Unwinding Report
if: success() && matrix.config == 'debug'
run: |
Expand All @@ -580,6 +587,9 @@ jobs:
\"${{ github.sha }}\" \"musl/${{ matrix.java_version }}-${{ matrix.config }}-aarch64\" \
\"${{ matrix.config }}\" \"${{ env.JAVA_HOME }}\" \"${{ env.JAVA_TEST_HOME }}\"
"
# Fix permissions after Docker container execution (both top-level and subproject builds).
# Use a+rX (umask-independent) where X adds execute only to directories.
sudo chmod -R a+rX build/ ddprof-test/build/ ddprof-lib/build/ || true
- name: Add Unwinding Report to Job Summary
if: success() && matrix.config == 'debug' && hashFiles('ddprof-test/build/reports/unwinding-summary.md') != ''
run: |
Expand Down
Loading