Re: [protobuf] Problem with timestamp data format while migrating to protoc4 from protoc 3.6.1

2020-08-18 Thread rajegun
Thanks for the update and the notes about the version upgrade, we were 
thinking of doing upgrade but we will probably stick to 3.13.0 instead as 
you had mentioned.
We have now fixed the issue by rolling back to older version of the 
libraries and the dependencies we had in the ubuntu 18.04 environment.

On Tuesday, 11 August 2020 at 23:20:15 UTC+1 acoz...@google.com wrote:

> That problem is a little bit surprising because the Go code generator is 
> implemented as a plugin in a separate repo, and shouldn't therefore be 
> affected by a protoc upgrade. Did you upgrade your Go protoc plugin at the 
> same time?
>
> As a side note, sorry for the confusion but we decided not to increment 
> the major version from 3 to 4 yet. We published artifacts for 4.0.0-rc1 and 
> 4.0.0-rc2 but there will not be a 4.0 release in the immediate future. We 
> are going to release 3.13.0 soon instead.
>
> On Sat, Aug 8, 2020 at 3:31 AM rajegun  wrote:
>
>> Hello there,
>>
>> We are currently using protoc 3.6.1 and planning to migrate to 4.x
>>
>> During our POC on this migration we found timestamp returned using our 
>> existing code has differed from the format we were using, digging further 
>> we dont know what exactly caused the problem.
>>
>> Timeformat received with 3.6.1 => "time": 
>> "2020-07-31T07:13:07.396733914Z",
>>
>> Timeformat received with 4.0.0 => "time": {
>> "seconds": "1596871176",
>> "nanos": 363018229
>>   },
>>
>> Code:
>>
>> *partner.proto*
>> **
>> message ResponsePartnerEmployeeList {
>> .. 
>> google.protobuf.Timestamp time = 3;
>> }
>>
>> *partner*.*pg.go file (protoc 3.6.1 version created)*
>> ---
>> timestamp "github.com/golang/protobuf/ptypes/timestamp"
>>
>> type ResponseList struct {
>> .
>> Time *timestamp.Timestamp 
>> `protobuf:"bytes,3,opt,name=time,proto3" json:"time,omitempty"`
>>
>> XXX_NoUnkeyedLiteral struct{} `json:"-"`
>> XXX_unrecognized []byte   `json:"-"`
>> XXX_sizecacheint32`json:"-"`
>> }
>>
>> *partner*.*pg.go file (protoc 4.0.0 version created)*
>> ---
>> timestamp "github.com/golang/protobuf/ptypes/timestamp"
>>
>> type ResponseList struct {
>> state protoimpl.MessageState
>> sizeCache protoimpl.SizeCache
>> unknownFields protoimpl.UnknownFields
>>
>> ...
>> Time *timestamp.Timestamp `protobuf:"bytes,3,opt,name=time,proto3" 
>> json:"time,omitempty"`
>> }
>> ---
>>
>>
>> *utils.go file (time data is updated here to the structure)*
>>
>> import pb "github.com/x/proto/partner"
>> import "github.com/golang/protobuf/ptypes"
>>
>> func GenerateResponse(errorCode Error, mesg ...string) *pb.ResponseList {
>> *time, _ := ptypes.TimestampProto(time.Now())*
>>
>> return {
>> 
>> 
>> 
>> *Time: time,*
>> }
>>
>> -
>>
>> Problem in the time format received, this affects our application which 
>> expects the data in 3.6.1 format
>>
>> Timeformat received with *3.6.1 => "time": 
>> "2020-07-31T07:13:07.396733914Z",*
>>
>> Timeformat received with
>>
>>
>> * 4.0.0 => "time": {"seconds": "1596871176","nanos": 363018229  
>> },*
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Protocol Buffers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to protobuf+u...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/protobuf/3a10f37f-0fee-48c8-bced-05d45af4a5b9o%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/507c0135-5ae7-48ea-b688-96492f31d9bfn%40googlegroups.com.


Re: [protobuf] Problem with timestamp data format while migrating to protoc4 from protoc 3.6.1

2020-08-11 Thread 'Adam Cozzette' via Protocol Buffers
That problem is a little bit surprising because the Go code generator is
implemented as a plugin in a separate repo, and shouldn't therefore be
affected by a protoc upgrade. Did you upgrade your Go protoc plugin at the
same time?

As a side note, sorry for the confusion but we decided not to increment the
major version from 3 to 4 yet. We published artifacts for 4.0.0-rc1 and
4.0.0-rc2 but there will not be a 4.0 release in the immediate future. We
are going to release 3.13.0 soon instead.

On Sat, Aug 8, 2020 at 3:31 AM rajegun  wrote:

> Hello there,
>
> We are currently using protoc 3.6.1 and planning to migrate to 4.x
>
> During our POC on this migration we found timestamp returned using our
> existing code has differed from the format we were using, digging further
> we dont know what exactly caused the problem.
>
> Timeformat received with 3.6.1 => "time": "2020-07-31T07:13:07.396733914Z",
>
> Timeformat received with 4.0.0 => "time": {
> "seconds": "1596871176",
> "nanos": 363018229
>   },
>
> Code:
>
> *partner.proto*
> **
> message ResponsePartnerEmployeeList {
> ..
> google.protobuf.Timestamp time = 3;
> }
>
> *partner*.*pg.go file (protoc 3.6.1 version created)*
> ---
> timestamp "github.com/golang/protobuf/ptypes/timestamp"
>
> type ResponseList struct {
> .
> Time *timestamp.Timestamp
> `protobuf:"bytes,3,opt,name=time,proto3" json:"time,omitempty"`
>
> XXX_NoUnkeyedLiteral struct{} `json:"-"`
> XXX_unrecognized []byte   `json:"-"`
> XXX_sizecacheint32`json:"-"`
> }
>
> *partner*.*pg.go file (protoc 4.0.0 version created)*
> ---
> timestamp "github.com/golang/protobuf/ptypes/timestamp"
>
> type ResponseList struct {
> state protoimpl.MessageState
> sizeCache protoimpl.SizeCache
> unknownFields protoimpl.UnknownFields
>
> ...
> Time *timestamp.Timestamp `protobuf:"bytes,3,opt,name=time,proto3"
> json:"time,omitempty"`
> }
> ---
>
>
> *utils.go file (time data is updated here to the structure)*
>
> import pb "github.com/x/proto/partner"
> import "github.com/golang/protobuf/ptypes"
>
> func GenerateResponse(errorCode Error, mesg ...string) *pb.ResponseList {
> *time, _ := ptypes.TimestampProto(time.Now())*
>
> return {
> 
> 
> 
> *Time: time,*
> }
>
> -
>
> Problem in the time format received, this affects our application which
> expects the data in 3.6.1 format
>
> Timeformat received with *3.6.1 => "time":
> "2020-07-31T07:13:07.396733914Z",*
>
> Timeformat received with
>
>
> * 4.0.0 => "time": {"seconds": "1596871176","nanos": 363018229  },*
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to protobuf+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/protobuf/3a10f37f-0fee-48c8-bced-05d45af4a5b9o%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/CADqAXr4Fe8P07ZsaWg%2BouXJ9D48Fn8xH6ASNZp-wwzGX0tZ0%2BA%40mail.gmail.com.


[protobuf] Problem with timestamp data format while migrating to protoc4 from protoc 3.6.1

2020-08-08 Thread rajegun
Hello there,

We are currently using protoc 3.6.1 and planning to migrate to 4.x

During our POC on this migration we found timestamp returned using our 
existing code has differed from the format we were using, digging further 
we dont know what exactly caused the problem.

Timeformat received with 3.6.1 => "time": "2020-07-31T07:13:07.396733914Z",

Timeformat received with 4.0.0 => "time": {
"seconds": "1596871176",
"nanos": 363018229
  },

Code:

*partner.proto*
**
message ResponsePartnerEmployeeList {
.. 
google.protobuf.Timestamp time = 3;
}

*partner*.*pg.go file (protoc 3.6.1 version created)*
---
timestamp "github.com/golang/protobuf/ptypes/timestamp"

type ResponseList struct {
.
Time *timestamp.Timestamp 
`protobuf:"bytes,3,opt,name=time,proto3" json:"time,omitempty"`

XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte   `json:"-"`
XXX_sizecacheint32`json:"-"`
}

*partner*.*pg.go file (protoc 4.0.0 version created)*
---
timestamp "github.com/golang/protobuf/ptypes/timestamp"

type ResponseList struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

...
Time *timestamp.Timestamp `protobuf:"bytes,3,opt,name=time,proto3" 
json:"time,omitempty"`
}
---


*utils.go file (time data is updated here to the structure)*

import pb "github.com/x/proto/partner"
import "github.com/golang/protobuf/ptypes"

func GenerateResponse(errorCode Error, mesg ...string) *pb.ResponseList {
*time, _ := ptypes.TimestampProto(time.Now())*

return {



*Time: time,*
}

-

Problem in the time format received, this affects our application which 
expects the data in 3.6.1 format

Timeformat received with *3.6.1 => "time": 
"2020-07-31T07:13:07.396733914Z",*

Timeformat received with


* 4.0.0 => "time": {"seconds": "1596871176","nanos": 363018229  },*

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/3a10f37f-0fee-48c8-bced-05d45af4a5b9o%40googlegroups.com.