[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Transitioning golang-goprotobuf to unstable?



Hello,

I'm in a similar situation where the experimental versions are needed to
unblock updating to new upstream releases of mender (see #1004023 for
details).

I have very limited understanding how golang transitions work, but are
familiar with regular shared object transitions. I assume some of the
same problems appear (but in a slightly different fashion).

The breakage appearing from uploading experimental
golang-google-genproto can apparently be seen here:
https://release.debian.org/britney/pseudo-excuses-experimental.html#golang-google-genproto

Preferably all reverse dependencies should be buildable with both old
and new version to make for an easy transition. If we need to update
some reverse dependency at the same time, we might cause an avalanche
in reverse dependencies needing updates. (Right?)

I've figured out how to patch `golang-google-cloud` to build with both
(patch attached), but the others (test/runtime errors rather than
compilation problems) is beyond me.... Hope this helps and I would be
very happy if anyone have an idea how to move the rest forward.

Might be useful to open a bug report specifically about getting the new
verion(s) uploaded to unstable and track all done and remaining work
needed to unblock it from happening.

Regards,
Andreas Henriksson
>From 240dace736d2a67e803040444a20411b2c0a3142 Mon Sep 17 00:00:00 2001
From: Andreas Henriksson <andreas@fatal.se>
Date: Sun, 30 Jan 2022 16:11:47 +0100
Subject: [PATCH] Add
 debian/patches/0002-cloud-asset-v1beta1-is-out-of-beta.patch

---
 ...2-cloud-asset-v1beta1-is-out-of-beta.patch | 96 +++++++++++++++++++
 debian/patches/series                         |  1 +
 2 files changed, 97 insertions(+)
 create mode 100644 debian/patches/0002-cloud-asset-v1beta1-is-out-of-beta.patch

diff --git a/debian/patches/0002-cloud-asset-v1beta1-is-out-of-beta.patch b/debian/patches/0002-cloud-asset-v1beta1-is-out-of-beta.patch
new file mode 100644
index 00000000..fc93720d
--- /dev/null
+++ b/debian/patches/0002-cloud-asset-v1beta1-is-out-of-beta.patch
@@ -0,0 +1,96 @@
+From: Andreas Henriksson <andreas@fatal.se>
+Date: Sun, 30 Jan 2022 16:10:51 +0100
+Subject: cloud/asset/v1beta1 is out of beta
+
+
+This makes the package build both with the current
+golang-google-genproto-dev package in unstable
+( 0.0~git20200413.b5235f6-1 ) as well as the upcoming new
+upstream currently stuck in experimental
+( 0.0~git20210726.e7812ac-1~exp0 ) and should thus make the
+transition easier.
+
+---
+ asset/apiv1beta1/asset_client.go              | 2 +-
+ asset/apiv1beta1/asset_client_example_test.go | 6 +++---
+ asset/apiv1beta1/mock_test.go                 | 2 +-
+ internal/gapicgen/generator/config.go         | 8 ++++----
+ 4 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/asset/apiv1beta1/asset_client.go b/asset/apiv1beta1/asset_client.go
+index 961c0b8..2638944 100644
+--- a/asset/apiv1beta1/asset_client.go
++++ b/asset/apiv1beta1/asset_client.go
+@@ -28,7 +28,7 @@ import (
+ 	gax "github.com/googleapis/gax-go/v2"
+ 	"google.golang.org/api/option"
+ 	gtransport "google.golang.org/api/transport/grpc"
+-	assetpb "google.golang.org/genproto/googleapis/cloud/asset/v1beta1"
++	assetpb "google.golang.org/genproto/googleapis/cloud/asset/v1"
+ 	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
+ 	"google.golang.org/grpc"
+ 	"google.golang.org/grpc/codes"
+diff --git a/asset/apiv1beta1/asset_client_example_test.go b/asset/apiv1beta1/asset_client_example_test.go
+index 45daff4..132b725 100644
+--- a/asset/apiv1beta1/asset_client_example_test.go
++++ b/asset/apiv1beta1/asset_client_example_test.go
+@@ -20,7 +20,7 @@ import (
+ 	"context"
+ 
+ 	asset "cloud.google.com/go/asset/apiv1beta1"
+-	assetpb "google.golang.org/genproto/googleapis/cloud/asset/v1beta1"
++	assetpb "google.golang.org/genproto/googleapis/cloud/asset/v1"
+ )
+ 
+ func ExampleNewClient() {
+@@ -34,7 +34,7 @@ func ExampleNewClient() {
+ }
+ 
+ func ExampleClient_ExportAssets() {
+-	// import assetpb "google.golang.org/genproto/googleapis/cloud/asset/v1beta1"
++	// import assetpb "google.golang.org/genproto/googleapis/cloud/asset/v1"
+ 
+ 	ctx := context.Background()
+ 	c, err := asset.NewClient(ctx)
+@@ -59,7 +59,7 @@ func ExampleClient_ExportAssets() {
+ }
+ 
+ func ExampleClient_BatchGetAssetsHistory() {
+-	// import assetpb "google.golang.org/genproto/googleapis/cloud/asset/v1beta1"
++	// import assetpb "google.golang.org/genproto/googleapis/cloud/asset/v1"
+ 
+ 	ctx := context.Background()
+ 	c, err := asset.NewClient(ctx)
+diff --git a/asset/apiv1beta1/mock_test.go b/asset/apiv1beta1/mock_test.go
+index 4e3d479..fd7fe77 100644
+--- a/asset/apiv1beta1/mock_test.go
++++ b/asset/apiv1beta1/mock_test.go
+@@ -30,7 +30,7 @@ import (
+ 	"github.com/golang/protobuf/proto"
+ 	"github.com/golang/protobuf/ptypes"
+ 	"google.golang.org/api/option"
+-	assetpb "google.golang.org/genproto/googleapis/cloud/asset/v1beta1"
++	assetpb "google.golang.org/genproto/googleapis/cloud/asset/v1"
+ 	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
+ 
+ 	status "google.golang.org/genproto/googleapis/rpc/status"
+diff --git a/internal/gapicgen/generator/config.go b/internal/gapicgen/generator/config.go
+index cae5714..f9500e7 100644
+--- a/internal/gapicgen/generator/config.go
++++ b/internal/gapicgen/generator/config.go
+@@ -587,11 +587,11 @@ var microgenGapicConfigs = []*microgenConfig{
+ 		releaseLevel:          "beta",
+ 	},
+ 	{
+-		inputDirectoryPath:    "google/cloud/asset/v1beta1",
++		inputDirectoryPath:    "google/cloud/asset/v1",
+ 		pkg:                   "asset",
+-		importPath:            "cloud.google.com/go/asset/apiv1beta1",
+-		gRPCServiceConfigPath: "google/cloud/asset/v1beta1/cloudasset_grpc_service_config.json",
+-		apiServiceConfigPath:  "google/cloud/asset/v1beta1/cloudasset_v1beta1.yaml",
++		importPath:            "cloud.google.com/go/asset/apiv1",
++		gRPCServiceConfigPath: "google/cloud/asset/v1/cloudasset_grpc_service_config.json",
++		apiServiceConfigPath:  "google/cloud/asset/v1/cloudasset_v1beta1.yaml",
+ 		releaseLevel:          "beta",
+ 	},
+ 	{
diff --git a/debian/patches/series b/debian/patches/series
index 9cd654c3..9032e035 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 0001-skip-tests-which-need-network-access.patch
+0002-cloud-asset-v1beta1-is-out-of-beta.patch
-- 
2.30.2


Reply to: