Skip to content

Upgrade Go 1.27 and deps, reuse service-framework workflows - #3

Merged
hanguyenk merged 1 commit into
mainfrom
ft/upgrade-go-and-ci
Nov 12, 2026
Merged

hanguyenk merged 1 commit into
mainfrom
ft/upgrade-go-and-ci

Conversation

@hanguyenk

Copy link
Copy Markdown
Collaborator

Why did we need it?

The repo hasn't been maintained in a while: CI ran Go 1.19 with golangci-lint v1.52.2, used outdated actions, and the dependencies were years behind.

  • Workflows: ci.yaml and release.yaml now call the reusable workflows in KyberNetwork/service-framework, the same pattern as the other public Kyber libraries such as kyberswap-dex-lib.
    • CI uses golangci-lint v2.15.0 and ubuntu-latest.
    • Release takes a patch/minor/major bump or an explicit version. There's no Dockerfile, so only the tag and GitHub release are created.
    • Not the -v2 variants, because their BuildKit daemon is cluster-internal and GitHub-hosted runners can't reach it.
  • Go and deps: go 1.19 → go 1.27; zap v1.24.0 → v1.28.0; logrus v1.9.0 → v1.10.2; indirect deps updated to latest.
  • logger.go: the package-level Debug/Info/Warn/Error/Fatal(msg) now call the non-f methods. Under Go 1.27, go vet flags the non-constant format strings.
    • Zap output is unchanged, since zap already printed a no-arg template verbatim.
    • With logrus, % in msg now prints literally instead of e.g. %!d(MISSING).
    • The number of wrapper frames is unchanged, so zap caller reporting is unaffected.
  • .gitignore: added GitHub's standard Go .gitignore.

⚠️ Both workflows rely on the org secret GH_PAT (secrets: inherit), which is used for the release and the PR coverage comment. It must be shared with this repo.

Suggested next release: v1.1.0. The go directive bump forces consumers onto Go ≥ 1.27.

Related Issue

N/A, maintenance.

How Has This Been Tested?

  • go build ./..., go vet ./..., and golangci-lint run (v2.15.0) pass locally. The repo has no tests.
  • A scratch program against zap v1.28 shows the same caller file:line for package-level, WithFields, and nested WithFields calls as before the upgrade. It also confirmed that logrus now prints % literally.
  • The CI run on this PR checks the new workflow.

🤖 Generated with Claude Code

- Bump go directive 1.19 -> 1.27; zap v1.28.0, logrus v1.10.2 and
  indirect deps to latest.
- Replace CI and release workflows with callers of service-framework's
  reusable ci.yaml/release.yaml (golangci-lint v2.15.0, ubuntu-latest).
- Package-level Debug/Info/Warn/Error/Fatal(msg) call the non-f methods
  so msg is not treated as a format string (flagged by go vet printf
  check under Go 1.27). Zap output is unchanged; logrus now prints '%'
  literally.
- Add standard Go .gitignore.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kyber-ci-bot

Copy link
Copy Markdown
Test coverage changes:
Package Before After Diff

@hanguyenk
hanguyenk merged commit 0b9ee5e into main Nov 12, 2026
4 checks passed
@hanguyenk
hanguyenk deleted the ft/upgrade-go-and-ci branch November 12, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants