Repository: buchgr/bazel-remote
Pull request #646 (2023-03-05 18:13:21)

Make bazel-remote packages consumable as a module
The new import path is:
github.com/buchgr/bazel-remote/v2

Warning: bazel-remote go packages do not follow semantic versioning rules, since it is primarily intended to be consumed as a standalone executable.

I aim to maintain backwards compatibility for the standalone executable (within each major release), but provide no guarantees on the stability of the packages used internally.

Relates to #635.

dragonsinth: Seems to work, although can't really tell for sure without d0d2a176911690d050f29058bede3d33524db372 getting pushed into [buchgr/bazel-remote](https://github.com/buchgr/bazel-remote).

```
~/src/mn/projects/fullstory/go/src/fs go get github.com/buchgr/bazel-remote/v2@d0d2a176911690d050f29058bede3d33524db372
go: github.com/buchgr/bazel-remote/v2@d0d2a176911690d050f29058bede3d33524db372: invalid version: unknown revision d0d2a176911690d050f29058bede3d33524db372


~/src/mn/projects/fullstory/go/src/fs go get github.com/mostynb/bazel-remote/v2@d0d2a176911690d050f29058bede3d33524db372
go: downloading github.com/mostynb/bazel-remote/v2 v2.0.0-20230305180615-d0d2a1769116
go: github.com/mostynb/bazel-remote/v2@v2.0.0-20230305180615-d0d2a1769116: parsing go.mod:
	module declares its path as: github.com/buchgr/bazel-remote/v2
	        but was required as: github.com/mostynb/bazel-remote/v2
```

Patch:
diff --git a/BUILD.bazel b/BUILD.bazel
index a39deb3..f2bc7ba 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -5,7 +5,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
 
 gazelle(
     name = "gazelle",
-    prefix = "github.com/buchgr/bazel-remote",
+    prefix = "github.com/buchgr/bazel-remote/v2",
 )
 
 gazelle(
@@ -21,7 +21,7 @@ gazelle(
 go_library(
     name = "go_default_library",
     srcs = ["main.go"],
-    importpath = "github.com/buchgr/bazel-remote",
+    importpath = "github.com/buchgr/bazel-remote/v2",
     visibility = ["//visibility:private"],
     deps = [
         "//cache/disk:go_default_library",
diff --git a/README.md b/README.md
index 9352967..7e155b0 100644
--- a/README.md
+++ b/README.md
@@ -12,6 +12,12 @@ and bazel-remote will automatically enforce this limit as needed, by deleting
 the least recently used files. S3, GCS and experimental Azure blob storage
 proxy backends are also supported.
 
+Note that while bazel-remote is consumable as a go module, we provide no
+guarantees on the stability or backwards compatibility of the APIs. We do
+attempt to keep the standalone executable backwards-compatible between
+releases however, and cache directory format changes are only allowed in
+major version upgrades.
+
 **Project status**: bazel-remote has been serving TBs of cache artifacts per day since April 2018, both on
 commodity hardware and AWS servers. Outgoing bandwidth can exceed 15 Gbit/s on the right AWS instance type.
 
diff --git a/cache/BUILD.bazel b/cache/BUILD.bazel
index 14417d9..75ecb84 100644
--- a/cache/BUILD.bazel
+++ b/cache/BUILD.bazel
@@ -3,6 +3,6 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
 go_library(
     name = "go_default_library",
     srcs = ["cache.go"],
-    importpath = "github.com/buchgr/bazel-remote/cache",
+    importpath = "github.com/buchgr/bazel-remote/v2/cache",
     visibility = ["//visibility:public"],
 )
diff --git a/cache/azblobproxy/BUILD.bazel b/cache/azblobproxy/BUILD.bazel
index bbae6d0..3038c71 100644
--- a/cache/azblobproxy/BUILD.bazel
+++ b/cache/azblobproxy/BUILD.bazel
@@ -6,7 +6,7 @@ go_library(
         "auth_methods.go",
         "azblobproxy.go",
     ],
-    importpath = "github.com/buchgr/bazel-remote/cache/azblobproxy",
+    importpath = "github.com/buchgr/bazel-remote/v2/cache/azblobproxy",
     visibility = ["//visibility:public"],
     deps = [
         "//cache:go_default_library",
diff --git a/cache/azblobproxy/azblobproxy.go b/cache/azblobproxy/azblobproxy.go
index 81b0028..ff1cbd2 100644
--- a/cache/azblobproxy/azblobproxy.go
+++ b/cache/azblobproxy/azblobproxy.go
@@ -9,9 +9,9 @@ import (
 	"path"
 	"time"
 
-	"github.com/buchgr/bazel-remote/cache"
-	"github.com/buchgr/bazel-remote/cache/disk/casblob"
-	"github.com/buchgr/bazel-remote/utils/backendproxy"
+	"github.com/buchgr/bazel-remote/v2/cache"
+	"github.com/buchgr/bazel-remote/v2/cache/disk/casblob"
+	"github.com/buchgr/bazel-remote/v2/utils/backendproxy"
 
 	"github.com/Azure/azure-sdk-for-go/sdk/azcore"
 	"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob"
diff --git a/cache/disk/BUILD.bazel b/cache/disk/BUILD.bazel
index 3d6acb0..dff9a1d 100644
--- a/cache/disk/BUILD.bazel
+++ b/cache/disk/BUILD.bazel
@@ -10,7 +10,7 @@ go_library(
         "metrics.go",
         "options.go",
     ],
-    importpath = "github.com/buchgr/bazel-remote/cache/disk",
+    importpath = "github.com/buchgr/bazel-remote/v2/cache/disk",
     visibility = ["//visibility:public"],
     deps = [
         "//cache:go_default_library",
diff --git a/cache/disk/casblob/BUILD.bazel b/cache/disk/casblob/BUILD.bazel
index 98be79e..eb6f88f 100644
--- a/cache/disk/casblob/BUILD.bazel
+++ b/cache/disk/casblob/BUILD.bazel
@@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
 go_library(
     name = "go_default_library",
     srcs = ["casblob.go"],
-    importpath = "github.com/buchgr/bazel-remote/cache/disk/casblob",
+    importpath = "github.com/buchgr/bazel-remote/v2/cache/disk/casblob",
     visibility = ["//visibility:public"],
     deps = ["//cache/disk/zstdimpl:go_default_library"],
 )
diff --git a/cache/disk/casblob/casblob.go b/cache/disk/casblob/casblob.go
index c3b9838..12a5330 100644
--- a/cache/disk/casblob/casblob.go
+++ b/cache/disk/casblob/casblob.go
@@ -11,7 +11,7 @@ import (
 	"log"
 	"os"
 
-	"github.com/buchgr/bazel-remote/cache/disk/zstdimpl"
+	"github.com/buchgr/bazel-remote/v2/cache/disk/zstdimpl"
 )
 
 type CompressionType uint8
diff --git a/cache/disk/disk.go b/cache/disk/disk.go
index 5b62187..32c6b10 100644
--- a/cache/disk/disk.go
+++ b/cache/disk/disk.go
@@ -16,15 +16,15 @@ import (
 	"sync"
 	"time"
 
-	"github.com/buchgr/bazel-remote/cache"
-	"github.com/buchgr/bazel-remote/cache/disk/casblob"
-	"github.com/buchgr/bazel-remote/cache/disk/zstdimpl"
-	"github.com/buchgr/bazel-remote/utils/tempfile"
-	"github.com/buchgr/bazel-remote/utils/validate"
+	"github.com/buchgr/bazel-remote/v2/cache"
+	"github.com/buchgr/bazel-remote/v2/cache/disk/casblob"
+	"github.com/buchgr/bazel-remote/v2/cache/disk/zstdimpl"
+	"github.com/buchgr/bazel-remote/v2/utils/tempfile"
+	"github.com/buchgr/bazel-remote/v2/utils/validate"
 
 	"github.com/djherbis/atime"
 
-	pb "github.com/buchgr/bazel-remote/genproto/build/bazel/remote/execution/v2"
+	pb "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/remote/execution/v2"
 	"google.golang.org/protobuf/proto"
 
 	"github.com/prometheus/client_golang/prometheus"
diff --git a/cache/disk/findmissing.go b/cache/disk/findmissing.go
index 12e942c..5dc2f24 100644
--- a/cache/disk/findmissing.go
+++ b/cache/disk/findmissing.go
@@ -5,9 +5,9 @@ import (
 	"errors"
 	"sync"
 
-	"github.com/buchgr/bazel-remote/cache"
+	"github.com/buchgr/bazel-remote/v2/cache"
 
-	pb "github.com/buchgr/bazel-remote/genproto/build/bazel/remote/execution/v2"
+	pb "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/remote/execution/v2"
 
 	"google.golang.org/grpc/codes"
 	"google.golang.org/grpc/status"
diff --git a/cache/disk/load.go b/cache/disk/load.go
index 68a39aa..04d876d 100644
--- a/cache/disk/load.go
+++ b/cache/disk/load.go
@@ -15,10 +15,10 @@ import (
 	"sync"
 	"time"
 
-	"github.com/buchgr/bazel-remote/cache"
-	"github.com/buchgr/bazel-remote/cache/disk/casblob"
-	"github.com/buchgr/bazel-remote/cache/disk/zstdimpl"
-	"github.com/buchgr/bazel-remote/utils/validate"
+	"github.com/buchgr/bazel-remote/v2/cache"
+	"github.com/buchgr/bazel-remote/v2/cache/disk/casblob"
+	"github.com/buchgr/bazel-remote/v2/cache/disk/zstdimpl"
+	"github.com/buchgr/bazel-remote/v2/utils/validate"
 
 	"github.com/djherbis/atime"
 
diff --git a/cache/disk/metrics.go b/cache/disk/metrics.go
index e878474..831f0ed 100644
--- a/cache/disk/metrics.go
+++ b/cache/disk/metrics.go
@@ -4,9 +4,9 @@ import (
 	"context"
 	"io"
 
-	"github.com/buchgr/bazel-remote/cache"
+	"github.com/buchgr/bazel-remote/v2/cache"
 
-	pb "github.com/buchgr/bazel-remote/genproto/build/bazel/remote/execution/v2"
+	pb "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/remote/execution/v2"
 
 	"github.com/prometheus/client_golang/prometheus"
 )
diff --git a/cache/disk/options.go b/cache/disk/options.go
index 2533923..06416a1 100644
--- a/cache/disk/options.go
+++ b/cache/disk/options.go
@@ -4,9 +4,9 @@ import (
 	"fmt"
 	"log"
 
-	"github.com/buchgr/bazel-remote/cache"
-	"github.com/buchgr/bazel-remote/cache/disk/casblob"
-	"github.com/buchgr/bazel-remote/cache/disk/zstdimpl"
+	"github.com/buchgr/bazel-remote/v2/cache"
+	"github.com/buchgr/bazel-remote/v2/cache/disk/casblob"
+	"github.com/buchgr/bazel-remote/v2/cache/disk/zstdimpl"
 
 	"github.com/prometheus/client_golang/prometheus"
 )
diff --git a/cache/disk/zstdimpl/BUILD.bazel b/cache/disk/zstdimpl/BUILD.bazel
index e4b2d25..18fe1df 100644
--- a/cache/disk/zstdimpl/BUILD.bazel
+++ b/cache/disk/zstdimpl/BUILD.bazel
@@ -11,7 +11,7 @@ go_library(
         ],
         "//conditions:default": [],
     }),
-    importpath = "github.com/buchgr/bazel-remote/cache/disk/zstdimpl",
+    importpath = "github.com/buchgr/bazel-remote/v2/cache/disk/zstdimpl",
     visibility = ["//visibility:public"],
     deps = [
         "//utils/zstdpool:go_default_library",
diff --git a/cache/disk/zstdimpl/gozstd.go b/cache/disk/zstdimpl/gozstd.go
index 2b4f0b3..720da9e 100644
--- a/cache/disk/zstdimpl/gozstd.go
+++ b/cache/disk/zstdimpl/gozstd.go
@@ -2,10 +2,12 @@ package zstdimpl
 
 import (
 	"errors"
-	"github.com/buchgr/bazel-remote/utils/zstdpool"
+	"io"
+
+	"github.com/buchgr/bazel-remote/v2/utils/zstdpool"
+
 	"github.com/klauspost/compress/zstd"
 	syncpool "github.com/mostynb/zstdpool-syncpool"
-	"io"
 )
 
 var zstdFastestLevel = zstd.WithEncoderLevel(zstd.SpeedFastest)
diff --git a/cache/gcsproxy/BUILD.bazel b/cache/gcsproxy/BUILD.bazel
index 0e8a0a1..caf0191 100644
--- a/cache/gcsproxy/BUILD.bazel
+++ b/cache/gcsproxy/BUILD.bazel
@@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
 go_library(
     name = "go_default_library",
     srcs = ["gcsproxy.go"],
-    importpath = "github.com/buchgr/bazel-remote/cache/gcsproxy",
+    importpath = "github.com/buchgr/bazel-remote/v2/cache/gcsproxy",
     visibility = ["//visibility:public"],
     deps = [
         "//cache:go_default_library",
diff --git a/cache/gcsproxy/gcsproxy.go b/cache/gcsproxy/gcsproxy.go
index d4df750..0c374a7 100644
--- a/cache/gcsproxy/gcsproxy.go
+++ b/cache/gcsproxy/gcsproxy.go
@@ -9,8 +9,8 @@ import (
 	"net/url"
 	"os"
 
-	"github.com/buchgr/bazel-remote/cache"
-	"github.com/buchgr/bazel-remote/cache/httpproxy"
+	"github.com/buchgr/bazel-remote/v2/cache"
+	"github.com/buchgr/bazel-remote/v2/cache/httpproxy"
 
 	"golang.org/x/oauth2"
 	"golang.org/x/oauth2/google"
diff --git a/cache/httpproxy/BUILD.bazel b/cache/httpproxy/BUILD.bazel
index 542eb0a..b3da813 100644
--- a/cache/httpproxy/BUILD.bazel
+++ b/cache/httpproxy/BUILD.bazel
@@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
 go_library(
     name = "go_default_library",
     srcs = ["httpproxy.go"],
-    importpath = "github.com/buchgr/bazel-remote/cache/httpproxy",
+    importpath = "github.com/buchgr/bazel-remote/v2/cache/httpproxy",
     visibility = ["//visibility:public"],
     deps = [
         "//cache:go_default_library",
diff --git a/cache/httpproxy/httpproxy.go b/cache/httpproxy/httpproxy.go
index bf23e44..0b50667 100644
--- a/cache/httpproxy/httpproxy.go
+++ b/cache/httpproxy/httpproxy.go
@@ -12,9 +12,9 @@ import (
 	"strconv"
 	"strings"
 
-	"github.com/buchgr/bazel-remote/cache"
-	"github.com/buchgr/bazel-remote/cache/disk/casblob"
-	"github.com/buchgr/bazel-remote/utils/backendproxy"
+	"github.com/buchgr/bazel-remote/v2/cache"
+	"github.com/buchgr/bazel-remote/v2/cache/disk/casblob"
+	"github.com/buchgr/bazel-remote/v2/utils/backendproxy"
 
 	"github.com/prometheus/client_golang/prometheus"
 	"github.com/prometheus/client_golang/prometheus/promauto"
diff --git a/cache/s3proxy/BUILD.bazel b/cache/s3proxy/BUILD.bazel
index cba68f9..193f690 100644
--- a/cache/s3proxy/BUILD.bazel
+++ b/cache/s3proxy/BUILD.bazel
@@ -6,7 +6,7 @@ go_library(
         "auth_methods.go",
         "s3proxy.go",
     ],
-    importpath = "github.com/buchgr/bazel-remote/cache/s3proxy",
+    importpath = "github.com/buchgr/bazel-remote/v2/cache/s3proxy",
     visibility = ["//visibility:public"],
     deps = [
         "//cache:go_default_library",
diff --git a/cache/s3proxy/s3proxy.go b/cache/s3proxy/s3proxy.go
index 44eb571..ac9b157 100644
--- a/cache/s3proxy/s3proxy.go
+++ b/cache/s3proxy/s3proxy.go
@@ -8,9 +8,9 @@ import (
 	"log"
 	"path"
 
-	"github.com/buchgr/bazel-remote/cache"
-	"github.com/buchgr/bazel-remote/cache/disk/casblob"
-	"github.com/buchgr/bazel-remote/utils/backendproxy"
+	"github.com/buchgr/bazel-remote/v2/cache"
+	"github.com/buchgr/bazel-remote/v2/cache/disk/casblob"
+	"github.com/buchgr/bazel-remote/v2/utils/backendproxy"
 
 	"github.com/minio/minio-go/v7"
 	"github.com/minio/minio-go/v7/pkg/credentials"
diff --git a/config/BUILD.bazel b/config/BUILD.bazel
index a94745d..8301b65 100644
--- a/config/BUILD.bazel
+++ b/config/BUILD.bazel
@@ -10,7 +10,7 @@ go_library(
         "s3.go",
         "tls.go",
     ],
-    importpath = "github.com/buchgr/bazel-remote/config",
+    importpath = "github.com/buchgr/bazel-remote/v2/config",
     visibility = ["//visibility:public"],
     deps = [
         "//cache:go_default_library",
diff --git a/config/azblob.go b/config/azblob.go
index e3038f7..f96fe18 100644
--- a/config/azblob.go
+++ b/config/azblob.go
@@ -7,7 +7,8 @@ import (
 
 	"github.com/Azure/azure-sdk-for-go/sdk/azcore"
 	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
-	"github.com/buchgr/bazel-remote/cache/azblobproxy"
+
+	"github.com/buchgr/bazel-remote/v2/cache/azblobproxy"
 )
 
 type AzBlobStorageConfig struct {
diff --git a/config/config.go b/config/config.go
index c2509d3..55462a7 100644
--- a/config/config.go
+++ b/config/config.go
@@ -14,9 +14,9 @@ import (
 	"strings"
 	"time"
 
-	"github.com/buchgr/bazel-remote/cache"
-	"github.com/buchgr/bazel-remote/cache/azblobproxy"
-	"github.com/buchgr/bazel-remote/cache/s3proxy"
+	"github.com/buchgr/bazel-remote/v2/cache"
+	"github.com/buchgr/bazel-remote/v2/cache/azblobproxy"
+	"github.com/buchgr/bazel-remote/v2/cache/s3proxy"
 
 	"github.com/urfave/cli/v2"
 	yaml "gopkg.in/yaml.v3"
diff --git a/config/proxy.go b/config/proxy.go
index 2494556..05c0e3f 100644
--- a/config/proxy.go
+++ b/config/proxy.go
@@ -4,10 +4,10 @@ import (
 	"net/http"
 	"net/url"
 
-	"github.com/buchgr/bazel-remote/cache/azblobproxy"
-	"github.com/buchgr/bazel-remote/cache/gcsproxy"
-	"github.com/buchgr/bazel-remote/cache/httpproxy"
-	"github.com/buchgr/bazel-remote/cache/s3proxy"
+	"github.com/buchgr/bazel-remote/v2/cache/azblobproxy"
+	"github.com/buchgr/bazel-remote/v2/cache/gcsproxy"
+	"github.com/buchgr/bazel-remote/v2/cache/httpproxy"
+	"github.com/buchgr/bazel-remote/v2/cache/s3proxy"
 )
 
 func (c *Config) setProxy() error {
diff --git a/config/s3.go b/config/s3.go
index 1307e5d..cbd3cd7 100644
--- a/config/s3.go
+++ b/config/s3.go
@@ -4,7 +4,8 @@ import (
 	"fmt"
 	"log"
 
-	"github.com/buchgr/bazel-remote/cache/s3proxy"
+	"github.com/buchgr/bazel-remote/v2/cache/s3proxy"
+
 	"github.com/minio/minio-go/v7/pkg/credentials"
 )
 
diff --git a/genproto/build/bazel/remote/asset/v1/BUILD.bazel b/genproto/build/bazel/remote/asset/v1/BUILD.bazel
index 7102987..ef4028f 100644
--- a/genproto/build/bazel/remote/asset/v1/BUILD.bazel
+++ b/genproto/build/bazel/remote/asset/v1/BUILD.bazel
@@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
 go_library(
     name = "go_default_library",
     srcs = ["remote_asset.pb.go"],
-    importpath = "github.com/buchgr/bazel-remote/genproto/build/bazel/remote/asset/v1",
+    importpath = "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/remote/asset/v1",
     visibility = ["//visibility:public"],
     deps = [
         "//genproto/build/bazel/remote/execution/v2:go_default_library",
diff --git a/genproto/build/bazel/remote/asset/v1/remote_asset.pb.go b/genproto/build/bazel/remote/asset/v1/remote_asset.pb.go
index 0299db1..f346460 100644
--- a/genproto/build/bazel/remote/asset/v1/remote_asset.pb.go
+++ b/genproto/build/bazel/remote/asset/v1/remote_asset.pb.go
@@ -6,7 +6,7 @@ package remoteasset
 import (
 	context "context"
 	fmt "fmt"
-	v2 "github.com/buchgr/bazel-remote/genproto/build/bazel/remote/execution/v2"
+	v2 "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/remote/execution/v2"
 	proto "github.com/golang/protobuf/proto"
 	duration "github.com/golang/protobuf/ptypes/duration"
 	timestamp "github.com/golang/protobuf/ptypes/timestamp"
diff --git a/genproto/build/bazel/remote/execution/v2/BUILD.bazel b/genproto/build/bazel/remote/execution/v2/BUILD.bazel
index fedc961..48ad9fb 100644
--- a/genproto/build/bazel/remote/execution/v2/BUILD.bazel
+++ b/genproto/build/bazel/remote/execution/v2/BUILD.bazel
@@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
 go_library(
     name = "go_default_library",
     srcs = ["remote_execution.pb.go"],
-    importpath = "github.com/buchgr/bazel-remote/genproto/build/bazel/remote/execution/v2",
+    importpath = "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/remote/execution/v2",
     visibility = ["//visibility:public"],
     deps = [
         "//genproto/build/bazel/semver:go_default_library",
diff --git a/genproto/build/bazel/remote/execution/v2/remote_execution.pb.go b/genproto/build/bazel/remote/execution/v2/remote_execution.pb.go
index f8de174..00b5a89 100755
--- a/genproto/build/bazel/remote/execution/v2/remote_execution.pb.go
+++ b/genproto/build/bazel/remote/execution/v2/remote_execution.pb.go
@@ -22,7 +22,7 @@ package remoteexecution
 
 import (
 	context "context"
-	semver "github.com/buchgr/bazel-remote/genproto/build/bazel/semver"
+	semver "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/semver"
 	proto "github.com/golang/protobuf/proto"
 	any "github.com/golang/protobuf/ptypes/any"
 	duration "github.com/golang/protobuf/ptypes/duration"
diff --git a/genproto/build/bazel/semver/BUILD.bazel b/genproto/build/bazel/semver/BUILD.bazel
index 10a8219..bf31c24 100644
--- a/genproto/build/bazel/semver/BUILD.bazel
+++ b/genproto/build/bazel/semver/BUILD.bazel
@@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
 go_library(
     name = "go_default_library",
     srcs = ["semver.pb.go"],
-    importpath = "github.com/buchgr/bazel-remote/genproto/build/bazel/semver",
+    importpath = "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/semver",
     visibility = ["//visibility:public"],
     deps = ["@com_github_golang_protobuf//proto:go_default_library"],
 )
diff --git a/go.mod b/go.mod
index 424d62c..36ab011 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module github.com/buchgr/bazel-remote
+module github.com/buchgr/bazel-remote/v2
 
 require (
 	github.com/abbot/go-http-auth v0.4.1-0.20220112235402-e1cee1c72f2f
diff --git a/main.go b/main.go
index b20260c..cec3445 100644
--- a/main.go
+++ b/main.go
@@ -15,13 +15,13 @@ import (
 
 	auth "github.com/abbot/go-http-auth"
 
-	"github.com/buchgr/bazel-remote/cache/disk"
+	"github.com/buchgr/bazel-remote/v2/cache/disk"
 
-	"github.com/buchgr/bazel-remote/config"
-	"github.com/buchgr/bazel-remote/server"
-	"github.com/buchgr/bazel-remote/utils/flags"
-	"github.com/buchgr/bazel-remote/utils/idle"
-	"github.com/buchgr/bazel-remote/utils/rlimit"
+	"github.com/buchgr/bazel-remote/v2/config"
+	"github.com/buchgr/bazel-remote/v2/server"
+	"github.com/buchgr/bazel-remote/v2/utils/flags"
+	"github.com/buchgr/bazel-remote/v2/utils/idle"
+	"github.com/buchgr/bazel-remote/v2/utils/rlimit"
 
 	grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
 	"github.com/prometheus/client_golang/prometheus/promhttp"
diff --git a/server/BUILD.bazel b/server/BUILD.bazel
index 5212879..626d326 100644
--- a/server/BUILD.bazel
+++ b/server/BUILD.bazel
@@ -12,7 +12,7 @@ go_library(
         "grpc_idle_timeout.go",
         "http.go",
     ],
-    importpath = "github.com/buchgr/bazel-remote/server",
+    importpath = "github.com/buchgr/bazel-remote/v2/server",
     visibility = ["//visibility:public"],
     deps = [
         "//cache:go_default_library",
diff --git a/server/grpc.go b/server/grpc.go
index 42eefb2..126b6e2 100644
--- a/server/grpc.go
+++ b/server/grpc.go
@@ -16,13 +16,13 @@ import (
 	"google.golang.org/grpc/peer"
 	"google.golang.org/grpc/status"
 
-	asset "github.com/buchgr/bazel-remote/genproto/build/bazel/remote/asset/v1"
-	pb "github.com/buchgr/bazel-remote/genproto/build/bazel/remote/execution/v2"
-	"github.com/buchgr/bazel-remote/genproto/build/bazel/semver"
+	asset "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/remote/asset/v1"
+	pb "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/remote/execution/v2"
+	"github.com/buchgr/bazel-remote/v2/genproto/build/bazel/semver"
 
-	"github.com/buchgr/bazel-remote/cache"
-	"github.com/buchgr/bazel-remote/cache/disk"
-	"github.com/buchgr/bazel-remote/utils/validate"
+	"github.com/buchgr/bazel-remote/v2/cache"
+	"github.com/buchgr/bazel-remote/v2/cache/disk"
+	"github.com/buchgr/bazel-remote/v2/utils/validate"
 
 	_ "github.com/mostynb/go-grpc-compression/snappy" // Register snappy
 	_ "github.com/mostynb/go-grpc-compression/zstd"   // and zstd support.
diff --git a/server/grpc_ac.go b/server/grpc_ac.go
index a525652..846e96c 100644
--- a/server/grpc_ac.go
+++ b/server/grpc_ac.go
@@ -10,10 +10,10 @@ import (
 	"net"
 	"strings"
 
-	"github.com/buchgr/bazel-remote/cache"
-	"github.com/buchgr/bazel-remote/utils/validate"
+	"github.com/buchgr/bazel-remote/v2/cache"
+	"github.com/buchgr/bazel-remote/v2/utils/validate"
 
-	pb "github.com/buchgr/bazel-remote/genproto/build/bazel/remote/execution/v2"
+	pb "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/remote/execution/v2"
 
 	"google.golang.org/grpc/codes"
 	"google.golang.org/grpc/peer"
diff --git a/server/grpc_asset.go b/server/grpc_asset.go
index 9a51436..eb49b22 100644
--- a/server/grpc_asset.go
+++ b/server/grpc_asset.go
@@ -15,10 +15,10 @@ import (
 	"google.golang.org/grpc/codes"
 	grpc_status "google.golang.org/grpc/status"
 
-	asset "github.com/buchgr/bazel-remote/genproto/build/bazel/remote/asset/v1"
-	pb "github.com/buchgr/bazel-remote/genproto/build/bazel/remote/execution/v2"
+	asset "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/remote/asset/v1"
+	pb "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/remote/execution/v2"
 
-	"github.com/buchgr/bazel-remote/cache"
+	"github.com/buchgr/bazel-remote/v2/cache"
 )
 
 // FetchServer implementation
diff --git a/server/grpc_cas.go b/server/grpc_cas.go
index 52518a1..7ea8219 100644
--- a/server/grpc_cas.go
+++ b/server/grpc_cas.go
@@ -12,9 +12,9 @@ import (
 	grpc_status "google.golang.org/grpc/status"
 	"google.golang.org/protobuf/proto"
 
-	pb "github.com/buchgr/bazel-remote/genproto/build/bazel/remote/execution/v2"
+	pb "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/remote/execution/v2"
 
-	"github.com/buchgr/bazel-remote/cache"
+	"github.com/buchgr/bazel-remote/v2/cache"
 )
 
 var (
diff --git a/server/grpc_idle_timeout.go b/server/grpc_idle_timeout.go
index b2fd912..0761fee 100644
--- a/server/grpc_idle_timeout.go
+++ b/server/grpc_idle_timeout.go
@@ -5,7 +5,7 @@ import (
 
 	"google.golang.org/grpc"
 
-	"github.com/buchgr/bazel-remote/utils/idle"
+	"github.com/buchgr/bazel-remote/v2/utils/idle"
 )
 
 // GrpcIdleTimer wraps an idle.Timer, and provides gRPC interceptors that
diff --git a/server/http.go b/server/http.go
index 81db487..cc229d5 100644
--- a/server/http.go
+++ b/server/http.go
@@ -14,11 +14,11 @@ import (
 	"strings"
 	"time"
 
-	"github.com/buchgr/bazel-remote/cache"
-	"github.com/buchgr/bazel-remote/cache/disk"
-	"github.com/buchgr/bazel-remote/utils/validate"
+	"github.com/buchgr/bazel-remote/v2/cache"
+	"github.com/buchgr/bazel-remote/v2/cache/disk"
+	"github.com/buchgr/bazel-remote/v2/utils/validate"
 
-	pb "github.com/buchgr/bazel-remote/genproto/build/bazel/remote/execution/v2"
+	pb "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/remote/execution/v2"
 
 	"github.com/klauspost/compress/zstd"
 	"google.golang.org/protobuf/encoding/protojson"
diff --git a/utils/BUILD.bazel b/utils/BUILD.bazel
index 8c280b1..655a813 100644
--- a/utils/BUILD.bazel
+++ b/utils/BUILD.bazel
@@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
 go_library(
     name = "go_default_library",
     srcs = ["testutils.go"],
-    importpath = "github.com/buchgr/bazel-remote/utils",
+    importpath = "github.com/buchgr/bazel-remote/v2/utils",
     visibility = ["//visibility:public"],
     deps = [
         "//genproto/build/bazel/remote/execution/v2:go_default_library",
diff --git a/utils/backendproxy/BUILD.bazel b/utils/backendproxy/BUILD.bazel
index 2121f8a..868b21f 100644
--- a/utils/backendproxy/BUILD.bazel
+++ b/utils/backendproxy/BUILD.bazel
@@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
 go_library(
     name = "go_default_library",
     srcs = ["backendproxy.go"],
-    importpath = "github.com/buchgr/bazel-remote/utils/backendproxy",
+    importpath = "github.com/buchgr/bazel-remote/v2/utils/backendproxy",
     visibility = ["//visibility:public"],
     deps = ["//cache:go_default_library"],
 )
diff --git a/utils/backendproxy/backendproxy.go b/utils/backendproxy/backendproxy.go
index 4be848d..51ea373 100644
--- a/utils/backendproxy/backendproxy.go
+++ b/utils/backendproxy/backendproxy.go
@@ -3,7 +3,7 @@ package backendproxy
 import (
 	"io"
 
-	"github.com/buchgr/bazel-remote/cache"
+	"github.com/buchgr/bazel-remote/v2/cache"
 )
 
 type UploadReq struct {
diff --git a/utils/flags/BUILD.bazel b/utils/flags/BUILD.bazel
index c8dde3c..2b06046 100644
--- a/utils/flags/BUILD.bazel
+++ b/utils/flags/BUILD.bazel
@@ -6,7 +6,7 @@ go_library(
         "flags.go",
         "usage.go",
     ],
-    importpath = "github.com/buchgr/bazel-remote/utils/flags",
+    importpath = "github.com/buchgr/bazel-remote/v2/utils/flags",
     visibility = ["//visibility:public"],
     deps = [
         "//cache/azblobproxy:go_default_library",
diff --git a/utils/flags/flags.go b/utils/flags/flags.go
index 02ba4be..b8678c4 100644
--- a/utils/flags/flags.go
+++ b/utils/flags/flags.go
@@ -6,8 +6,9 @@ import (
 	"strconv"
 	"strings"
 
-	"github.com/buchgr/bazel-remote/cache/azblobproxy"
-	"github.com/buchgr/bazel-remote/cache/s3proxy"
+	"github.com/buchgr/bazel-remote/v2/cache/azblobproxy"
+	"github.com/buchgr/bazel-remote/v2/cache/s3proxy"
+
 	"github.com/urfave/cli/v2"
 )
 
diff --git a/utils/grpcreadclient/BUILD.bazel b/utils/grpcreadclient/BUILD.bazel
index 0e2d3e1..6764c31 100644
--- a/utils/grpcreadclient/BUILD.bazel
+++ b/utils/grpcreadclient/BUILD.bazel
@@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
 go_library(
     name = "go_default_library",
     srcs = ["grpcreadclient.go"],
-    importpath = "github.com/buchgr/bazel-remote/utils/grpcreadclient",
+    importpath = "github.com/buchgr/bazel-remote/v2/utils/grpcreadclient",
     visibility = ["//visibility:private"],
     deps = [
         "//genproto/build/bazel/remote/execution/v2:go_default_library",
diff --git a/utils/grpcreadclient/grpcreadclient.go b/utils/grpcreadclient/grpcreadclient.go
index 5d0310e..8e4f284 100644
--- a/utils/grpcreadclient/grpcreadclient.go
+++ b/utils/grpcreadclient/grpcreadclient.go
@@ -17,7 +17,7 @@ import (
 	"os"
 	"time"
 
-	pb "github.com/buchgr/bazel-remote/genproto/build/bazel/remote/execution/v2"
+	pb "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/remote/execution/v2"
 	"github.com/google/uuid"
 
 	"google.golang.org/genproto/googleapis/bytestream"
diff --git a/utils/idle/BUILD.bazel b/utils/idle/BUILD.bazel
index 947a6c9..976d89c 100644
--- a/utils/idle/BUILD.bazel
+++ b/utils/idle/BUILD.bazel
@@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
 go_library(
     name = "go_default_library",
     srcs = ["idle.go"],
-    importpath = "github.com/buchgr/bazel-remote/utils/idle",
+    importpath = "github.com/buchgr/bazel-remote/v2/utils/idle",
     visibility = ["//visibility:public"],
 )
 
diff --git a/utils/rlimit/BUILD.bazel b/utils/rlimit/BUILD.bazel
index 4632fd9..1736a2d 100644
--- a/utils/rlimit/BUILD.bazel
+++ b/utils/rlimit/BUILD.bazel
@@ -7,6 +7,6 @@ go_library(
         "rlimit_unix.go",
         "rlimit_windows.go",
     ],
-    importpath = "github.com/buchgr/bazel-remote/utils/rlimit",
+    importpath = "github.com/buchgr/bazel-remote/v2/utils/rlimit",
     visibility = ["//visibility:public"],
 )
diff --git a/utils/tempfile/BUILD.bazel b/utils/tempfile/BUILD.bazel
index db894f0..f5bf912 100644
--- a/utils/tempfile/BUILD.bazel
+++ b/utils/tempfile/BUILD.bazel
@@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
 go_library(
     name = "go_default_library",
     srcs = ["tempfile.go"],
-    importpath = "github.com/buchgr/bazel-remote/utils/tempfile",
+    importpath = "github.com/buchgr/bazel-remote/v2/utils/tempfile",
     visibility = ["//visibility:public"],
 )
 
diff --git a/utils/validate/BUILD.bazel b/utils/validate/BUILD.bazel
index 92034e5..36fd6a5 100644
--- a/utils/validate/BUILD.bazel
+++ b/utils/validate/BUILD.bazel
@@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
 go_library(
     name = "go_default_library",
     srcs = ["action_result.go"],
-    importpath = "github.com/buchgr/bazel-remote/utils/validate",
+    importpath = "github.com/buchgr/bazel-remote/v2/utils/validate",
     visibility = ["//visibility:public"],
     deps = ["//genproto/build/bazel/remote/execution/v2:go_default_library"],
 )
diff --git a/utils/validate/action_result.go b/utils/validate/action_result.go
index ccfe666..f6e7881 100644
--- a/utils/validate/action_result.go
+++ b/utils/validate/action_result.go
@@ -5,7 +5,7 @@ import (
 	"regexp"
 	"strings"
 
-	pb "github.com/buchgr/bazel-remote/genproto/build/bazel/remote/execution/v2"
+	pb "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/remote/execution/v2"
 )
 
 var (
diff --git a/utils/zstdpool/BUILD.bazel b/utils/zstdpool/BUILD.bazel
index ee576a2..23ff83d 100644
--- a/utils/zstdpool/BUILD.bazel
+++ b/utils/zstdpool/BUILD.bazel
@@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
 go_library(
     name = "go_default_library",
     srcs = ["zstdpool.go"],
-    importpath = "github.com/buchgr/bazel-remote/utils/zstdpool",
+    importpath = "github.com/buchgr/bazel-remote/v2/utils/zstdpool",
     visibility = ["//visibility:public"],
     deps = [
         "@com_github_klauspost_compress//zstd:go_default_library",


Test patch:
diff --git a/cache/disk/disk_test.go b/cache/disk/disk_test.go
index e5d413d..00d219d 100644
--- a/cache/disk/disk_test.go
+++ b/cache/disk/disk_test.go
@@ -18,13 +18,13 @@ import (
 	"testing"
 	"time"
 
-	"github.com/buchgr/bazel-remote/cache"
-	"github.com/buchgr/bazel-remote/cache/disk/casblob"
-	"github.com/buchgr/bazel-remote/cache/disk/zstdimpl"
-	"github.com/buchgr/bazel-remote/cache/httpproxy"
-	testutils "github.com/buchgr/bazel-remote/utils"
+	"github.com/buchgr/bazel-remote/v2/cache"
+	"github.com/buchgr/bazel-remote/v2/cache/disk/casblob"
+	"github.com/buchgr/bazel-remote/v2/cache/disk/zstdimpl"
+	"github.com/buchgr/bazel-remote/v2/cache/httpproxy"
+	testutils "github.com/buchgr/bazel-remote/v2/utils"
 
-	pb "github.com/buchgr/bazel-remote/genproto/build/bazel/remote/execution/v2"
+	pb "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/remote/execution/v2"
 	"google.golang.org/protobuf/proto"
 
 	"github.com/prometheus/client_golang/prometheus"
diff --git a/cache/disk/findmissing_test.go b/cache/disk/findmissing_test.go
index 6afd848..8eb5a75 100644
--- a/cache/disk/findmissing_test.go
+++ b/cache/disk/findmissing_test.go
@@ -10,11 +10,11 @@ import (
 	"sync"
 	"testing"
 
-	"github.com/buchgr/bazel-remote/cache"
-	testutils "github.com/buchgr/bazel-remote/utils"
+	"github.com/buchgr/bazel-remote/v2/cache"
+	testutils "github.com/buchgr/bazel-remote/v2/utils"
 	"google.golang.org/protobuf/proto"
 
-	pb "github.com/buchgr/bazel-remote/genproto/build/bazel/remote/execution/v2"
+	pb "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/remote/execution/v2"
 )
 
 func TestFilterNonNIl(t *testing.T) {
diff --git a/cache/httpproxy/httpproxy_test.go b/cache/httpproxy/httpproxy_test.go
index 2727db5..ce89555 100644
--- a/cache/httpproxy/httpproxy_test.go
+++ b/cache/httpproxy/httpproxy_test.go
@@ -16,11 +16,11 @@ import (
 	"testing"
 	"time"
 
-	"github.com/buchgr/bazel-remote/cache"
-	"github.com/buchgr/bazel-remote/cache/disk"
-	"github.com/buchgr/bazel-remote/cache/disk/casblob"
-	"github.com/buchgr/bazel-remote/cache/disk/zstdimpl"
-	testutils "github.com/buchgr/bazel-remote/utils"
+	"github.com/buchgr/bazel-remote/v2/cache"
+	"github.com/buchgr/bazel-remote/v2/cache/disk"
+	"github.com/buchgr/bazel-remote/v2/cache/disk/casblob"
+	"github.com/buchgr/bazel-remote/v2/cache/disk/zstdimpl"
+	testutils "github.com/buchgr/bazel-remote/v2/utils"
 )
 
 type testServer struct {
diff --git a/cache/s3proxy/s3proxy_test.go b/cache/s3proxy/s3proxy_test.go
index b87f134..06ef70a 100644
--- a/cache/s3proxy/s3proxy_test.go
+++ b/cache/s3proxy/s3proxy_test.go
@@ -3,7 +3,7 @@ package s3proxy
 import (
 	"testing"
 
-	"github.com/buchgr/bazel-remote/cache"
+	"github.com/buchgr/bazel-remote/v2/cache"
 )
 
 func TestObjectKey(t *testing.T) {
diff --git a/server/grpc_asset_test.go b/server/grpc_asset_test.go
index 731784c..f53be98 100644
--- a/server/grpc_asset_test.go
+++ b/server/grpc_asset_test.go
@@ -10,12 +10,12 @@ import (
 	"strings"
 	"testing"
 
-	asset "github.com/buchgr/bazel-remote/genproto/build/bazel/remote/asset/v1"
-	//pb "github.com/buchgr/bazel-remote/genproto/build/bazel/remote/execution/v2"
+	asset "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/remote/asset/v1"
+	//pb "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/remote/execution/v2"
 
 	"google.golang.org/grpc/codes"
 
-	testutils "github.com/buchgr/bazel-remote/utils"
+	testutils "github.com/buchgr/bazel-remote/v2/utils"
 )
 
 func TestAssetFetchBlob(t *testing.T) {
diff --git a/server/grpc_bytestream.go b/server/grpc_bytestream.go
index d9b3d8e..88099b7 100644
--- a/server/grpc_bytestream.go
+++ b/server/grpc_bytestream.go
@@ -12,12 +12,12 @@ import (
 	"google.golang.org/grpc/codes"
 	"google.golang.org/grpc/status"
 
-	"github.com/buchgr/bazel-remote/cache"
-	"github.com/buchgr/bazel-remote/cache/disk/casblob"
+	"github.com/buchgr/bazel-remote/v2/cache"
+	"github.com/buchgr/bazel-remote/v2/cache/disk/casblob"
 
 	"github.com/klauspost/compress/zstd"
 
-	"github.com/buchgr/bazel-remote/utils/zstdpool"
+	"github.com/buchgr/bazel-remote/v2/utils/zstdpool"
 	syncpool "github.com/mostynb/zstdpool-syncpool"
 )
 
diff --git a/server/grpc_test.go b/server/grpc_test.go
index 10a6583..55c5c49 100644
--- a/server/grpc_test.go
+++ b/server/grpc_test.go
@@ -13,8 +13,8 @@ import (
 	"testing"
 	"time"
 
-	asset "github.com/buchgr/bazel-remote/genproto/build/bazel/remote/asset/v1"
-	pb "github.com/buchgr/bazel-remote/genproto/build/bazel/remote/execution/v2"
+	asset "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/remote/asset/v1"
+	pb "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/remote/execution/v2"
 	"google.golang.org/grpc/health/grpc_health_v1"
 
 	"github.com/google/uuid"
@@ -27,10 +27,10 @@ import (
 	"google.golang.org/grpc/status"
 	"google.golang.org/grpc/test/bufconn"
 
-	"github.com/buchgr/bazel-remote/cache"
-	"github.com/buchgr/bazel-remote/cache/disk"
-	"github.com/buchgr/bazel-remote/cache/disk/casblob"
-	testutils "github.com/buchgr/bazel-remote/utils"
+	"github.com/buchgr/bazel-remote/v2/cache"
+	"github.com/buchgr/bazel-remote/v2/cache/disk"
+	"github.com/buchgr/bazel-remote/v2/cache/disk/casblob"
+	testutils "github.com/buchgr/bazel-remote/v2/utils"
 
 	"github.com/klauspost/compress/zstd"
 )
diff --git a/server/http_test.go b/server/http_test.go
index 207f5bf..baf1153 100644
--- a/server/http_test.go
+++ b/server/http_test.go
@@ -14,11 +14,11 @@ import (
 	"sync"
 	"testing"
 
-	"github.com/buchgr/bazel-remote/cache"
-	"github.com/buchgr/bazel-remote/cache/disk"
-	"github.com/buchgr/bazel-remote/utils"
+	"github.com/buchgr/bazel-remote/v2/cache"
+	"github.com/buchgr/bazel-remote/v2/cache/disk"
+	"github.com/buchgr/bazel-remote/v2/utils"
 
-	pb "github.com/buchgr/bazel-remote/genproto/build/bazel/remote/execution/v2"
+	pb "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/remote/execution/v2"
 	"google.golang.org/protobuf/proto"
 )
 
diff --git a/utils/idle/idle_test.go b/utils/idle/idle_test.go
index cfbf715..5c98ca3 100644
--- a/utils/idle/idle_test.go
+++ b/utils/idle/idle_test.go
@@ -4,7 +4,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/buchgr/bazel-remote/utils/idle"
+	"github.com/buchgr/bazel-remote/v2/utils/idle"
 )
 
 func TestIdleTimer(t *testing.T) {
diff --git a/utils/tempfile/tempfile_test.go b/utils/tempfile/tempfile_test.go
index 5628cd6..391ebb5 100644
--- a/utils/tempfile/tempfile_test.go
+++ b/utils/tempfile/tempfile_test.go
@@ -6,7 +6,7 @@ import (
 	"strings"
 	"testing"
 
-	"github.com/buchgr/bazel-remote/utils/tempfile"
+	"github.com/buchgr/bazel-remote/v2/utils/tempfile"
 )
 
 func TestTempfileCreator(t *testing.T) {
diff --git a/utils/testutils.go b/utils/testutils.go
index 6410e33..dc6349b 100644
--- a/utils/testutils.go
+++ b/utils/testutils.go
@@ -9,7 +9,7 @@ import (
 	"os"
 	"testing"
 
-	pb "github.com/buchgr/bazel-remote/genproto/build/bazel/remote/execution/v2"
+	pb "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/remote/execution/v2"
 )
 
 // TempDir creates a temporary directory and returns its name. If an error
diff --git a/utils/validate/action_result_test.go b/utils/validate/action_result_test.go
index 2b3b137..d7501b0 100644
--- a/utils/validate/action_result_test.go
+++ b/utils/validate/action_result_test.go
@@ -3,7 +3,7 @@ package validate
 import (
 	"testing"
 
-	pb "github.com/buchgr/bazel-remote/genproto/build/bazel/remote/execution/v2"
+	pb "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/remote/execution/v2"
 )
 
 func TestValidateNilPointers(t *testing.T) {