#o got this:

1 messages ยท Page 1 of 1 (latest)

pale goblet
#

๐Ÿ‘‹ creating a thread

#

can you please share how your dagger.json looks like?

crude lichen
#

bat dagger.json
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
โ”‚ File: dagger.json
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
1 โ”‚ {
2 โ”‚ "name": "library fetching",
3 โ”‚ "sdk": "python",
4 โ”‚ "source": "dagger",
5 โ”‚ "engineVersion": "v0.13.6"
6 โ”‚ }

pale goblet
#

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

crude lichen
#

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 ?

pale goblet
#

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

crude lichen
#

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

pale goblet
#

it's a ๐Ÿ› where we're not handing module names with spaces correctly

crude lichen
#

{
"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 ?

placid whale
#

You don't point to the source code, you point -m to the directory where dagger.json is.

crude lichen
#

ahhh .son is under this folder "library_fetching" i see

placid whale
#

If you're already in that dir then you don't need -m.

crude lichen
#

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:

pale goblet
pale goblet
#

@crude lichen feel free to ping if you're stuck ๐Ÿ™

placid whale
#

In the CLI, functions get converted to snake case:

dagger -m ./library_fetching call move-files-from-submodule
crude lichen
pale goblet
#

as that's the convention for CLI commands generally

crude lichen
#

i will make some test, thanks you guys

#

thanks for taking time to explain me, hope you have a nice day

digital spruce
# pale goblet this is the answer <@310785989754748928> . We convert functions to snake case in...

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.

The Dagger CLI lets you call both the core and extended Dagger API (the core APIs plus the new APIs provided by Dagger Functions) directly from the command-line via the dagger core and dagger call commands.