vito / bass

a low fidelity scripting language for project infrastructure
https://bass-lang.org
MIT License
378 stars 13 forks source link

Seems to be failing due to some kind of IPv6 issue? #288

Open IcedQuinn opened 1 year ago

IcedQuinn commented 1 year ago

Displayed error message

16:29:11.636    error   unable to start buildkitd       {"version": "9b0bdb600641f3dd1d96f54ac2d86581ab6433b2", "error": "exit status 125", "output": "invalid argument \"fe80::a9e:8ff:fee1:a050%wlp4s0\" for \"--dns\" flag: fe80::a9e:8ff:fee1:a050%wlp4s0 is not an ip address\nSee 'docker run --help'.\n"}
init buildkit runtime for platform linux/amd64: list buildkit workers: failed to list workers: Unavailable: connection error: desc = "transport: Error while dialing: dial unix /run/buildkit/buildkitd.sock: connect: no such file or directory"

To Reproduce Run bass on Void Linux.

Suggested message [not applicable]

It looks like some kind of IPv6 address is trying to be fed to Docker and is being rejected. I'm not sure if this version of Docker is just too old, misconfigured, or what is going on.

vito commented 1 year ago

Similar response as with https://github.com/vito/bass/issues/287 - lately I'm thinking it might be better to just use the Dagger runtime, since we've already gone through all these compatibility issues and resolved them in the Dagger engine. Apologies for suggesting another tool for your stack. Maybe someday I'll fix the direct Buildkit runtime, but for now most of my energy is going to Dagger. :)

Thanks for trying it out!

IcedQuinn commented 1 year ago

~I don't think we have that in our repos. And it looks like Dagger wants me to have some kind of whole language-dependent SDK component to be able to use it? Eeh.~

Okay. I think I understand that in this case Bass is basically acting as a Lisp SDK for Dagger. So I downloaded the CLI runner and tried the ./dagger run stanza mentioned elsewhere.

icedquinn@astaraline /t/x> ./dagger run ./bass test.bass 
█ [35.1s] ERROR ./bass test.bass
┻ 
• Engine: 43026a26a730 (version v0.8.2)
• Duration: 35.128s
signal: killed
(defn main [] (from (linux/alpine) ($ sh "echo 'meow' > artifact")))

It hangs indefinitely with no args or a script for args. It does terminate if all i do is ./dagger run ./bass -h otherwise... :woozy_face:

vito commented 1 year ago

Okay. I think I understand that in this case Bass is basically acting as a Lisp SDK for Dagger. So I downloaded the CLI runner and tried the ./dagger run stanza mentioned elsewhere.

Yep!

Not sure why it's hanging, but there are some issues with the script, so you could try this:

; added (run) and changed sh to sh -c
(defn main [] (run (from (linux/alpine) ($ sh -c "echo 'meow' > artifact"))))

dagger run bass (no arg) probably hangs because the REPL doesn't work in Dagger's TUI, but scripts should work. You could try something under demos/.

Make sure you pull first though since Bass was still pointing at an older SDK version; just pushed a bump to v0.8.2. That might explain the hanging too.

IcedQuinn commented 1 year ago

Not sure why it's hanging, but there are some issues with the script, so you could try this:

I would expect a broken script to exit with an error message :woozy_face:

vito commented 1 year ago

Of course, but that's not what's happening, so it helps to eliminate variables to figure out why.

IcedQuinn commented 1 year ago

Reset the dagger container, restarted docker, ran one of their bash test scripts. Also replaced the bass script.

The bash script runs and fails for an unrelated reason (something about elogind, probably permission shenanigans) but attempting to run bass still results in the infinite failure. Using --progress plain does away with the cool loading bar stuff, though, which makes it possible to Ctrl-C out of it while its busted.

Mysterious.

IcedQuinn commented 1 year ago

I'm not entirely sure if this should remain tagged as cryptic, or something else. There are kind of two errors going on here--one is a backend communication failure, and reporting it weird. I can open a second ticket if you like to track these issues separately. (The third issue, with Dagger, I am not entirely sure is Bass' fault yet but can do a third ticket for that if you wish.)