docs: Add note on constraints for defaultPath#8658
Conversation
| - resolution always starts from the directory containing a `dagger.json` file. | ||
|
|
||
| :::important | ||
| For security reasons, it is not possible to retrieve files or directories outside the default context's root directory. |
There was a problem hiding this comment.
This is conflating a few terms. To clarify:
- default path: a path within the context directory, to load a directory/file as a default value
- context directory: repo root if in a git repo, or the root directory otherwise
- root directory: the directory where
dagger.jsonis - source directory: the sub-directory within the root directory, used by the SDK (
sourcefield indagger.json)
So there's no "default context". This is more correct:
| For security reasons, it is not possible to retrieve files or directories outside the default context's root directory. | |
| For security reasons, it is not possible to retrieve files or directories outside the context directory. |
But the terminology may be a leaking implementation detail if there's a simpler way to explain this (without conflicting with current terminology).
There was a problem hiding this comment.
I've modified this entire section using the terms "context directory" and "default path". I've not mentioned "source directory" as it did not seem relevant to this section, but let me know in case I got that wrong. I've also updated the example table. Let me know if this version is clearer.
5a3f174 to
e2bb6ae
Compare
TomChv
left a comment
There was a problem hiding this comment.
Left only 1 comment, otherwise it's much more clear! Thanks for these changes
| | `.` | `dagger call -m my-module read-dir --source=public` | `./public` | | ||
| | `..` | `dagger call -m my-module read-dir --source=public` | `./public` | | ||
|
|
||
| :::tip |
e2bb6ae to
d81b9d8
Compare
TomChv
left a comment
There was a problem hiding this comment.
Answered the question, please fix the table ;)
Signed-off-by: Vikram Vaswani <vikram@dagger.io>
d81b9d8 to
43d7359
Compare
Signed-off-by: Vikram Vaswani <vikram@dagger.io>
No description provided.