#Remote modules in github actions

1 messages · Page 1 of 1 (latest)

amber cargo
#

Hi, Im trying out dagger in github actions with one central repo with all the pipelines. It works fine when I try this locally but when running in github actions it's having trouble with finding the module.

It looks like the authentication with ssh is working fine as I had some problems with it before and managed to fix it. When I try to run this locally with the ssh agent and dagger -m git@github.com:company/dagger-pipelines.git/testing call container-echo --string-arg test it works fine
Any ideas what could be the issue? Thanks

#

Here's the error logs

13  : consuming /v1/metrics DONE [0.0s]
14  : moduleSource(refString: "git@github.com:company/dagger-pipelines.git/testing"): ModuleSource!
14  : moduleSource ERROR [0.4s]
14  : ! failed to resolve git src to commit: failed to load cache key: NotFound: rpc error: code = NotFound desc = socket default not found
1   : container-echo --string-arg test
10  : │ load module
11  : │ │ finding module configuration ERROR [0.5s]
11  : │ │ ! failed to get module ref kind: input: moduleSource failed to resolve git src to commit: failed to load cache key: NotFound: rpc error: code = NotFound desc = socket default not found

10  : │ load module ERROR [0.5s]
10  : │ ! failed to get configured module: failed to get module ref kind: input: moduleSource failed to resolve git src to commit: failed to load cache key: NotFound: rpc error: code = NotFound desc = socket default not found

1   : container-echo --string-arg test
1   : [0.6s] | Error: failed to get configured module: failed to get module ref kind: input: moduleSource failed to resolve git src to commit: failed to load cache key: NotFound: rpc error: code = NotFound desc = socket default not found
1   : [0.6s] | 
1   : container-echo --string-arg test ERROR [0.6s]
1   : ! exit code 1
Error: failed to get configured module: failed to get module ref kind: input: moduleSource failed to resolve git src to commit: failed to load cache key: NotFound: rpc error: code = NotFound desc = socket default not found
A new release of dagger is available: v0.15.4 → v0.16.1

#

and code

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4.1.6

      - name: Prepare ssh key
        run: |
          eval "$(ssh-agent -s)"
          ssh-add -D
          ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}"
          echo $SSH_AUTH_SOCK

      - name: dagger test
        uses: dagger/dagger-for-github@v7.0.6
        with:
          verb: call
          module: git@github.com:company/dagger-pipelines.git/testing
          args: >- 
            container-echo
            --string-arg "test"
barren tinsel
#

I don't think that's the issue though. I mostly want to rule out a version issue

amber cargo
#

Hi, yeah have 0.15.4 everywhere

barren tinsel
#

I'll also run a quick test to verify all works here

#

1 sec

amber cargo
#

That's a good point. It was failing so I added ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts after which ssh -T git@github.com passed but the errors from the dagger call are still there

barren tinsel
#

@amber cargo IIRC each step has its own shell in GHA so I think tha the eval exports won't be seen by the dagger step

#

I'm googling to confirm that now

#

we're working to improve these error messages. cc @heady shoal

amber cargo
#

Yeah it looks like you're correct. I've just tried to put everything into one step just to make sure and it works now