#o got this:
1 messages ยท Page 1 of 1 (latest)
bat dagger.json
โโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ File: dagger.json
โโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
1 โ {
2 โ "name": "library fetching",
3 โ "sdk": "python",
4 โ "source": "dagger",
5 โ "engineVersion": "v0.13.6"
6 โ }
ok, seems like the issue is the space in the name field. I recall this being in a GH issue. cc @left smelt
I think if you add a - and set it like library-fetching that will fix it
a question:
this name library fetching is take from the folder name, if i rename the folder name i need change this string in the json ?
you can only change the dagger.json and that will fix it
even if you rename the folder, you'll still have to change the dagger.json because dagger already created the project and the code strucutre with that name
yes that fix the isssue
๏ฒ dagger functions
โ connect 0.3s
โ initialize 11.8s
Name Description
commit-and-push-changes Commit and push any changes made to the main repository.
initialize-repo-and-submodule Clone the main repository, check out the main branch, and add a submodule.
move-files-from-submodule Move specified files from the submodule to target paths.
remove-submodule Remove the submodule from the repository.
now locally works
how about in azure, the yamk already is update
it's a ๐ where we're not handing module names with spaces correctly
azure will be the same as local
{
"name": "library_fetching",
"sdk": "python",
"source": "dagger",
"engineVersion": "v0.13.6"
}
i call the dagger using this command :
dagger -m "./library_fetching/dagger/src/main" call LibraryFetching.move_files_from_submodule \
or
dagger -m "./library_fetching/dagger/src/main" call move_files_from_submodule \
do i need add some other flag or something ?
You don't point to the source code, you point -m to the directory where dagger.json is.
ahhh .son is under this folder "library_fetching" i see
If you're already in that dir then you don't need -m.
i updated the azure pipeline to call using this line:
dagger -m "./library_fetching" call move_files_from_submodule \
still face the issue :
and this. is my .py, in azure not succed to call the function
this is the step that got the error:
Do you see the function with dagger functions when running that locally?
@crude lichen feel free to ping if you're stuck ๐
In the CLI, functions get converted to snake case:
dagger -m ./library_fetching call move-files-from-submodule
locally works i can see the duntions
this is the answer @crude lichen . We convert functions to snake case in the CLI
as that's the convention for CLI commands generally
i will make some test, thanks you guys
thanks for taking time to explain me, hope you have a nice day
our pleasure!
I call that kebab-case ๐ข ๐ก for the shell where the words are "skewered" on dashes ๐
vs Python's default of snake_case ๐ with the underscores "slithering" along the "ground"
Guessing kebab-case is what was meant above
https://docs.dagger.io/api/cli/#custom-dagger-functions:~:text=When using dagger call%2C all names (functions%2C arguments%2C struct fields%2C etc) are converted into a shell-friendly "kebab-case" style.