chore: require go 1.22/1.23, upgrade protobuf, upgrade all deps

Go upgrade:
- Go 1.23 is current => use that for release builds
- Go 1.22 is less than one year old, it's desirable to support it.
- The [`Go Toolchains`](https://go.dev/doc/toolchain) stuff is available
  in both of these (would also be in Go 1.21). That is quite nice stuff,
  but required some changes to how we versions we use in CircleCI and
  the `release-docker` Makefile target.

Protobuf upgrade:
- Go to protobuf GH release website
- Download latest locally
- run `sha256sum`
- replace existing pinned hashes
- `make generate`

Deps upgrade:
- `go get -t -u all`
- repository moves aren't handled well automatically, fix manually
- repeat until no changes
This commit is contained in:
Christian Schwarz
2024-09-08 12:58:26 +00:00
parent 08769a8752
commit def510abfd
27 changed files with 769 additions and 2553 deletions
-1
View File
@@ -1,6 +1,5 @@
// Code generated by "enumer -type=errorClass"; DO NOT EDIT.
//
package driver
import (
@@ -1,6 +1,5 @@
// Code generated by "enumer -type=InitialReplicationAutoResolution -trimprefix=InitialReplicationAutoResolution"; DO NOT EDIT.
//
package logic
import (
+27 -31
View File
@@ -1,13 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.14.0
// protoc-gen-go v1.34.2
// protoc v5.28.0
// source: pdu.proto
package pdu
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@@ -21,10 +20,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type ReplicationGuaranteeKind int32
const (
@@ -1153,6 +1148,7 @@ type ReplicationCursorRes struct {
unknownFields protoimpl.UnknownFields
// Types that are assignable to Result:
//
// *ReplicationCursorRes_Guid
// *ReplicationCursorRes_Notexist
Result isReplicationCursorRes_Result `protobuf_oneof:"Result"`
@@ -1496,7 +1492,7 @@ func file_pdu_proto_rawDescGZIP() []byte {
var file_pdu_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_pdu_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
var file_pdu_proto_goTypes = []interface{}{
var file_pdu_proto_goTypes = []any{
(ReplicationGuaranteeKind)(0), // 0: ReplicationGuaranteeKind
(FilesystemVersion_VersionType)(0), // 1: FilesystemVersion.VersionType
(*ListFilesystemReq)(nil), // 2: ListFilesystemReq
@@ -1565,7 +1561,7 @@ func file_pdu_proto_init() {
return
}
if !protoimpl.UnsafeEnabled {
file_pdu_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
file_pdu_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*ListFilesystemReq); i {
case 0:
return &v.state
@@ -1577,7 +1573,7 @@ func file_pdu_proto_init() {
return nil
}
}
file_pdu_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
file_pdu_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*ListFilesystemRes); i {
case 0:
return &v.state
@@ -1589,7 +1585,7 @@ func file_pdu_proto_init() {
return nil
}
}
file_pdu_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
file_pdu_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*Filesystem); i {
case 0:
return &v.state
@@ -1601,7 +1597,7 @@ func file_pdu_proto_init() {
return nil
}
}
file_pdu_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
file_pdu_proto_msgTypes[3].Exporter = func(v any, i int) any {
switch v := v.(*ListFilesystemVersionsReq); i {
case 0:
return &v.state
@@ -1613,7 +1609,7 @@ func file_pdu_proto_init() {
return nil
}
}
file_pdu_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
file_pdu_proto_msgTypes[4].Exporter = func(v any, i int) any {
switch v := v.(*ListFilesystemVersionsRes); i {
case 0:
return &v.state
@@ -1625,7 +1621,7 @@ func file_pdu_proto_init() {
return nil
}
}
file_pdu_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
file_pdu_proto_msgTypes[5].Exporter = func(v any, i int) any {
switch v := v.(*FilesystemVersion); i {
case 0:
return &v.state
@@ -1637,7 +1633,7 @@ func file_pdu_proto_init() {
return nil
}
}
file_pdu_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
file_pdu_proto_msgTypes[6].Exporter = func(v any, i int) any {
switch v := v.(*SendReq); i {
case 0:
return &v.state
@@ -1649,7 +1645,7 @@ func file_pdu_proto_init() {
return nil
}
}
file_pdu_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
file_pdu_proto_msgTypes[7].Exporter = func(v any, i int) any {
switch v := v.(*ReplicationConfig); i {
case 0:
return &v.state
@@ -1661,7 +1657,7 @@ func file_pdu_proto_init() {
return nil
}
}
file_pdu_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
file_pdu_proto_msgTypes[8].Exporter = func(v any, i int) any {
switch v := v.(*ReplicationConfigProtection); i {
case 0:
return &v.state
@@ -1673,7 +1669,7 @@ func file_pdu_proto_init() {
return nil
}
}
file_pdu_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
file_pdu_proto_msgTypes[9].Exporter = func(v any, i int) any {
switch v := v.(*Property); i {
case 0:
return &v.state
@@ -1685,7 +1681,7 @@ func file_pdu_proto_init() {
return nil
}
}
file_pdu_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
file_pdu_proto_msgTypes[10].Exporter = func(v any, i int) any {
switch v := v.(*SendRes); i {
case 0:
return &v.state
@@ -1697,7 +1693,7 @@ func file_pdu_proto_init() {
return nil
}
}
file_pdu_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
file_pdu_proto_msgTypes[11].Exporter = func(v any, i int) any {
switch v := v.(*SendCompletedReq); i {
case 0:
return &v.state
@@ -1709,7 +1705,7 @@ func file_pdu_proto_init() {
return nil
}
}
file_pdu_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
file_pdu_proto_msgTypes[12].Exporter = func(v any, i int) any {
switch v := v.(*SendCompletedRes); i {
case 0:
return &v.state
@@ -1721,7 +1717,7 @@ func file_pdu_proto_init() {
return nil
}
}
file_pdu_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
file_pdu_proto_msgTypes[13].Exporter = func(v any, i int) any {
switch v := v.(*ReceiveReq); i {
case 0:
return &v.state
@@ -1733,7 +1729,7 @@ func file_pdu_proto_init() {
return nil
}
}
file_pdu_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
file_pdu_proto_msgTypes[14].Exporter = func(v any, i int) any {
switch v := v.(*ReceiveRes); i {
case 0:
return &v.state
@@ -1745,7 +1741,7 @@ func file_pdu_proto_init() {
return nil
}
}
file_pdu_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
file_pdu_proto_msgTypes[15].Exporter = func(v any, i int) any {
switch v := v.(*DestroySnapshotsReq); i {
case 0:
return &v.state
@@ -1757,7 +1753,7 @@ func file_pdu_proto_init() {
return nil
}
}
file_pdu_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
file_pdu_proto_msgTypes[16].Exporter = func(v any, i int) any {
switch v := v.(*DestroySnapshotRes); i {
case 0:
return &v.state
@@ -1769,7 +1765,7 @@ func file_pdu_proto_init() {
return nil
}
}
file_pdu_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
file_pdu_proto_msgTypes[17].Exporter = func(v any, i int) any {
switch v := v.(*DestroySnapshotsRes); i {
case 0:
return &v.state
@@ -1781,7 +1777,7 @@ func file_pdu_proto_init() {
return nil
}
}
file_pdu_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
file_pdu_proto_msgTypes[18].Exporter = func(v any, i int) any {
switch v := v.(*ReplicationCursorReq); i {
case 0:
return &v.state
@@ -1793,7 +1789,7 @@ func file_pdu_proto_init() {
return nil
}
}
file_pdu_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
file_pdu_proto_msgTypes[19].Exporter = func(v any, i int) any {
switch v := v.(*ReplicationCursorRes); i {
case 0:
return &v.state
@@ -1805,7 +1801,7 @@ func file_pdu_proto_init() {
return nil
}
}
file_pdu_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
file_pdu_proto_msgTypes[20].Exporter = func(v any, i int) any {
switch v := v.(*PingReq); i {
case 0:
return &v.state
@@ -1817,7 +1813,7 @@ func file_pdu_proto_init() {
return nil
}
}
file_pdu_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
file_pdu_proto_msgTypes[21].Exporter = func(v any, i int) any {
switch v := v.(*PingRes); i {
case 0:
return &v.state
@@ -1830,7 +1826,7 @@ func file_pdu_proto_init() {
}
}
}
file_pdu_proto_msgTypes[19].OneofWrappers = []interface{}{
file_pdu_proto_msgTypes[19].OneofWrappers = []any{
(*ReplicationCursorRes_Guid)(nil),
(*ReplicationCursorRes_Notexist)(nil),
}
+52 -20
View File
@@ -1,4 +1,8 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc v5.28.0
// source: pdu.proto
package pdu
@@ -11,8 +15,18 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
Replication_Ping_FullMethodName = "/Replication/Ping"
Replication_ListFilesystems_FullMethodName = "/Replication/ListFilesystems"
Replication_ListFilesystemVersions_FullMethodName = "/Replication/ListFilesystemVersions"
Replication_DestroySnapshots_FullMethodName = "/Replication/DestroySnapshots"
Replication_ReplicationCursor_FullMethodName = "/Replication/ReplicationCursor"
Replication_SendDry_FullMethodName = "/Replication/SendDry"
Replication_SendCompleted_FullMethodName = "/Replication/SendCompleted"
)
// ReplicationClient is the client API for Replication service.
//
@@ -36,8 +50,9 @@ func NewReplicationClient(cc grpc.ClientConnInterface) ReplicationClient {
}
func (c *replicationClient) Ping(ctx context.Context, in *PingReq, opts ...grpc.CallOption) (*PingRes, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(PingRes)
err := c.cc.Invoke(ctx, "/Replication/Ping", in, out, opts...)
err := c.cc.Invoke(ctx, Replication_Ping_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -45,8 +60,9 @@ func (c *replicationClient) Ping(ctx context.Context, in *PingReq, opts ...grpc.
}
func (c *replicationClient) ListFilesystems(ctx context.Context, in *ListFilesystemReq, opts ...grpc.CallOption) (*ListFilesystemRes, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListFilesystemRes)
err := c.cc.Invoke(ctx, "/Replication/ListFilesystems", in, out, opts...)
err := c.cc.Invoke(ctx, Replication_ListFilesystems_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -54,8 +70,9 @@ func (c *replicationClient) ListFilesystems(ctx context.Context, in *ListFilesys
}
func (c *replicationClient) ListFilesystemVersions(ctx context.Context, in *ListFilesystemVersionsReq, opts ...grpc.CallOption) (*ListFilesystemVersionsRes, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListFilesystemVersionsRes)
err := c.cc.Invoke(ctx, "/Replication/ListFilesystemVersions", in, out, opts...)
err := c.cc.Invoke(ctx, Replication_ListFilesystemVersions_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -63,8 +80,9 @@ func (c *replicationClient) ListFilesystemVersions(ctx context.Context, in *List
}
func (c *replicationClient) DestroySnapshots(ctx context.Context, in *DestroySnapshotsReq, opts ...grpc.CallOption) (*DestroySnapshotsRes, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(DestroySnapshotsRes)
err := c.cc.Invoke(ctx, "/Replication/DestroySnapshots", in, out, opts...)
err := c.cc.Invoke(ctx, Replication_DestroySnapshots_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -72,8 +90,9 @@ func (c *replicationClient) DestroySnapshots(ctx context.Context, in *DestroySna
}
func (c *replicationClient) ReplicationCursor(ctx context.Context, in *ReplicationCursorReq, opts ...grpc.CallOption) (*ReplicationCursorRes, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ReplicationCursorRes)
err := c.cc.Invoke(ctx, "/Replication/ReplicationCursor", in, out, opts...)
err := c.cc.Invoke(ctx, Replication_ReplicationCursor_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -81,8 +100,9 @@ func (c *replicationClient) ReplicationCursor(ctx context.Context, in *Replicati
}
func (c *replicationClient) SendDry(ctx context.Context, in *SendReq, opts ...grpc.CallOption) (*SendRes, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SendRes)
err := c.cc.Invoke(ctx, "/Replication/SendDry", in, out, opts...)
err := c.cc.Invoke(ctx, Replication_SendDry_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -90,8 +110,9 @@ func (c *replicationClient) SendDry(ctx context.Context, in *SendReq, opts ...gr
}
func (c *replicationClient) SendCompleted(ctx context.Context, in *SendCompletedReq, opts ...grpc.CallOption) (*SendCompletedRes, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SendCompletedRes)
err := c.cc.Invoke(ctx, "/Replication/SendCompleted", in, out, opts...)
err := c.cc.Invoke(ctx, Replication_SendCompleted_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -100,7 +121,7 @@ func (c *replicationClient) SendCompleted(ctx context.Context, in *SendCompleted
// ReplicationServer is the server API for Replication service.
// All implementations must embed UnimplementedReplicationServer
// for forward compatibility
// for forward compatibility.
type ReplicationServer interface {
Ping(context.Context, *PingReq) (*PingRes, error)
ListFilesystems(context.Context, *ListFilesystemReq) (*ListFilesystemRes, error)
@@ -112,9 +133,12 @@ type ReplicationServer interface {
mustEmbedUnimplementedReplicationServer()
}
// UnimplementedReplicationServer must be embedded to have forward compatible implementations.
type UnimplementedReplicationServer struct {
}
// UnimplementedReplicationServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedReplicationServer struct{}
func (UnimplementedReplicationServer) Ping(context.Context, *PingReq) (*PingRes, error) {
return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented")
@@ -138,6 +162,7 @@ func (UnimplementedReplicationServer) SendCompleted(context.Context, *SendComple
return nil, status.Errorf(codes.Unimplemented, "method SendCompleted not implemented")
}
func (UnimplementedReplicationServer) mustEmbedUnimplementedReplicationServer() {}
func (UnimplementedReplicationServer) testEmbeddedByValue() {}
// UnsafeReplicationServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ReplicationServer will
@@ -147,6 +172,13 @@ type UnsafeReplicationServer interface {
}
func RegisterReplicationServer(s grpc.ServiceRegistrar, srv ReplicationServer) {
// If the following call pancis, it indicates UnimplementedReplicationServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Replication_ServiceDesc, srv)
}
@@ -160,7 +192,7 @@ func _Replication_Ping_Handler(srv interface{}, ctx context.Context, dec func(in
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Replication/Ping",
FullMethod: Replication_Ping_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReplicationServer).Ping(ctx, req.(*PingReq))
@@ -178,7 +210,7 @@ func _Replication_ListFilesystems_Handler(srv interface{}, ctx context.Context,
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Replication/ListFilesystems",
FullMethod: Replication_ListFilesystems_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReplicationServer).ListFilesystems(ctx, req.(*ListFilesystemReq))
@@ -196,7 +228,7 @@ func _Replication_ListFilesystemVersions_Handler(srv interface{}, ctx context.Co
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Replication/ListFilesystemVersions",
FullMethod: Replication_ListFilesystemVersions_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReplicationServer).ListFilesystemVersions(ctx, req.(*ListFilesystemVersionsReq))
@@ -214,7 +246,7 @@ func _Replication_DestroySnapshots_Handler(srv interface{}, ctx context.Context,
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Replication/DestroySnapshots",
FullMethod: Replication_DestroySnapshots_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReplicationServer).DestroySnapshots(ctx, req.(*DestroySnapshotsReq))
@@ -232,7 +264,7 @@ func _Replication_ReplicationCursor_Handler(srv interface{}, ctx context.Context
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Replication/ReplicationCursor",
FullMethod: Replication_ReplicationCursor_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReplicationServer).ReplicationCursor(ctx, req.(*ReplicationCursorReq))
@@ -250,7 +282,7 @@ func _Replication_SendDry_Handler(srv interface{}, ctx context.Context, dec func
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Replication/SendDry",
FullMethod: Replication_SendDry_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReplicationServer).SendDry(ctx, req.(*SendReq))
@@ -268,7 +300,7 @@ func _Replication_SendCompleted_Handler(srv interface{}, ctx context.Context, de
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Replication/SendCompleted",
FullMethod: Replication_SendCompleted_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReplicationServer).SendCompleted(ctx, req.(*SendCompletedReq))