sigcore
sigcore16mo ago

Error when running wmill sync pull due to temp dir?

I'm trying to run wmill sync pull for the first time (on a macbook) and it's immediately throwing this error:
❯ wmill sync pull
Computing the files to update locally to match remote (taking .wmillignore into account)
Failed to request tarball from API Internal Server Error
error: Uncaught Error: IO error: Permission denied (os error 13) at path "/usr/src/app/./.tmpIEeDXc"
throw new Error(await zipResponse.text());
^
at downloadZip (https://deno.land/x/wmill@v1.131.0/pull.ts:36:11)
at eventLoopTick (ext:core/01_core.js:183:11)
at async Command.pull [as actionHandler] (https://deno.land/x/wmill@v1.131.0/sync.ts:416:6)
at async Command.execute (https://deno.land/x/cliffy@v1.0.0-rc.2/command/command.ts:1948:7)
at async Command.parseCommand (https://deno.land/x/cliffy@v1.0.0-rc.2/command/command.ts:1780:14)
at async https://deno.land/x/wmill@v1.131.0/main.ts:130:3
❯ wmill sync pull
Computing the files to update locally to match remote (taking .wmillignore into account)
Failed to request tarball from API Internal Server Error
error: Uncaught Error: IO error: Permission denied (os error 13) at path "/usr/src/app/./.tmpIEeDXc"
throw new Error(await zipResponse.text());
^
at downloadZip (https://deno.land/x/wmill@v1.131.0/pull.ts:36:11)
at eventLoopTick (ext:core/01_core.js:183:11)
at async Command.pull [as actionHandler] (https://deno.land/x/wmill@v1.131.0/sync.ts:416:6)
at async Command.execute (https://deno.land/x/cliffy@v1.0.0-rc.2/command/command.ts:1948:7)
at async Command.parseCommand (https://deno.land/x/cliffy@v1.0.0-rc.2/command/command.ts:1780:14)
at async https://deno.land/x/wmill@v1.131.0/main.ts:130:3
The path changes each time, but doesn't seem to be using any of the common environment variables like TMPDIR. Is there a setting to change where the wmill cli stores temporary files?
26 Replies
sigcore
sigcore16mo ago
I just realized that error is coming from the server, not the client. But I still have the same issue, it keeps trying to use /usr/src/app instead of TMPDIR
rubenf
rubenf16mo ago
The error is coming from the client
sigcore
sigcore16mo ago
That error was from the wmill cli, but I see it in the windmill server logs too:
2023-07-14T22:29:03.991077Z ERROR request: windmill_common::error: error="IO error: Permission denied (os error 13) at path \"/usr/src/app/./.tmpFa4tMz\"" method=GET uri=/api/w/homelab/workspaces/tarball?archive_type=zip&plain_secret=false&skip_variables=false&skip_resources=false&skip_secrets=false ...
2023-07-14T22:29:03.991077Z ERROR request: windmill_common::error: error="IO error: Permission denied (os error 13) at path \"/usr/src/app/./.tmpFa4tMz\"" method=GET uri=/api/w/homelab/workspaces/tarball?archive_type=zip&plain_secret=false&skip_variables=false&skip_resources=false&skip_secrets=false ...
rubenf
rubenf16mo ago
I'm a bit confused by that actually
sigcore
sigcore16mo ago
I'm running the windmill server container as a non-root user. I just checked the example docker-compose file and it doesn't look like it specifies a user, but /usr/src/app is owned by root Is it expected to run as root? Or it might be a bug if it's just only been tested that way I set the work_dir to /tmp for the windmill server container and that made the error go away
rubenf
rubenf16mo ago
👍 How are you running things btw ? What is this work_dir setting?
sigcore
sigcore16mo ago
Sorry, it's working_dir for docker-compose.yml. I'm using hashicorp nomad to run it though, and that one is work_dir for the same option. I think you can specify it in the Dockerfile too, but I still think it might be a bug if the app doesn't honor the TMPDIR variable https://github.com/compose-spec/compose-spec/blob/master/spec.md#working_dir
Alper
Alper13mo ago
i have exactly the same problem. i'm using the original docker-compose.yml file: https://github.com/windmill-labs/windmill/blob/main/docker-compose.yml client:
❯ wmill sync pull
Computing the files to update locally to match remote (taking .wmillignore into account)
Failed to request tarball from API Internal Server Error
error: Uncaught (in promise) Error: IO error: No such file or directory (os error 2) at path "/tmp/windmill/.tmpoldjys"
throw new Error(await zipResponse.text());
^
at downloadZip (https://deno.land/x/wmill@v1.181.0/pull.ts:47:11)
at eventLoopTick (ext:core/01_core.js:183:11)
at async Command.pull [as actionHandler] (https://deno.land/x/wmill@v1.181.0/sync.ts:432:6)
at async Command.execute (https://deno.land/x/cliffy@v1.0.0-rc.2/command/command.ts:1948:7)
at async Command.parseCommand (https://deno.land/x/cliffy@v1.0.0-rc.2/command/command.ts:1780:14)
at async https://deno.land/x/wmill@v1.181.0/main.ts:133:3
❯ wmill sync pull
Computing the files to update locally to match remote (taking .wmillignore into account)
Failed to request tarball from API Internal Server Error
error: Uncaught (in promise) Error: IO error: No such file or directory (os error 2) at path "/tmp/windmill/.tmpoldjys"
throw new Error(await zipResponse.text());
^
at downloadZip (https://deno.land/x/wmill@v1.181.0/pull.ts:47:11)
at eventLoopTick (ext:core/01_core.js:183:11)
at async Command.pull [as actionHandler] (https://deno.land/x/wmill@v1.181.0/sync.ts:432:6)
at async Command.execute (https://deno.land/x/cliffy@v1.0.0-rc.2/command/command.ts:1948:7)
at async Command.parseCommand (https://deno.land/x/cliffy@v1.0.0-rc.2/command/command.ts:1780:14)
at async https://deno.land/x/wmill@v1.181.0/main.ts:133:3
rubenf
rubenf13mo ago
I will look into it, we did changes yesterday about it
Alper
Alper13mo ago
server:
flickvibe-hq-windmill_server-1 | 2023-10-06T15:26:07.116157Z INFO request: windmill_api::tracing_init: response latency=1 status=200 method=GET uri=/api/users/whoami username="alportac@gmail.com" email="********@gmail.com"
flickvibe-hq-windmill_server-1 | 2023-10-06T15:26:07.145505Z ERROR request: windmill_common::error: error="IO error: No such file or directory (os error 2) at path \"/tmp/windmill/.tmpftE1Nk\"" method=GET uri=/api/w/flickvibe/workspaces/tarball?archive_type=zip&plain_secret=false&skip_variables=false&skip_resources=false&skip_secrets=false&include_schedules=false username="Alp" email="********@gmail.com" workspace_id="flickvibe"
flickvibe-hq-windmill_server-1 | 2023-10-06T15:26:07.145608Z INFO request: windmill_api::tracing_init: response latency=0 status=500 method=GET uri=/api/w/flickvibe/workspaces/tarball?archive_type=zip&plain_secret=false&skip_variables=false&skip_resources=false&skip_secrets=false&include_schedules=false username="Alp" email="********@gmail.com" workspace_id="flickvibe"
flickvibe-hq-windmill_server-1 | 2023-10-06T15:26:07.116157Z INFO request: windmill_api::tracing_init: response latency=1 status=200 method=GET uri=/api/users/whoami username="alportac@gmail.com" email="********@gmail.com"
flickvibe-hq-windmill_server-1 | 2023-10-06T15:26:07.145505Z ERROR request: windmill_common::error: error="IO error: No such file or directory (os error 2) at path \"/tmp/windmill/.tmpftE1Nk\"" method=GET uri=/api/w/flickvibe/workspaces/tarball?archive_type=zip&plain_secret=false&skip_variables=false&skip_resources=false&skip_secrets=false&include_schedules=false username="Alp" email="********@gmail.com" workspace_id="flickvibe"
flickvibe-hq-windmill_server-1 | 2023-10-06T15:26:07.145608Z INFO request: windmill_api::tracing_init: response latency=0 status=500 method=GET uri=/api/w/flickvibe/workspaces/tarball?archive_type=zip&plain_secret=false&skip_variables=false&skip_resources=false&skip_secrets=false&include_schedules=false username="Alp" email="********@gmail.com" workspace_id="flickvibe"
ty appreciated if i open the url directly i get the same error btw: http://my-windmill-instance/api/w/flickvibe/workspaces/tarball?archive_type=zip&plain_secret=false&skip_variables=false&skip_resources=false&skip_secrets=false&include_schedules=false
IO error: No such file or directory (os error 2) at path "/tmp/windmill/.tmpXCRk7s"
IO error: No such file or directory (os error 2) at path "/tmp/windmill/.tmpXCRk7s"
rubenf
rubenf13mo ago
should be fixed on next commit
Alper
Alper13mo ago
wow, that was fast so whenever there is a new version in https://github.com/windmill-labs/windmill/releases i can update my docker image?
rubenf
rubenf13mo ago
it doesn ot require a release should be ready in a few mins
Alper
Alper13mo ago
i stopped docker compose, ran docker compose pull and saw it refetched the "lsp" image restarted the services, but still got the same error when i try to sync. maybe i'm too impatient 😅
rubenf
rubenf13mo ago
you can repull now
Alper
Alper13mo ago
it pulled the worker_native image and now the sync works! impressive, thx a lot not sure if this is related, but pushing doesn't work for me error on the client:
? Do you want to apply these 2 changes? (Y/n) › Yes
Applying changes to files ...
Editing flow f/imdb_web/imdb_init_ratings.flow/inline_script_0.inline_script.py
error: Uncaught (in promise) NotFound: No such file or directory (os error 2): readfile 'f/imdb_web/imdb_init_ratings.flow/flow.yaml'
const localFlowRaw = await Deno.readTextFile(localFlowPath + "flow.yaml");
^
at async Object.readTextFile (ext:deno_fs/30_fs.js:747:18)
at async pushFlow (https://deno.land/x/wmill@v1.181.0/flow.ts:48:24)
? Do you want to apply these 2 changes? (Y/n) › Yes
Applying changes to files ...
Editing flow f/imdb_web/imdb_init_ratings.flow/inline_script_0.inline_script.py
error: Uncaught (in promise) NotFound: No such file or directory (os error 2): readfile 'f/imdb_web/imdb_init_ratings.flow/flow.yaml'
const localFlowRaw = await Deno.readTextFile(localFlowPath + "flow.yaml");
^
at async Object.readTextFile (ext:deno_fs/30_fs.js:747:18)
at async pushFlow (https://deno.land/x/wmill@v1.181.0/flow.ts:48:24)
rubenf
rubenf13mo ago
well is that true ? Does the file not exist ?
Alper
Alper13mo ago
it does not exist locally, yes
rubenf
rubenf13mo ago
well then ...
Alper
Alper13mo ago
i pulled from the server, changed two files without deleting any and the pushed again. not sure why they should not be there
rubenf
rubenf13mo ago
Are you 100% sure you didn't delete or rename the file ?
Alper
Alper13mo ago
i'll double check if i accidentally deleted them. but pulling again does not restore any files
rubenf
rubenf13mo ago
Delete the flow folder and pull again instead
Alper
Alper13mo ago
still no flow.yaml file. i checked my local history, not even with the very first pull there was a yaml file. also not a json file. maybe a bug with the --json flag? i'm using wmill sync pull --json and wmill sync push --json
rubenf
rubenf13mo ago
yes looks like a bug with the --json flag indeed can reproduce with --json but noy --yaml
Alper
Alper13mo ago
yep, can confirm it works without the flag