feat: port builder :report subcommands to golang

The bash :report implementations for the dockerfile, herokuish, lambda, nixpacks, pack, and railpack builders are replaced with a compiled golang binary that collects report keys in parallel and marshals json directly, avoiding the per-key subshell and jq forks that made the bash reports slow. The subcommands/report and root report trigger become symlinks to the compiled binary, while the non-report bash helpers each plugin still relies on are left in place.
This commit is contained in:
Jose Diaz-Gonzalez committed 2026-07-07 06:11:13 -04:00
1 parent 4eabf54fd4
commit f9db9583a1
67 files changed
+1625 -594

No files matched your search

@@ -0,0 +1,31 @@
package main
import (
"flag"
"fmt"
"os"
"strings"
builderpack "github.com/dokku/dokku/plugins/builder-pack"
"github.com/dokku/dokku/plugins/common"
)
// main entrypoint to all triggers
func main() {
parts := strings.Split(os.Args[0], "/")
trigger := parts[len(parts)-1]
flag.Parse()
var err error
switch trigger {
case "report":
appName := flag.Arg(0)
err = builderpack.ReportSingleApp(appName, "", "")
default:
err = fmt.Errorf("Invalid plugin trigger call: %s", trigger)
}
if err != nil {
common.LogFailWithError(err)
}
}