Skip to content

Update to Go 1.27 and port to the stdlib uuid package - #831

Merged
tg123 merged 4 commits into
masterfrom
copilot/update-to-go-1-27-native-uuid
Aug 26, 2026
Merged

tg123 merged 4 commits into
masterfrom
copilot/update-to-go-1-27-native-uuid

Conversation

Copilot AI commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Go 1.27 ships a standard-library uuid package (RFC 9562), making the github.com/google/uuid dependency unnecessary. This bumps the toolchain to 1.27 and migrates all UUID usage to the stdlib.

Toolchain

  • go 1.27.0 in both go.mod (root) and cmd/sshpiperd/go.mod
  • go-version: '1.27.x' in .github/workflows/test.yml and release.yaml
  • golang:1.27-bookworm builder in Dockerfile
  • go.work example in .github/copilot-instructions.md bumped to go 1.27

UUID migration

  • Import swapped from github.com/google/uuid to stdlib uuid across the daemon, the revtunnel plugin, and e2e tests
  • uuid.NewRandom() → uuid.New(); the stdlib constructor cannot fail, so the surrounding error plumbing is dropped
  • uuid.NewString() → uuid.New().String()
  • uuid.Parse is API- and format-compatible (plain, braced, urn:uuid:, unhyphenated), so isGeneratedGUID is unchanged
  • github.com/google/uuid is no longer a direct requirement in either module; it remains indirect via k8s deps
// cmd/sshpiperd/internal/plugin/grpc.go
uiq := uuid.New()

meta := PluginConnMeta{
    ConnMeta: libplugin.ConnMeta{
        UniqId: uiq.String(),
        ...

Co-authored-by: tg123 <170430+tg123@users.noreply.github.com>
…ecvLogs EOF)

Co-authored-by: tg123 <170430+tg123@users.noreply.github.com>
Copilot AI requested a review from tg123 August 20, 2026 06:12
@tg123
tg123 marked this pull request as ready for review August 22, 2026 07:57
Copilot AI balanced review requested due to automatic review settings August 22, 2026 07:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The Go 1.27 bump currently prevents the required Go CodeQL analysis from building either module.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Updates sshpiper to Go 1.27 and replaces direct google/uuid usage with the standard-library UUID package.

Changes:

  • Updates Go versions across modules, CI, Docker, and documentation.
  • Migrates UUID generation and parsing to uuid.
  • Replaces deprecated upstream fields and handles normal log-stream EOF.
File summaries
File Description
.github/copilot-instructions.md Updates the workspace example.
.github/workflows/release.yaml Uses Go 1.27 for releases.
.github/workflows/test.yml Uses Go 1.27 for tests.
Dockerfile Updates the Go builder image.
cmd/sshpiperd/go.mod Updates Go and removes direct UUID dependency.
cmd/sshpiperd/internal/plugin/chain.go Migrates UUID generation.
cmd/sshpiperd/internal/plugin/grpc.go Migrates UUIDs and handles EOF.
e2e/admin_test.go Migrates UUID imports.
e2e/banner_test.go Migrates UUID imports.
e2e/connmeta_test.go Migrates UUID imports.
e2e/docker_test.go Migrates UUID imports.
e2e/failtoban_test.go Migrates UUID imports.
e2e/fixed_test.go Migrates UUID imports.
e2e/forwarding_test.go Migrates UUID imports.
e2e/kubernetes_test.go Migrates UUID imports.
e2e/lua_test.go Migrates UUID imports.
e2e/revtunnel_test.go Migrates UUID imports.
e2e/screenrecording_test.go Migrates UUID imports.
e2e/sendenv_test.go Migrates UUID imports.
e2e/stdout_test.go Migrates UUID imports.
e2e/testplugin/benchmark/main.go Uses URI-based upstream configuration.
e2e/testplugin/testcreateconnplugin/main.go Migrates UUID generation.
e2e/workingdir_test.go Migrates UUID imports.
e2e/yaml_test.go Migrates UUID imports.
go.mod Updates Go and demotes UUID to indirect.
libplugin/skel/skel.go Uses URI-based upstream configuration.
plugin/fixed/main.go Uses URI-based upstream configuration.
plugin/revtunnel/plugin_config.go Migrates UUID parsing.
plugin/revtunnel/server.go Migrates UUID generation.
plugin/revtunnel/store_file.go Updates UUID documentation.
plugin/username-router/main.go Uses URI-based upstream configuration.
Review details
  • Files reviewed: 31/31 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread go.mod Resolved
Co-authored-by: tg123 <170430+tg123@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 23, 2026 09:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The latest Go CodeQL check still fails under Go 1.26.6, while the replacement workflow remains blocked pending approval and default-setup reconfiguration.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 32/32 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@tg123 tg123 closed this Aug 26, 2026
@tg123 tg123 reopened this Aug 26, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 26, 2026 20:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Required build and E2E checks remain in progress, so the toolchain and plugin changes are not fully validated.

Review details
  • Files reviewed: 31/31 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@tg123
tg123 merged commit 509a64d into master Aug 26, 2026
6 checks passed
hhuuggoo added a commit to saturncloud/sshpiper that referenced this pull request Oct 22, 2026
From upstream 509a64d (tg123#831), without its Go 1.27 and uuid changes:
- skel, fixed, username-router and the benchmark test plugin set the
  upstream Uri (tcp://host:port) instead of the deprecated Host/Port
  fields. The daemon's GetOrGenerateUri builds the same tcp://host:port
  from Host/Port, so the resolved address is unchanged.
- RecvLogs returns nil on io.EOF, so the caller's error check is no
  longer always true (SA4023).

golangci-lint v2.15.0 (what CI installs) flagged these; upstream v1.6.1
was linted with an older version.

Claude-Session: https://claude.ai/code/session_01ERBF9Fi4Rk46VQ5NExAZaC
hhuuggoo added a commit to saturncloud/sshpiper that referenced this pull request Oct 22, 2026
From upstream 509a64d (tg123#831), without its Go 1.27 and uuid changes:
- skel, fixed, username-router and the benchmark test plugin set the
  upstream Uri (tcp://host:port) instead of the deprecated Host/Port
  fields. The daemon's GetOrGenerateUri builds the same tcp://host:port
  from Host/Port, so the resolved address is unchanged.
- RecvLogs returns nil on io.EOF, so the caller's error check is no
  longer always true (SA4023).

golangci-lint v2.15.0 (what CI installs) flagged these; upstream v1.6.1
was linted with an older version.

Claude-Session: https://claude.ai/code/session_01ERBF9Fi4Rk46VQ5NExAZaC
(cherry picked from commit bc28125)
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.

3 participants