#Yes, you should be able to do something

1 messages ยท Page 1 of 1 (latest)

atomic frigate
#

@quartz pulsar let me know if you'd like to sync up and try that at some point ๐Ÿ™‚ I'd love to document it. We've had users doing just that.

quartz pulsar
#

How does one configure dagger engine to listen on a specific port so I can connect to it via TCP?

#

@atomic frigate I'm guessing it would be something like this but I don't know what port Dagger exposes for TCP connectivity, I assume I would also need to enable that by providing a custom engine.json to the service.

.dagger:
  services:
    - name: registry.dagger.io/engine:v0.18.16
      alias: dagger-engine
  image: alpine:latest
  variables:
    _EXPERIMENTAL_DAGGER_RUNNER_HOST: tcp://dagger-engine:<port>
    _EXPERIMENTAL_DAGGER_CACHE_CONFIG: type=registry,mode=max,ref=${CI_REGISTRY_IMAGE}/dagger/cache:latest
  before_script:
    - apk add curl
    - curl -fsSL https://dl.dagger.io/dagger/install.sh | BIN_DIR=/usr/local/bin sh

stages:
  - test

test:
  extends:
    - .dagger
  stage: test
  script:
    - dagger -m github.com/kpenfound/dagger-modules/golang@v0.2.0 call test --source=.
fallow oxide
quartz pulsar
#

Is there a way to use the cache locally but not have dagger export the cache?

Using _EXPERIMENTAL_DAGGER_CACHE_CONFIG="type=registry,mode=max,ref=registry.gitlab.com/jshbrntt/pipelines/dagger/cache:latest" appears to do both --cache-from and --cache-to, when I just want --cache-from locally.

fallow oxide
#

ah but for specifically registry caching, I don't think so. TBH I wouldn't rely on that because it doesn't include all of daggers cache and its flaky at best

quartz pulsar
#

There are the follow env vars in the dagger source so maybe just set the import one? thinkies

  • _EXPERIMENTAL_DAGGER_CACHE_EXPORT_CONFIG
  • _EXPERIMENTAL_DAGGER_CACHE_IMPORT_CONFIG
  • _EXPERIMENTAL_DAGGER_CACHE_CONFIG
fallow oxide
#

worth a shot!

quartz pulsar
#

Yeah it didn't appear to like that sadly. ๐Ÿ™

$ dagger call grep-dir --directory-arg . --pattern pipelines
โ–ถ connect 0.4s
โ–ผ load module: . 2.5s ERROR
โ•ฐโ”€โœ˜ Container.withExec(
    โ”† args: ["codegen", "generate-module", "--output", "/src", "--module-source-path", "/src", "--module-name", "python-sdk", "--introspection-json-path", "/schema.json"]
    ): Container! 0.5s ERROR
  ! process "codegen generate-module --output /src --module-source-path /src --module-name python-sdk --introspection-json-path /schema.json" did not complete successfully: open /runtime: no such file or directory
#

Should work though, I'll try re-creating the engine container.

#

It worked. ๐Ÿ™Œ