Comments (9)
Would you mind trying Runner v2 @jlewi? If you're going through the extension it's a matter of change the runme.server.runnerVersion
setting (CMD+,
in VS Code)? I'm going to have to work through your analysis a little closer but would love to understand if this is something we've fixed in Runner v2 already.
from runme.
Confirmed seems like thats the problem.
jeremy-lewi:~/git_runme/examples/goexec$ go run ./
2024/07/03 04:05:53 failed to start: fork/exec /usr/local/bin/bash: no such file or directory
exit status 1
from runme.
I just realized I didn't read that close enough and its trying to run bash and python; let me try changing it and seeing if that fixes the problem.
from runme.
So I was mistaken about the problem. I changed the program to
package main
import (
"log"
"os"
"os/exec"
)
func main() {
cmd := exec.Cmd{
Path: "/sbin/apk",
Args: []string{"/sbin/apk", "version"},
Stdin: os.Stdin,
Stdout: os.Stdout,
Stderr: os.Stderr,
}
if err := cmd.Start(); err != nil {
log.Fatalf("failed to start: %v", err)
}
if err := cmd.Wait(); err != nil {
log.Fatalf("failed to wait: %v", err)
}
}
That works successfully.
I think there might be a bug in the example program
https://github.com/stateful/runme/blob/004c66dc1eb498d0c829c47b29ee7841458a5338/examples/goexec/main.go
Based on the docs https://pkg.go.dev/os/exec#Cmd. I think Path must be specified and must also be arg0.
from runme.
This version also runs. Proving zsh is installed
package main
import (
"log"
"os"
"os/exec"
)
func main() {
cmd := exec.Cmd{
Path: "/bin/zsh",
Args: []string{"/bin/zsh","-c", "apk version"},
Stdin: os.Stdin,
Stdout: os.Stdout,
Stderr: os.Stderr,
}
if err := cmd.Start(); err != nil {
log.Fatalf("failed to start: %v", err)
}
if err := cmd.Wait(); err != nil {
log.Fatalf("failed to wait: %v", err)
}
}
Gives output
jeremy-lewi:~/git_runme/examples/goexec$ go run ./
Installed: Available:
from runme.
@sourishkrout Can you point me at which Runner is likely invoked here?
https://github.com/stateful/runme/tree/004c66dc1eb498d0c829c47b29ee7841458a5338/internal/runner
I'd like to see if I can reproduce the problem in a simple go program.
Is there anyway to get more verbose logs to see what's invoked? I tried adding --log
but not seeing any logs being written to the log file.
from runme.
Is there anyway to get more verbose logs to see what's invoked? I tried adding
--log
but not seeing any logs being written to the log file.
You can turn on runme.server.enableLogger
in the extension which will show more logging in the bottom panel Output->Runme
. Adding --dev
flag to runme server
will increase the log level.
from runme.
I tried with RunnerV2 and it works.
{"level":"info","ts":1720816708.8424606,"caller":"runnerv2service/service_resolve_program.go:17","msg":"running ResolveProgram in runnerService"}
{"level":"info","ts":1720816708.889515,"caller":"editorservice/service.go:103","msg":"Serialize"}
{"level":"info","ts":1720816708.9089472,"caller":"runnerv2service/service_execute.go:22","msg":"running Execute in runnerService","id":"01J2MAPB9CMXYDYMMNJ5SDQD2B"}
{"level":"info","ts":1720816708.9090204,"caller":"runnerv2service/service_execute.go:34","msg":"received initial request","id":"01J2MAPB9CMXYDYMMNJ5SDQD2B","req":"config:{program_name:\"/bin/zsh\" directory:\"/Users/jlewi/git_foyle/docs/content/en/docs/integrations\" language_id:\"shellscript\" env:\"RUNME_ID=01J2MANY1FRQC86GR1M8DZBEXG\" env:\"RUNME_RUNNER=v2alpha1\" env:\"TERM=\" commands:{items:\"echo \\\"hello world\\\"\" items:\"\"} mode:COMMAND_MODE_INLINE known_id:\"01J2MANY1FRQC86GR1M8DZBEXG\"} store_stdout_in_env:true"}
{"level":"info","ts":1720816708.912865,"logger":"NativeCommand","caller":"command/command_native.go:59","msg":"detected program path and arguments","id":"01J2MAPB9CMXYDYMMNJ5SDQD2B","instanceID":"01J2MAPB9G6X0PQSTG1SJ95XA9","program":"/bin/zsh","args":["-c","set -e -o pipefail\n\n/home/user/runme env dump --insecure > /home/user/tmp/runme-93292827/.env_start\n__cleanup() {\nrv=$?\n/home/user/runme env dump --insecure > /home/user/tmp/runme-93292827/.env_end\nexit $rv\n}\ntrap -- \"__cleanup\" EXIT\necho \"hello world\"\n\n"]}
{"level":"info","ts":1720816708.912925,"logger":"NativeCommand","caller":"command/command_native.go:81","msg":"starting a native command","id":"01J2MAPB9CMXYDYMMNJ5SDQD2B","instanceID":"01J2MAPB9G6X0PQSTG1SJ95XA9","config":"program_name:\"/bin/zsh\" arguments:\"-c\" arguments:\"set -e -o pipefail\\n\\n/home/user/runme env dump --insecure > /home/user/tmp/runme-93292827/.env_start\\n__cleanup() {\\nrv=$?\\n/home/user/runme env dump --insecure > /home/user/tmp/runme-93292827/.env_end\\nexit $rv\\n}\\ntrap -- \\\"__cleanup\\\" EXIT\\necho \\\"hello world\\\"\\n\\n\" directory:\"/Users/jlewi/git_foyle/docs/content/en/docs/integrations\" commands:{items:\"echo \\\"hello world\\\"\" items:\"\"} mode:COMMAND_MODE_INLINE"}
{"level":"info","ts":1720816731.60801,"caller":"runnerv2service/service_resolve_program.go:17","msg":"running ResolveProgram in runnerService"}
{"level":"info","ts":1720816731.6730247,"caller":"runnerv2service/service_execute.go:22","msg":"running Execute in runnerService","id":"01J2MAQ1GSQR523FFSAZ63EY1C"}
{"level":"info","ts":1720816731.67309,"caller":"runnerv2service/service_execute.go:34","msg":"received initial request","id":"01J2MAQ1GSQR523FFSAZ63EY1C","req":"config:{program_name:\"/bin/zsh\" directory:\"/Users/jlewi/git_foyle/docs/content/en/docs/integrations\" language_id:\"shellscript\" env:\"RUNME_ID=01J2MANY1FRQC86GR1M8DZBEXG\" env:\"RUNME_RUNNER=v2alpha1\" env:\"TERM=\" commands:{items:\"echo \\\"hello world\\\"\" items:\"\"} mode:COMMAND_MODE_INLINE known_id:\"01J2MANY1FRQC86GR1M8DZBEXG\"} store_stdout_in_env:true"}
{"level":"info","ts":1720816731.6762297,"logger":"NativeCommand","caller":"command/command_native.go:59","msg":"detected program path and arguments","id":"01J2MAQ1GSQR523FFSAZ63EY1C","instanceID":"01J2MAQ1GW2SHD04Q5Z7F08CJW","program":"/bin/zsh","args":["-c","set -e -o pipefail\n\n/home/user/runme env dump --insecure > /home/user/tmp/runme-1746784384/.env_start\n__cleanup() {\nrv=$?\n/home/user/runme env dump --insecure > /home/user/tmp/runme-1746784384/.env_end\nexit $rv\n}\ntrap -- \"__cleanup\" EXIT\necho \"hello world\"\n\n"]}
{"level":"info","ts":1720816731.6762695,"logger":"NativeCommand","caller":"command/command_native.go:81","msg":"starting a native command","id":"01J2MAQ1GSQR523FFSAZ63EY1C","instanceID":"01J2MAQ1GW2SHD04Q5Z7F08CJW","config":"program_name:\"/bin/zsh\" arguments:\"-c\" arguments:\"set -e -o pipefail\\n\\n/home/user/runme env dump --insecure > /home/user/tmp/runme-1746784384/.env_start\\n__cleanup() {\\nrv=$?\\n/home/user/runme env dump --insecure > /home/user/tmp/runme-1746784384/.env_end\\nexit $rv\\n}\\ntrap -- \\\"__cleanup\\\" EXIT\\necho \\\"hello world\\\"\\n\\n\" directory:\"/Users/jlewi/git_foyle/docs/content/en/docs/integrations\" commands:{items:\"echo \\\"hello world\\\"\" items:\"\"} mode:COMMAND_MODE_INLINE"}
from runme.
I tried with RunnerV2 and it works.
That's great news!
from runme.
Related Issues (20)
- Bring back Docker-based Python Test
- vscode for web and serverless RunMe HOT 5
- Question: How to render cell output using Data Table Renderers HOT 5
- vim keybindings can break input HOT 3
- Providing input to a Bash script using the CLI doesn't work very well HOT 3
- "bufio.Scanner: token too long" after large binary stream
- User Error/ Question: VSCode Terminal keeps Popping up when executing a cell HOT 15
- Better command execution in Docker HOT 1
- Is here a better way to parameterize markdown URLs? HOT 2
- Docs about RunMe CLI `run <command>` are unclear HOT 1
- FiFo issue: CTRL+C runs indefinitely when signals are being caught by process HOT 1
- Panic when reading/writing to closed pipe HOT 6
- Option to disable masking of outputs by default HOT 1
- Migrate to protobuf-es from protobuf-ts HOT 3
- runme attempts to access unreadable files or directories HOT 2
- `runme open` fails to install code-server when executing in fish shell HOT 4
- Internal failure executing runner: fork/exec /bin/zsh: argument list too long HOT 5
- Feedback: New code cells inserted with language ini and are not executable HOT 2
- Long Pauses Rendering Notebooks On Initial Load with Code-Server HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from runme.