#How to solve the “works on my machine" problem for your CI/CD workflows

1 messages · Page 1 of 1 (latest)

lone dove
#

In his new video, Emmanuel Sibanda delves into the common challenge of discrepancies between local and production environments affecting test results.

He identifies potential causes, such as differing environment configurations and system libraries, and offers practical solutions. By aligning local and production environments and utilizing sta...

▶ Play video
lone dove
#

@random basin were you able to use this module yet? I didn't see it on the Daggerverse, so wanted to check if you ran into any issues. cc @patent timber @glacial forum @granite token

random basin
#

Not yet @lone dove @patent timber @glacial forum @granite token . I tried to manually publish my module:

git init git add runTests/ git commit -m "Initial commit" git remote add origin git@github.com:EmmS21/daggerverse.git git push origin main

I assume this module has been published?:
Enumerating objects: 13, done. Counting objects: 100% (13/13), done. Delta compression using up to 8 threads Compressing objects: 100% (6/6), done. Writing objects: 100% (7/7), 547 bytes | 547.00 KiB/s, done. Total 7 (delta 4), reused 0 (delta 0), pack-reused 0 (from 0) remote: Resolving deltas: 100% (4/4), completed with 4 local objects. To github.com:EmmS21/daggerverse.git 48f8bba..c0da09e main -> main

Howevern when I search for my module in the Daggerverse runTests or any module attached to my username EmmS21 I do not see anything

patent timber
#

If you want your repo to be a place where you keep many Dagger modules, some folks have followed a convention of calling the repo daggerverse and then having a subdirectory for each module. Today, you have some intervening dagger subdirs that are not necessary:

tree daggerverse -L 3
daggerverse
├── README.md
└── dagger
    ├── README.md
    ├── dagger
    │   └── runTests
    └── runTests
        ├── dagger
        └── dagger.json
#

I'd go to this structure instead, by moving runTests directly under daggerverse:

daggerverse
├── README.md
└── runTests
    ├── dagger
    └── dagger.json
#

advanced note: you could simplify further by not having the dagger subdir under runTests. We're likely getting rid of that soon, but nothing you need to worry about now. If you move it, then you'd also change source: in dagger.json.

#

also since the README.md seems to pertain to runTests, I'd move it inside that directory to get to this structure:

daggerverse
└── runTests
    ├── README.md
    ├── dagger
    └── dagger.json
#

The idea here is that you can have a monorepo to hold all your Dagger modules. If you added three more modules, foo, bar, baz, then your repo might look like:

daggerverse
├── bar
│   └── dagger.json
├── baz
│   └── dagger.json
├── foo
│   └── dagger.json
└── runTests
    ├── README.md
    ├── dagger
    └── dagger.json
#

If you like, I can make a PR to your repo with the structure 🙂

simple panther
#

@random basin - are you open to meeting with me for 30 minutes to share more about your use cases? I'm the product manager working in this area at Dagger.

random basin
#

@patent timber Thanks, I managed to publish my module. But when i install the module I get the error:

Error: failed to get configured module: no dagger.json found in directory . or any parents up to git root

This happens for both modules I published:
https://daggerverse.dev/mod/github.com/EmmS21/daggerverse/createSvelteTests@7e849aa2b637867da05d00a5bf3391cbddd1c2f0
https://daggerverse.dev/mod/github.com/EmmS21/daggerverse/runTests@841e041068a19582e35cd6f56bf4f12df9d6ea0a

I have a dagger.json for each module and as far I can tell my repo is structured correctly

#

@simple panther That sounds good, what days and times typically work best for you?