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

Re: Bug#945215: ITP: golang-github-census-instrumentation-opencensus-proto -- Language Independent Interface Types For OpenCensus



Hi Dmitry, thanks for the review and sorry for the delay!

On 11/25/19 9:22 AM, Dmitry Smirnov wrote:
Awesome. Thanks.
It would be very nice to mention URL of the Salsa repository in ITP.

For ITPs I recommend to set metadata properly such as

     block 945216 by 945215

(because one new package depends on another)


which is needed to build Azure/go-autorest v13.3.0
Therefore I would do the following:

     bts affects 945216 src:golang-github-azure-go-autorest


I took note. The reason I never set metadata is that I never use it in the first place, so that leads to a newbie question: after setting it, how do I make use of it? For example, I look at https://tracker.debian.org/pkg/golang-github-azure-go-autorest, I don't see any mention of the "affects" that you set with the bts. Is there another place I should look at? (I know it's a vast question, no need to tell everything now :)


Few corrections are needed to prepare the first package for upload:

1. correct short package description in regards to capitalization

2. Pre-built binary ".jar" file should be removed from the source archive

3. All generated files must be re-built from source

Merely setting "DH_GOLANG_GO_GENERATE:=1" is not enough as there will be
FTBFS if you remove pre-built files before build (always a good idea to
ensure a build integrity):

~~~~
override_dh_clean:
<------>dh_clean
<------>-find . -type f -name '*.pb.go' -delete -printf 'removed %p\n'
~~~~

Upstream build .pb.go files by "src/mkgogen.sh" which is not invoked on
build...


Thanks for pointing that out. I think I fixed everything in salsa master.

Regarding generated files, I compared the new package with the old one, and I saw a only one difference, in the two .pb.gw.go files:

~~~~

 import (
-    "context"
     "io"
     "net/http"

     "github.com/golang/protobuf/proto"
     "github.com/grpc-ecosystem/grpc-gateway/runtime"
     "github.com/grpc-ecosystem/grpc-gateway/utilities"
+    "golang.org/x/net/context"
     "google.golang.org/grpc"
     "google.golang.org/grpc/codes"
     "google.golang.org/grpc/grpclog"
@@ -35,7 +35,11 @@
         grpclog.Infof("Failed to start streaming: %v", err)
         return nil, metadata, err
     }
-    dec := marshaler.NewDecoder(req.Body)
+    newReader, berr := utilities.IOReaderFactory(req.Body)
+    if berr != nil {
+        return nil, metadata, berr
+    }
+    dec := marshaler.NewDecoder(newReader())
     handleSend := func() error {
         var protoReq ExportTraceServiceRequest
         err := dec.Decode(&protoReq)

~~~~

Cheers,

  Arnaud


Reply to: