#@Erik Sipsma @vito Hey ๐Ÿš€

1 messages ยท Page 1 of 1 (latest)

tired ice
#

Yeah part of the changes are that now if you want files/dirs from outside your module's source directory they need to be explicit arguments to the module (probably to it's constructor).

What the use case here specifically? Like what files do you want want that exist outside of ci/? Can give more specific suggestions based on that

calm bough
#

For my typescript dev modules, I created it inside a sub directory named ci but it requires source from parent

peak musk
#

can't you put dagger.json at the top-level, and then have source: "ci"?

calm bough
queen coral
tired ice
# calm bough Would this work?

No not yet, source was actually removed in the previous changes (see this thread #1202321084016513044 message) so there's currently only a concept of a "root" and a source dir that contains all the module implementation code, but you can't separately configure a third variable of "subdir where the module implementation is"

peak musk
#

phew โค๏ธ i had a moment where i worried that we'd decided to get rid of this entirely ๐Ÿ˜„

calm bough
#

So python dev module is also broken?

#

Is there any workaround? Because I cannot access the source code from my module then :/

#

My need is

repo source code # <- how do I access this in the current state of dagger
ci/
   # Module implementation
queen coral
calm bough
#

Ughh I don't like this pattern

queen coral
#

Sorry

#

You would like even less what will happen to the ecosystem if we let that backdoor open

calm bough
#

Wdym?

queen coral
#

Inconsistent API for passing inputs. Maybe you pass the source code as an argument. Maybe it's implicitly available to the module because of where it's hosted. Maybe it's both, with co-located directory used as a default to the argument. There's no way to know! Just look at the README.

calm bough
#

I see

queen coral
#

It's the same problem as ambient access to environment variables

calm bough
#

Well, an argument in the top level object it will be then

strong wedge
tired ice
queen coral
dry talon
calm bough
#

Sounds okay

#

@errant yoke Here's the solution for your issue ๐Ÿ˜‰

dry talon
#

../ should work instead of $PWD/../, looks less scary ๐Ÿ˜›

strong wedge
#

Or: dagger call -m dev --source=. project terminal

calm bough
#

It says it requires an absolute path

calm bough
calm bough
# calm bough ^

host: directory: host directory ../: path ".." escapes workdir; use an absolute path instead โ”ƒ input: resolve: host: directory: host directory ../: path ".." escapes workdir; use an absolute path instead

queen coral
tired ice
calm bough
#

For now I'll use Helder's method, it works well

#

I kinda like the new way, it feels more generic

peak musk
#

e.g. a modified server could grab a bunch of extra stuff

tired ice
#

Like a modified server would have to be a fork of dagger, at which point users are on their own ๐Ÿ™‚

peak musk
#

i think the weird scenario i'm imagining is like in the context of a remote dagger engine (like one in kubernetes), or the future with compute drivers.
essentially, if i can trick you into connecting to my dagger engine, i can grab any file from your machine

#

super unlikely today, but i would potentially classify it as a bit of a security issue. but very minor, since it's only possible for weirder configurations of dagger (and not the default we ship)

tired ice
# peak musk i think the weird scenario i'm imagining is like in the context of a remote dagg...

There is actually an option for the engine client to disable the filesync attachables already: https://github.com/sipsma/dagger/blob/49392773866282928a35f1590e210c01a5ed9827/engine/client/client.go#L65-L65 (think playground uses it), which could be exposed in the CLI for the paranoid if we wanted. But generally speaking if you connect to an evil engine, it can do all sorts of awful things outside of just reading files so I think we just need to approach the problem as ensuring clients connect to an engine they trust

peak musk
tired ice