feat(deps): add core dependencies #128
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thwap/thwap-pagesd!128
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/add-core-dependencies"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Add the core dependency set for
thwap-pagesdand wire each into its skeleton package so the module builds and vendoring is complete:code.gitea.io/sdk/giteav0.25.1 — Forgejo/Gitea client, wired intointernal/forgejo(NewClient(baseURL, token))k8s.io/client-gov0.36.3 — Kubernetes clientset, wired intointernal/kubernetes(NewClient()with in-cluster/kubeconfig fallback)github.com/gin-gonic/ginv1.12.0 — HTTP server, wired intointernal/httpapi(NewRouter())github.com/spf13/viperv1.21.0 — configuration, wired intointernal/config(New())go.uber.org/zapv1.28.0 — logging, wired intologging(New(level))cmd/thwap-pagesd/main.gowires logger, config, and router at startupAll dependencies vendored per THWAP policy (
go mod vendor, 79MB / ~5300 files). Bump CIGO_VERSIONto 1.26 (required by gitea SDK v0.25.1 and client-go v0.36.3; go.mod directive is nowgo 1.26.0).Why
Phase 1 task #13 — the core dependency set that later roadmap phases (Forgejo integration, Kubernetes integration, HTTP API, config system, logging) build on.
Testing
go mod tidy— all 5 direct deps retained (each genuinely imported)go mod vendorgo vet ./...go test -race ./...go build ./cmd/thwap-pagesdgofmt -l ./cmd ./internalcleangolangci-lint run— 0 issuesBreaking Changes
None.
Notes
go 1.25directive bumped togo 1.26.0— satisfies roadmap issue #2 ("Go 1.24 or later").Closes #8
Closes #9
Closes #10
Closes #11
Closes #12
Closes #13
Review Summary
Verified locally on the PR head (
e4e6874):go build ./...,go vet ./...,go test -race ./...,go mod verify,gofmtandgolangci-lint runall pass clean. Also cross-compiled the full release matrix (linux/freebsd/openbsd×amd64/arm64,CGO_ENABLED=0) — all six targets build.Dependencies are all genuinely imported and wired into their skeleton packages.
go 1.26.0directive matches the bumped CIGO_VERSION: '1.26'. Error paths propagate correctly. The in-cluster/kubeconfig fallback ininternal/kubernetesand the viper/gin/zap wiring are all standard patterns.No blocking issues.
Non-blocking observations (not blocking this merge):
internal/forgejo/forgejo.go:20andinternal/kubernetes/kubernetes.go:21return raw errors — consider wrapping with context (fmt.Errorf("new forgejo client: %w", err)) per the centralized error convention as these grow.cmd/thwap-pagesd/main.go:17uses stdliblog.Fatalf— fine for fatal init errors at the entrypoint, but noteos.Exitskips the deferredlogger.Sync(). Acceptable here.internal/httpapi/server.gouses gin'sLogger()middleware, which writes to stdout rather than theloggingpackage — revisit when the config system lands."info"level inmain.gois hardcoded — naturally belongs in config (later task).Approving.