From a9c3d63c745c0de7e5deaf7e12caf9fe06098715 Mon Sep 17 00:00:00 2001 From: Evan Parker Date: Fri, 23 Aug 2024 14:10:47 -0600 Subject: [PATCH] Add a clause in the cleanup to fix directory permissions (#1273) A change in #1270 uncovered a behavior where go mod derived package install modules cannot be removed from our scratch directory due to undesirable folder permissions. This has been observed before and golang maintainers marked the behavior as WAI suggesting that people maintain these directory trees with go-language tools. In our case this is not highly feasible due to spack's intervention in the project structure meaning we must find a workaround. The workaround here uses find to update directory permissions to ensure that write/execute is set on all directories in the tree. This has been tested locally but due to environment carryover we cannot ensure it has the desired effect for go packages in our CI system until it is submitted. (Ie; testing would require re-running an affected workflow and all other pull requests would still be subject to the issue and would break). --- .github/workflows/macos-ci-aarch64.yaml | 1 + .github/workflows/ubuntu-ci-x86_64-gnu.yaml | 1 + .github/workflows/ubuntu-ci-x86_64-intel.yaml | 1 + .github/workflows/ubuntu-ci-x86_64-oneapi.yaml | 1 + 4 files changed, 4 insertions(+) diff --git a/.github/workflows/macos-ci-aarch64.yaml b/.github/workflows/macos-ci-aarch64.yaml index 514b01d0d..3fd14bf0d 100644 --- a/.github/workflows/macos-ci-aarch64.yaml +++ b/.github/workflows/macos-ci-aarch64.yaml @@ -20,6 +20,7 @@ jobs: run: | pwd ls -lart + find ./* -type d -exec chmod u+xw {} \; rm -fr * - name: checkout diff --git a/.github/workflows/ubuntu-ci-x86_64-gnu.yaml b/.github/workflows/ubuntu-ci-x86_64-gnu.yaml index 8a60dc15c..f5f0f368f 100644 --- a/.github/workflows/ubuntu-ci-x86_64-gnu.yaml +++ b/.github/workflows/ubuntu-ci-x86_64-gnu.yaml @@ -20,6 +20,7 @@ jobs: run: | pwd ls -lart + find ./* -type d -exec chmod u+xw {} \; rm -fr * - name: checkout diff --git a/.github/workflows/ubuntu-ci-x86_64-intel.yaml b/.github/workflows/ubuntu-ci-x86_64-intel.yaml index cb44dafaf..c65bef690 100644 --- a/.github/workflows/ubuntu-ci-x86_64-intel.yaml +++ b/.github/workflows/ubuntu-ci-x86_64-intel.yaml @@ -20,6 +20,7 @@ jobs: run: | pwd ls -lart + find ./* -type d -exec chmod u+xw {} \; rm -fr * - name: checkout diff --git a/.github/workflows/ubuntu-ci-x86_64-oneapi.yaml b/.github/workflows/ubuntu-ci-x86_64-oneapi.yaml index 44eeec3aa..4916686cb 100644 --- a/.github/workflows/ubuntu-ci-x86_64-oneapi.yaml +++ b/.github/workflows/ubuntu-ci-x86_64-oneapi.yaml @@ -20,6 +20,7 @@ jobs: run: | pwd ls -lart + find ./* -type d -exec chmod u+xw {} \; rm -fr * - name: checkout