Skip to content

chore: migrate to uuid from standard lib - #1716

Open
remyleone wants to merge 4 commits into
buildpacks:mainfrom
remyleone:remove_google_uuid
Open

remyleone wants to merge 4 commits into
buildpacks:mainfrom
remyleone:remove_google_uuid

Conversation

@remyleone

Copy link
Copy Markdown

Summary

It migrate to using uuid from the standard library

Release notes


Related

Resolves #___


Context

Copilot AI lite review requested due to automatic review settings September 9, 2026 15:00
@remyleone
remyleone requested a review from a team as a code owner September 9, 2026 15:00
Signed-off-by: Rémy Léone <rleone@scaleway.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Pull request overview

Migrates UUID generation away from github.com/google/uuid with the intent to use a standard-library UUID package, and updates the Go toolchain version used by the module and acceptance builder image.

Changes:

  • Replaced github.com/google/uuid imports with uuid in runtime + test code.
  • Dropped github.com/google/uuid from go.mod.
  • Bumped Go version in go.mod and the acceptance Dockerfile builder image.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
phase/extender.go Switches UUID import from github.com/google/uuid to uuid.
phase/extender_test.go Switches UUID import from github.com/google/uuid to uuid in tests.
go.mod Removes github.com/google/uuid dependency and updates go directive.
acceptance/testdata/launcher/Dockerfile Updates builder image to a newer Go version.

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

Comment thread go.mod Outdated
Comment thread phase/extender.go
Comment thread phase/extender_test.go
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Rémy Léone <remy.leone@gmail.com>
@remyleone

Copy link
Copy Markdown
Author

I think linting needs to be upgraded, I got a lot of errors when I upgrade to the latest version:

> Linting code...
DEBU [exec] Locking on file /var/folders/f6/j872dwsn1yq3yfftl1m006wh0000gp/T/golangci-lint.lock... 
cache/image_deleter.go:19:23: fieldalignment: ImageDeleterImpl has 40 leading bytes of pointer data but optimal value is 32 (govet)
type ImageDeleterImpl struct {
                      ^
internal/fsutil/os_detection.go:25:22: fieldalignment: DefaultDetector has 24 leading bytes of pointer data but optimal value is 8 (govet)
type DefaultDetector struct {
                     ^
phase/extender_test.go:347:20: fieldalignment: testCase has 16 leading bytes of pointer data but optimal value is 8 (govet)
                                        type testCase struct {
                                                      ^
phase/generator_test.go:416:20: fieldalignment: testCase has 152 leading bytes of pointer data but optimal value is 128 (govet)
                                        type testCase struct {
                                                      ^
phase/retry_test.go:25:21: fieldalignment: topLayerResult has 32 leading bytes of pointer data but optimal value is 24 (govet)
type topLayerResult struct {
                    ^
launch/bash.go:26:3: QF1012: Use fmt.Fprintf(...) instead of WriteString(fmt.Sprintf(...)) (staticcheck)
                launcher.WriteString(fmt.Sprintf("source \"%s\"\n", profile))
                ^
launch/bash.go:28:2: QF1012: Use fmt.Fprintf(...) instead of WriteString(fmt.Sprintf(...)) (staticcheck)
        launcher.WriteString(fmt.Sprintf("cd \"%s\"\n", proc.WorkingDirectory))
        ^
launch/bash.go:60:3: QF1012: Use fmt.Fprintf(...) instead of WriteString(fmt.Sprintf(...)) (staticcheck)
                commandScript.WriteString(fmt.Sprintf(` "$(eval echo \"${%d}\")"`, i))
                ^
8 issues:
* govet: 5
* staticcheck: 3

Do you want those issues in a seperate PR ? Or can I fix it in the same?

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