Commit Graph

172 Commits

Author SHA1 Message Date
Yuxuan 'fishy' Wang
4d46c11244 THRIFT-4612: THeader support in go library
Client: go

Implement THeaderTransport and THeaderProtocol, with support of:

* clients:
  - headers
  - framedBinary
  - unframedBinary
  - framedCompact
  - unframedCompact
* transforms:
  - none
  - zlib
* info types:
  - key_value
* wrapped protocols:
  - TBinary
  - TCompact

The support list is in general on par of the THeader implementation in
the python library.

The cross-test passes, except ones related to cpp/nodejs http transport,
which were also failing for non-theader protocols.

This change also fixes two bugs:

1. A small issue in test/go/src/bin/testserver/main.go
2. A bug in TFrameTransport go implementation
2019-06-19 22:52:24 +02:00
timestee
370d7513f0 spelling mistake, perhaps (#1803) [ci skip 2019-05-20 07:20:42 -04:00
Jens Geyer
264a3f318e additional test for TSimpleJSONProtocol 2019-02-24 17:19:09 +01:00
James E. King III
dbc1f8def5
THRIFT-4024, THRIFT-4783: throw when skipping invalid type (#1742)
* THRIFT-4024: make c_glib throw on unsupported type when skipping
* THRIFT-4783: throw on invalid skip (py)
* THRIFT-4024: make cpp throw on unsupported type when skipping
* THRIFT-4024: uniform skip behavior on unsupported type
2019-02-14 16:46:38 -05:00
Renan Cakirerk
c28a739b8c THRIFT-4747: The 'omitempty' tag should not be appended to optional fields that have a default value 2019-01-21 22:25:40 -05:00
James E. King III
c3375d9e43 Merge remote-tracking branch 'origin/0.12.0' into consume-0.12.0 2018-12-30 11:06:00 -05:00
jfarrell
384647d290 Version 0.12.0 2018-12-18 20:24:34 -05:00
Jay Gheewala
2b7365c54f THRIFT-4659: Fix race when closing server socket (#1645)
Client: go
2018-12-11 09:44:44 +01:00
D. Can Celasun
9ee29516c4 Replace git.apache.org imports with github.com
Client: go
2018-10-19 07:48:56 +01:00
Craig Wickesser
5c1ecb67cd THRIFT-4650: fix required fields incorrectly being marked as set
This closes #1610.

Client: go
2018-10-16 07:40:13 +01:00
Vyacheslav Kulakov
6e29b192a3 Remove checking of remaining bytes in the Go library.
Obtaining the remaining bytes isn't supported with some combinations of protocols and transports in the Go library. For example, the binary protocol doesn't work properly with the zlib transport which wraps the framed transport. In libraries for other languages checking is used for directly reading data from a buffer of an underlying transport. If data isn't enough we just read data from the underlying transport and never throw an error as in the Go library. But buffer for the zlib transport is encapsulated in the Go zlib library and we can't access to it. So removing that checking is the most simple and convenient method to solve the problem.
2018-09-02 07:01:14 -04:00
D. Can Celasun
88591e32e7
THRIFT-4573 Support binary fields in union counts
This commit also fixes another, related issue: Since union support was
added in b3654df, `Count*` methods (and count checks in `Write`
methods) were only generated if there was at least 1 pointer field.

But pointer fields are not the only nullable types in Go, slices and
maps can also be set the nil, which are now taken into account.

Client: go
2018-05-17 10:26:09 +02:00
Matthew Pound
8a83b041d2
THRIFT-4537: TSimpleServer can exit AcceptLoop() without releasing lock
Client: go

This closes #1523.
2018-03-30 08:48:15 +02:00
D. Can Celasun
a9efd1abd4
THRIFT-4516: Fix "go vet" warnings for Go 1.10
Client: go
2018-03-15 14:16:10 +01:00
John Boiles
5785279e2e THRIFT-4448: Golang: do something with context.Context. Remove Go1.6 compatibility.
Client: go

This closes #1459
2018-03-12 18:35:17 -04:00
Chet Murthy
041c3c777d THRIFT-4421 golang tests rely on gomock, which has changed behaviour, causing tests to fail
Client: go

This closes #1443
2017-12-14 08:49:40 -05:00
D. Can Celasun
4f77ab8e29 THRIFT-4285 Move TX/RX methods from gen. code to library
This change removes a lot of duplication from generated code and allows
the caller to customize how they can read from / write to the
transport.  Backwards compatible adapters make the change compatible
with existing code in use by consuming applications.

Client: Go

This closes #1382
2017-11-03 18:21:40 -07:00
James E. King, III
0ad20bdbfe THRIFT-4351: use travis build stages to optimize build,
avoiding duplicate rebuilds of the same image, and also
allow personal docker hub repositories for private fork
builds to be optimized. Move ubsan build to artful image
because it catches more stuff and fix what was found.

THRIFT-4345: solidify docker build strategy for maximum
coverage: trusty, xenial, artful as stock as they can be

THRIFT-4344: add top level language summary markdown and
update readme with a new image on the layered architecture

THRIFT-3847: remove VERSION macro from config.h which
was causing a conflict on artful builds.

THRIFT-4359: fix haxe map/set decode when key is binary,
as a missing break statement caused it to use an int
during decode

This closes #1389
2017-10-19 11:29:04 -04:00
Yuri Khrustalev
39310dad79 THRIFT-4346: Allow go ZlibTransportFactory to wrap other factories
Client: go

This closes #1375
2017-09-27 12:46:19 -07:00
James E. King, III
65efdff10b build both ubuntu xenial as well as trusty to get more language level
coverage, force C++98 in one of the C++ builds to guarantee compat,
and update docker readme

This closes #1377
2017-09-26 06:48:54 -07:00
Thomas Petazzoni
1744cdcb67 configure.ac, Makefile.am: introduce THRIFT variable to support cross-compilation
The thrift build system currently assumes that the thrift compiler is
always available in $(top_builddir)/compiler/cpp/thrift. However, in a
cross-compilation context, this location contains the thrift compiler
built for the target... which obviously will not run on the build
machine.

In order to support such cross-compilation situation, we introduce the
THRIFT variable as a an argument for the configure script (using
AC_ARG_VAR). If not specified, it defaults to the existing value of
using compiler/cpp/thrift from the build directory, but it can be
overridden when calling ./configure.

Note that $(top_builddir) cannot be used within the configure script,
so we simply use `pwd`, which is the same as the top_builddir.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

This closes #1336
This closes #1350
2017-09-09 07:50:54 -07:00
damnever
1b20b18ec0 Add default message for TApplicationException since some implementations may not set message field
Client: go

This closes #1335
2017-09-05 20:00:38 -07:00
tudyzhb
78b71851fc THRIFT-4307: Make ssl-open timeout effective in golang client
Client: go

This closes #1341
2017-09-05 13:19:39 -07:00
taozle
5c302e02c4 THRIFT-4260 Go context generation issue. Context is parameter in Interface not in implementation
Client: Go
Patch: taozle <zhangliyang26@gmail.com>

This closes #1312
2017-07-25 00:17:30 +02:00
taozle
c0d384a38c THRIFT-4236 Support context in go generated code
Client: Go
Patch: taozle <zhangliyang26@gmail.com>

This closes #1309
2017-07-22 19:42:48 +02:00
D. Can Celasun
0dd823580c THRIFT-4219 remove http GET functions, Thrift only uses POST
Client: Go
Patch: D. Can Celasun <dcelasun@gmail.com>

This closes #1287
2017-07-11 23:10:05 +02:00
Zachary Wasserman
5e9209ff0f THRIFT-4237 Fix effective deadlock introduced by original patch
Client: Go
Patch: Zachary Wasserman <zachwass2000@gmail.com>

This closes #1304
2017-07-08 15:35:42 +02:00
liduo04
49e5103920 THRIFT-4245 Golang TFramedTransport's writeBuffer increases if writes to transport failed
Client: Go
Patch: liduo04 <pirdol@qq.com>

This closes #1303
2017-07-05 21:59:07 +02:00
taozle
5b4c6bfc62 THRIFT-4236: Add context support for go server.
Client: Go
Patch: taozle <zhangliyang26@gmail.com>

This closes #1298
2017-07-01 17:23:56 +02:00
Zachary Wasserman
c0a7050c0a THRIFT-4237 Fix data races in Go TServerSocket
Client: Go
Patch: Zachary Wasserman <zachwass2000@gmail.com>

This closes #1300
2017-07-01 16:05:10 +02:00
Zachary Wasserman
c1794358bb THRIFT-4243 Fix Go TSimpleServer race on wait in Stop() method
Client: Go
Patch: Zachary Wasserman <zachwass2000@gmail.com>

This closes #1302
2017-07-01 16:01:12 +02:00
Zachary Wasserman
b771cbedd6 THRIFT-4240 Fix use of sync.Once in Go TSimpleServer Stop() method
Client: Go
Patch: Zachary Wasserman <zachwass2000@gmail.com>

This closes #1301
2017-07-01 16:00:02 +02:00
Zachary Wasserman
b8ee72de5b THRIFT-4222 Support Unix Domain Sockets in Golang TServerSocket
Client: Go
Patch: Zachary Wasserman <zachwass2000@gmail.com>

This closes #1284
2017-06-07 22:45:54 +02:00
D. Can Celasun
8da0e720bb THRIFT-4215 Golang TTransportFactory Pattern Squelches Errors
Client: Go
Patch: D. Can Celasun <can@dcc.im>

This closes #1285
2017-06-05 14:22:06 +02:00
libinbin
a576896398 THRIFT-4203 thrift server stop gracefully
Client: Go
Patch: libinbin <libinbin@17paipai.cn>

This closes #1271
2017-05-18 23:24:52 +02:00
D. Can Celasun
b67cad46e4 THRIFT-4197 Implement transparent gzip compression for HTTP transport
Client: Go
Patch: D. Can Celasun <can@dcc.im>

This closes #1266
2017-05-13 13:58:02 +02:00
James E. King, III
d5536d1ea0 THRIFT-3730: go server errors are logged twice
Client: go
Patch: zhujun2006 <stone1342006 at gmail dot com>

This closes #940
2017-04-01 11:21:12 -04:00
James E. King, III
847fae9388 THRIFT-3959: document that the go simple server is not simple
Client: go
Patch: JodeZer <jeffery1993@hotmail.com>

This closes #1213
2017-03-22 15:17:30 -04:00
D. Can Celasun
43fb34df28 THRIFT-4011 Sets of Thrift structs generate Go code that can't be serialized to JSON
Client: Go
Patch: D. Can Celasun <dcelasun@gmail.com>

This closes #1156
2017-02-21 22:32:49 +01:00
James E. King, III
06190874c8 THRIFT-4084: Add a SSL/TLS negotiation check to crossfeature to verify SSLv3 is not active and that at least one of TLSv1.0 through 1.2 are accepted.
Client: csharp, d, go, nodejs, perl

This closes #1197
2017-02-20 08:52:11 -05:00
Jens Geyer
5f723cd539 THRIFT-4024 Skip() should throw on unknown data types
Client: C#, NETCore, Haxe, Delphi, Go
Patch: Jens Geyer

This closes #1155
2017-01-11 20:50:38 +01:00
Richard Artoul
c3a3f653b6 THRIFT-3998 Document ability to add custom tags to thrift structs
Client: Go
Patch: Richard Artoul <richardartoul@gmail.com>

This closes #1053
2016-12-10 01:54:54 +01:00
Paul
2df9c20dc7 THRIFT-3855 Replaced complex CompareAndSwapInt64 with syncOnce.
Client: Go
Paul <pavel.finkelshtein@gmail.com>

This closes #1094
2016-09-26 22:05:19 +02:00
zhangxin
54f49f8635 THRIFT-3931 TSimpleServer: If process request encounter UNKNOWN_METHOD, don't close transport.
Client: Go
Patch: zhangxin <xin.zhangwebapi@ele.me>

This closes #1090
2016-09-19 22:37:19 +02:00
ZhiyuYin
47f9b9d7c8 THRIFT-3855 In the go simple server, if Stop() is called multiple times it hangs
Client: Go
Patch: ZhiyuYin <yinzhiyu@xiaomi.com>

This closes #1028
2016-07-23 15:15:18 +02:00
Connor Gorman
f384076760 THRIFT-3851 Golang thrift continually adds the x/thrift content type
Client: Go
Patch: Connor Gorman <cgorman@medallia.com>

This closes #1026
2016-07-15 23:33:23 +02:00
Michael Scott Leuthaeuser
5f06802c73 THRIFT-3805 Golang server susceptible to memory spike from malformed message
Client: Go
Patch: Michael Scott Leuthaeuser <scott.leuthaeuser@gmail.com>
2016-05-28 13:31:33 +02:00
Jens Geyer
eed661313f THRIFT-3809 wrong/unused BINARY type code
Client: Go
Patch: Jens Geyer
2016-04-29 23:29:26 +02:00
Mahendran Kathirvel
7c3eac3ee2 THRIFT-3808 Missing DOUBLE in thrift type enumeration
Client: Go
Patch: Mahendran Kathirvel <astromahi@gmail.com>

This closes #1001
2016-04-29 23:29:24 +02:00
Nobuaki Sukegawa
3aa461b97b Revert "THRIFT-3746 JSON protocol left in incorrect state on read errors"
This reverts commit 51850abb7e.
2016-04-10 18:18:10 +09:00