Dear all, Has anyone figured out how to use Toolforge Build Service for a tool (job + webservice) written in golang?
I'm trying to switch qrank.toolforge.org to Toolforge Build Service, but I'm struggling with it. To debug this, I wrote a minimal job that just prints a hello message to stdout: https://github.com/brawer/wikidata-qrank/blob/main/cmd/hello/main.go Because Toolforge is emulating Heroku, it appears necessary to tell buildpack which binaries should get packaged into the container. The "// +heroku install" comment on line 14 of the following go.mod file seems to do the trick, together with listing the binaries again in a Heroku Procfile: https://github.com/brawer/wikidata-qrank/blob/main/go.mod#L14 https://github.com/brawer/wikidata-qrank/blob/main/Procfile When running the following command on login.toolforge.org, the project seems to be built just fine: $ toolforge build start https://github.com/brawer/wikidata-qrank Some interesting log message from build service: [step-build] 2024-04-30T18:13:31.170521374Z Building packages: [step-build] 2024-04-30T18:13:31.170585858Z - ./cmd/hello [step-build] 2024-04-30T18:13:31.170599159Z - ./cmd/qrank-builder [step-build] 2024-04-30T18:13:31.170608711Z - ./cmd/webserver [step-build] 2024-04-30T18:13:44.563334902Z [step-build] 2024-04-30T18:13:44.563404532Z [Setting launch table] [step-build] 2024-04-30T18:13:44.563417703Z Detected processes: [step-build] 2024-04-30T18:13:44.563427021Z - hello: hello [step-build] 2024-04-30T18:13:44.563437573Z - qrank-builder: qrank-builder [step-build] 2024-04-30T18:13:44.563446463Z - webserver: webserver [step-build] 2024-04-30T18:13:44.563488376Z - web: hello [step-build] 2024-04-30T18:13:44.577068596Z [step-build] 2024-04-30T18:13:44.577163104Z [Discovering process types] [step-build] 2024-04-30T18:13:44.579933448Z Procfile declares types -> web, qrank-builder, hello The "web: hello" in the launch table looks very suspicious; it's not what my Procfile states (see link above). But at least the build seems to have been successful: $ toolforge build show Build ID: qrank-buildpacks-pipelinerun-vhcrt Start Time: 2024-04-30T18:13:03Z End Time: 2024-04-30T18:14:00Z Status: ok Message: Tasks Completed: 1 (Failed: 0, Cancelled 0), Skipped: 0 Parameters: Source URL: https://github.com/brawer/wikidata-qrank Ref: N/A Envvars: N/A Destination Image: tools-harbor.wmcloud.org/tool-qrank/tool-qrank:latest Now, I'd be happy to just run the "hello" job and see its output log. However, when I do this: $ toolforge jobs run --command hello --image tool-qrank/tool-qrank:latest --mount=all --filelog The job runs for about five minutes (?!?!), and then: $ cat hello.out ERROR: failed to launch: bash exec: argument list too long So clearly something is off... but what? How to run a golang tool on Toolforge when using Build Service? Thanks for any help, — Sascha
_______________________________________________ Cloud mailing list -- cloud@lists.wikimedia.org List information: https://lists.wikimedia.org/postorius/lists/cloud.lists.wikimedia.org/