cp2k / dbcsr

DBCSR: Distributed Block Compressed Sparse Row matrix library
https://cp2k.github.io/dbcsr/
GNU General Public License v2.0
135 stars 47 forks source link

GitHub Actions fail to checkout repository #607

Closed hfp closed 2 years ago

hfp commented 2 years ago

Perhaps it can be worked around with suggestions taken from https://github.com/actions/checkout/issues/760. However, it is not understood well why this issue appeared.

alazzaro commented 2 years ago

yes, it seems so... I discussed with @dev-zero . Ideally, it would be good to have an official fix, no workaround...

let's rely on daint for the moment...

hfp commented 2 years ago

ACK, i.e., if Daint-CI passes - PR can be merged.

hfp commented 2 years ago

Btw, rerunning failed actions does not help.

dev-zero commented 2 years ago

that's a fallout of a fix to the latest git CVE (and the git versions inside most of our build containers have been updated), I expect a general solution in the actions/checkout to appear soon'ish.

hfp commented 2 years ago

The issue is supposedly fixed (and already released upstream). I reran all failed tests for the (currently) latest merged commit (which passed at least Daint-CI for the merge), and everything seems to pass now except the test called "pre-commit" which is still failing:

fatal: unsafe repository ('/__w/dbcsr/dbcsr' is owned by someone else)
To add an exception for this directory, call:

    git config --global --add safe.directory /__w/dbcsr/dbcsr

This might be also because of simply rerunning tests for something committed before the fix.

hfp commented 2 years ago

The pre-commit check continues to fail even for new PRs.

alazzaro commented 2 years ago

I think the problem is the that here we are running the command:

pre-commit run --all-files || ( git status --short ; git diff ; exit 1 )

which includes git. I think we can add git config --global --add safe.directory for this stage. @dev-zero any idea?

dev-zero commented 2 years ago

@alazzaro yes, this seems to be the solution for now. Applied to both our pre-commit and as a step to the github pages deployment which suffers from the same issue.