-
Notifications
You must be signed in to change notification settings - Fork 23
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
dvc exp run: fails when used with github actions and CML docker container #385
Comments
It looks like |
The issue is probably due to how
(see https://github.com/actions/checkout#checkout-v3) I'm guessing that the CML docker image doesn't include git >2.18, so using |
actions/checkout
and CML docker container
The cml docker image include Including additional debug information: git version
Directory contents
|
@tasdomas did you check that running the container yourself (or via ssh into it) or did you check it inside the actions workflow? It matters because the workflow |
This issue is specific to using the CML container import pygit2
pygit2.Repository(os.getcwd()) succeeds in regular GHA see: https://github.com/pmrowla/gha-test/actions |
The problem is that in the CML container the github workspace is created & owned by If you add
to your workflow run (anywhere before This is really something that should be probably be handled automatically in the CML container (perhaps via the see: https://github.com/pmrowla/gha-test/actions/runs/3219831064/jobs/5265728412 |
For reference, dulwich does not do the user permssion/safe.directory check at all which is why (almost) everything else in DVC works in the CML container other than |
Looking at it again I think I haven't tested this, so I'm not sure what the behavior inside custom containers and GHA is for git write operations. But if this is the case (and we can't write commits) this is also something that would need to be addressed on the CML side. (Either users need to use |
|
@tasdomas it's an interaction w/ how the GHA workspace is mounted inside the docker container, even though related: actions/runner#2033 |
actions/checkout
and CML docker container
Thanks @pmrowla - this looks like it's the cause. |
reopening this and transferring to CML for visibility |
I'm not sure if this is a p0 / or if this is something fixable on our end. It does not affect We can't chown the directory for users either, I tried a few other things but came up dry... |
Running any |
Not to mention that the official set-safe-directory:
description: Add repository path as safe.directory for Git global config by running `git config --global --add safe.directory <path>`
default: true |
@0x2b3bfa0 the checkout action only applies this change during checkout and it does not persist |
it does seems the quickest solution is to add a |
Thanks! 🤦🏼♂️ |
Does the It seems like the only thing that needs to be done here is to document that using DVC in github actions with the CML docker image essentially requires running (and all of the iterative example repos should use |
Err... no, the pull request was closed yesterday iterative/setup-cml#58 😅 |
so potentially an FAQ/known issue (missing |
Description
dvc get
fails in one of our example repos with the error response:None of the directories in that path are symlinks.
Running the
dvc get
command interactively (in an ssh session via action-tmate results in success - the action completes without error.Running with the
-vv
flag gives the following output:Reproduce
The only way of reproducing this that I've found is via github actions.
Expected
The
dvc get
command should download the requested data.Environment information
Output of
dvc doctor
:The text was updated successfully, but these errors were encountered: