Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI is failing in consistency checks due to weird path problems #2482

Open
oddhack opened this issue Jan 24, 2025 · 3 comments
Open

CI is failing in consistency checks due to weird path problems #2482

oddhack opened this issue Jan 24, 2025 · 3 comments
Assignees

Comments

@oddhack
Copy link
Contributor

oddhack commented Jan 24, 2025

Per https://github.com/KhronosGroup/Vulkan-Docs/actions/runs/12914759298/job/36015056855 :

if test `git grep -z -l 'Copyright.*The Khronos' | xargs -0 git grep -L 'Copyright.*2025.*The Khronos' | wc -l` != 0 ; then \
    echo "Files with out-of-date Khronos copyrights (must be updated to 2025:" ; \
    git grep -z -l 'Copyright.*The Khronos' | xargs -0 git grep -L 'Copyright.*2025.*The Khronos' ; \
    exit 1 ; \
 fi
fatal: detected dubious ownership in repository at '/__w/Vulkan-Docs/Vulkan-Docs'
To add an exception for this directory, call:

Result was that CI was not run for this stage, but did not fail.

We ran into this at one point a while back and the problem had to do with the odd '/__w' path that github Actions checkout the repository under. IIRC the solution then was to check out the repo under a different path, but that may not be viable here because this logic is not part of the CI script but more fundamental to Actions.

@gpx1000
Copy link
Contributor

gpx1000 commented Jan 24, 2025

FWIW, I think this is a git problem. I believe it can be solved either by ensuring the directory (if it already exists) is owned by the user of git, or a simpler solution is to disable the safe-directory check from git's config:
git config --global --add safe.directory '*'

If you want to be more targeted rather than disabling safe.directory everywhere, you can sub the wildcard for the problem path, or can add it to the user's gitconfig ~/.gitconfig.

or ensure the ownership of the folder is correct:
chown -R $(id -u):$(id -g) $PWD

This is a bug that pops up from time to time in github actions runner.

@oddhack
Copy link
Contributor Author

oddhack commented Jan 26, 2025

The 'user' is setup by Actions as part of cloning the repository and nothing about that is configurable AFAIK. Perhaps we could do the git config setting immediately after cloning it and before any CI stages run, though.

Related and now that I remember it, there was also an issue with image directives with the '__w' in their full path, which asciidoctor expanded as italics and failed to load.

@gpx1000
Copy link
Contributor

gpx1000 commented Jan 26, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants