Skip to content

Commit bb038b0

Browse files
dilyevskyclaude
andcommitted
[ci] add sqlite_enable_dbstat_vtab build tag to all CGO builds
kine v0.14.11 queries the SQLite dbstat virtual table for its Status RPC. This requires SQLITE_ENABLE_DBSTAT_VTAB at compile time. The mattn/go-sqlite3 library supports this via the sqlite_enable_dbstat_vtab Go build tag. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 633ffe3 commit bb038b0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ LDFLAGS=(
3939

4040
echo "Building version ${VERSION} (${COMMIT_HASH})..."
4141

42-
go install -ldflags="${LDFLAGS[*]}"
42+
go install -tags sqlite_enable_dbstat_vtab -ldflags="${LDFLAGS[*]}"
4343

4444
# Check if GOPATH is set
4545
if [ -z "${GOPATH}" ]; then

ci/main.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ func (m *ApoxyCli) BuildCLI(
212212
WithEnvVariable("GOMODCACHE", "/go/pkg/mod").
213213
WithMountedCache("/go/build-cache", dag.CacheVolume("go-build-"+goarch)).
214214
WithEnvVariable("GOCACHE", "/go/build-cache").
215-
WithExec([]string{"go", "build", "-o", "/apoxy", "-ldflags", strings.Join(ldFlags, " "), "-tags", "netgo", "."})
215+
WithExec([]string{"go", "build", "-o", "/apoxy", "-ldflags", strings.Join(ldFlags, " "), "-tags", "netgo,sqlite_enable_dbstat_vtab", "."})
216216
}
217217

218218
// BuildCLIRelease builds a CLI container for release.
@@ -578,7 +578,7 @@ func (m *ApoxyCli) BuildAPIServer(
578578
WithEnvVariable("GOOS", "linux").
579579
WithEnvVariable("CGO_ENABLED", "1").
580580
WithEnvVariable("CC", fmt.Sprintf("zig-wrapper cc --target=%s-linux-musl", canonArchFromGoArch(goarch))).
581-
WithExec([]string{"go", "build", "-o", "apiserver", "./cmd/apiserver"})
581+
WithExec([]string{"go", "build", "-tags", "sqlite_enable_dbstat_vtab", "-o", "apiserver", "./cmd/apiserver"})
582582

583583
runtimeCtr := m.PullEdgeRuntime(ctx, p, src, sccacheToken, edgeRuntimeTag, gcrCreds)
584584

@@ -656,7 +656,7 @@ func (m *ApoxyCli) BuildBackplane(
656656
WithEnvVariable("GOCACHE", "/go/build-cache").
657657
WithEnvVariable("CGO_ENABLED", "1").
658658
WithEnvVariable("CC", fmt.Sprintf("zig-wrapper cc --target=%s-linux-musl", canonArchFromGoArch(goarch))).
659-
WithExec([]string{"go", "build", "-ldflags", "-v -linkmode=external", "-o", bpOut, "./cmd/backplane"}).
659+
WithExec([]string{"go", "build", "-tags", "sqlite_enable_dbstat_vtab", "-ldflags", "-v -linkmode=external", "-o", bpOut, "./cmd/backplane"}).
660660
WithExec([]string{"go", "build", "-ldflags", "-v -linkmode=external", "-o", dsOut, "./cmd/dial-stdio"}).
661661
WithExec([]string{"wget", "https://github.com/apoxy-dev/otel-collector/archive/refs/tags/v1.2.0.tar.gz"}).
662662
WithExec([]string{"tar", "-xvf", "v1.2.0.tar.gz"}).
@@ -713,7 +713,7 @@ func (m *ApoxyCli) BuildTunnelproxy(
713713
WithEnvVariable("GOCACHE", "/go/build-cache").
714714
WithEnvVariable("CGO_ENABLED", "1").
715715
WithEnvVariable("CC", fmt.Sprintf("zig-wrapper cc --target=%s-linux-musl", canonArchFromGoArch(goarch))).
716-
WithExec([]string{"go", "build", "-ldflags", "-v -linkmode=external", "-o", tpOut, "./cmd/tunnelproxy"}).
716+
WithExec([]string{"go", "build", "-tags", "sqlite_enable_dbstat_vtab", "-ldflags", "-v -linkmode=external", "-o", tpOut, "./cmd/tunnelproxy"}).
717717
WithWorkdir("/src")
718718

719719
return dag.Container(dagger.ContainerOpts{Platform: p}).
@@ -747,7 +747,7 @@ func (m *ApoxyCli) BuildKubeController(
747747
WithEnvVariable("GOCACHE", "/go/build-cache").
748748
WithEnvVariable("CGO_ENABLED", "1").
749749
WithEnvVariable("CC", fmt.Sprintf("zig-wrapper cc --target=%s-linux-musl", canonArchFromGoArch(goarch))).
750-
WithExec([]string{"go", "build", "-ldflags", "-v -linkmode=external", "-o", kcOut, "./cmd/kube-controller"}).
750+
WithExec([]string{"go", "build", "-tags", "sqlite_enable_dbstat_vtab", "-ldflags", "-v -linkmode=external", "-o", kcOut, "./cmd/kube-controller"}).
751751
WithWorkdir("/src")
752752

753753
return dag.Container(dagger.ContainerOpts{Platform: p}).

0 commit comments

Comments
 (0)