Commit Graph

6331 Commits

Author SHA1 Message Date
Yuxuan 'fishy' Wang
67bf304de1 THRIFT-5459: Fix breaking issue when adding a new exception
Client: go

Currently in the compiler generated go code, adding a new exception to
an existing endpoint can cause unexpected behaviors when the client
isn't updated. Fix the issue.

Will be cherry-picked into 0.15.0 after merged.
2021-09-03 22:25:33 -07:00
Yuxuan 'fishy' Wang
5f829f143c go: Fix things staticcheck complains about
Client: go

Staticcheck is the recommended replacement of the frozen and deprecated
official golint linter [1].

Fix the things it complained about (or add lint:ignore directive) in:

- lib/go/thrift
- lib/go/test/tests
- tutorial/go/src
- test/go/src
- compiler generated code

The majority of the fixes are in the following categories:

- Use of deprecated function (mainly the TConfiguration related ones)
- Redundant break in switch cases
- Unused and unexported variables/fields/functions

Also in the same spirit as fb539ae, remove the error return from
NewTSSLSocket as it can never be non-nil.

This change will be cherry-picked into 0.15.0 branch after merged.

[1]: https://groups.google.com/g/golang-nuts/c/rCP70Aq_tBc
2021-08-27 09:28:37 -07:00
Yuxuan 'fishy' Wang
57b9aa0dd5 THRIFT-5447: Update supported Go versions
Client: go

Update go versions used in travis to 1.16.7 and 1.17, update
LANGUAGES.md, and update go's README to clarify on support policy.

This change will be cherry-picked into 0.15.0 branch after merged.
2021-08-19 14:09:57 -07:00
Yuxuan 'fishy' Wang
efff4a2691 THRIFT-5453: Defer DNS from NewTSocketConf to TSocket.Open
Client: go

We used to do DNS lookups in NewTSocketConf, without any timeout checks.
Stop doing that and do DNS lookups in TSocket.Open instead, which
already checks for ConnectTimeout set in TConfiguration.

Also remove the error return from NewTSocketConf.
2021-08-11 11:11:54 -07:00
Jens Geyer
9a815fa0a2 Version 0.15.0 2021-08-03 22:58:12 +02:00
Yuxuan 'fishy' Wang
2c78047fcb THRIFT-4797: Go import improvements
This change improves two problems in go code imports:

1. Always rename import the thrift package into "thrift", as we allow
   the user to use a different library to replace the official one from
   the compiler command line, this makes sure that in compiler generated
   go code we can always blindly use "thrift.*".

2. We added auto rename import dedup in d9019fc5a4, but in that change
   for system packages we always use the full import path as the dedup
   identifier, so system package "database/sql/driver" would not be
   detected as a conflict against a thrift go namespace of
   "foo.bar.driver". Use the part after the last "/" in system packages
   as the dedup identifier instead.
2021-08-01 10:07:45 -07:00
Jens Geyer
c8ae621a09 THRIFT-5445 "cancellationToken" cannot be used as argument name
Client: netstd
Patch: Jens Geyer
2021-08-01 13:04:33 +02:00
Jens Geyer
273607d1f4 THRIFT-5444 Netstd generator produces uncompileable code for enums ending with "_result" or "_args"
Client: netstd
Patch: Jens Geyer

This closes #2424
2021-08-01 12:01:27 +02:00
Yuxuan 'fishy' Wang
f695535122 THRIFT-5389: Fix const generation for optional fields
Client: go

The current compiler will generate uncompilable code when we use
optional enum and/or typedef'd types in a thrift constant.

This fixes the issue, also adds a test for that.
2021-07-30 08:47:45 -07:00
Yuxuan 'fishy' Wang
68c0272a0a Update README for go library
Because we briefly had go.mod file under lib/go/thrift in e27e82c46b
(it was later removed in d9fcdd3dba), using

    go get github.com/apache/thrift/lib/go/thrift/...

(as suggested by the current README) will get that particular version
instead of the latest released version. So update README to use

    go get github.com/apache/thrift

instead.

Also instead of saying we support Go 1.7+, say we support the officially
supported Go releases, as that's our new support policy.
2021-07-26 10:15:42 -07:00
Jens Geyer
47bf0e46e7 THRIFT-5442 Separate client service calls into send/recv methods and make them public
Client: netstd
Patch: Jens Geyer
2021-07-24 10:18:44 +02:00
hkb
fb1d50dfc5 THRIFT-5439 Lua Generator does not support const i64
Client: lua
Patch: Kaibin Huang

This closes #2413
2021-07-17 14:41:52 +02:00
lm2048
8bd82305cf THRIFT-5421 c_glib:Fix the problem of incorrect setting of errno in some files
Client: c_glib
Patch: lm2048
2021-07-09 22:12:42 +02:00
AlephAlpha
c06ab4ccc9 Small bug in Rust generated code for writing container types 2021-07-09 22:05:44 +02:00
William Van Hevelingen
b98e06df19 THRIFT-5440: Allow php8 in composer.json 2021-07-09 22:00:46 +02:00
geehanlin
d8c4345ecf fix isOpen return None, to be consistent with other transport
Client: python
2021-07-09 21:56:46 +02:00
Lewin Bormann
44e8a431a3 Rust: Upgrade dependency integer-encoding to 3.0 2021-07-06 23:52:19 +02:00
Jens Geyer
4434ee92d5 THRIFT-5438 Inconsistent handling of exceptions during message read vs. message write phase
Client: Delphi
Patch: Jens Geyer
2021-07-02 00:35:47 +02:00
Jens Geyer
3b686533f7 THRIFT-5437 Make TProtocolImpl CTOR virtual
Client: Delphi
Patch: Jens Geyer
2021-07-01 23:32:12 +02:00
Jens Geyer
7391a31032 uncaught_exception -> uncaught_exceptions
Client: cpp
Author: Rune Olesen

This closes #2287
2021-06-30 22:22:37 +02:00
Benjamin Naecker
582293bb5e Adds support for building C++ codegen on Solaris
Client: cpp
Author: Benjamin Naecker

This closes #2380

Solaris-derived systems split some functionality that is usually found
in `sys/ioctl.h` into `sys/filio.h`. In this case, the `FIONREAD`
constant is in the latter file.
2021-06-30 22:05:38 +02:00
Thomas
3c3a389c8a THRIFT-5425 Throw an exception when reading TSimpleJson in Java
Client: java
Author: Thomas Bruggink

This closes #2400

Throw an exception when reading TSimpleJson and update the comment to explain why.
2021-06-30 22:01:20 +02:00
belugabehr
5cada6a320
THRIFT-5433: Add Counter To Thread Name of TThreadPoolServer
Client: Java
Patch: David Mollitor
2021-06-30 09:08:34 -04:00
Jens Geyer
598ee9864b THRIFT-5436 Timeout.Infinite is not a good default
Client: netstd
Patch: Jens Geyer
2021-06-25 17:33:12 +02:00
Henry Catalini Smith
80e0d53d90 npm update jsdoc
Client: js
Patch: Henry Catalini Smith

This closes  #2402

This is a fix for these security warnings we're getting via this package.
2021-06-23 21:07:42 +02:00
Ruslan
ab72ebe564 Android restricts use of AI_V4MAPPED flag.
Client: cpp
Patch: Ruslan <thgall@mail.ru>

This closes #2406
2021-06-23 20:51:20 +02:00
Divye Kapoor
58fa7b4610 THRIFT-5430: Fix deadlock triggered by FieldMetaData.class.
Details of the deadlock are in the ticket.
This PR addresses the deadlock by limiting the scope of the locks
acquired in FieldMetaData.java to only protect calls to the structMap
hashtable. No locks should be held when the call to sClass.newInstance()
is in progress.

Tested: Regular CI builds should pass.
2021-06-23 20:30:55 +02:00
Jens Geyer
fcfa34108d Merge branch '0.14.2' into upstream 2021-06-17 22:59:32 +02:00
l00508282
3ccef5cecd THRIFT-5432 TSaslTransport throw TTransportException of MaxMessageSize reached
Client: java
Patch: GuangMing Lu
2021-06-16 21:29:01 +02:00
Jens Geyer
46693f7f5e THRIFT-5431 Response should include 'content-type' header
Client: netstd
Patch: Jens Geyer

This closes #2409
2021-06-16 09:00:13 +02:00
Jens Geyer
c19d05eeef Version 0.14.2 2021-06-15 23:48:17 +02:00
Yuxuan 'fishy' Wang
57e24caa86 THRIFT-5369: Use MaxMessageSize to check container sizes
Client: go
2021-06-12 18:52:58 +02:00
Jens Geyer
63e86ce23a Version 0.14.2 2021-06-11 00:55:22 +02:00
aaronstgeorge-wf
d604602064 THRIFT-5383 TJSONProtocol Java readString throws on bounds check
Client: java
Patch: Aaron St. George

This closes #2366
2021-06-11 00:38:44 +02:00
Mario Emmenlauer
43faa2d22b
Merge pull request #2401 from aaronmjones/THRIFT-3840
THRIFT-3840: C++ TJSONProtocol still using locale dependent formatting
2021-06-09 16:38:56 +02:00
Christopher Friedt
93a316c51d THRIFT-5429 build: autotools: add foreign to AM_INIT_AUTOMAKE
Patch: Christopher Friedt

This closes #2405

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-06-07 23:20:03 +02:00
ubuntu
ad76a18db7 Add better unit tests and imbue C locale in floating point to_string
ToStringTest.cpp is a better place than JSONProtoTest.cpp for to_string
tests. Move global locale-related unit tests there.
Also imbue the C locale in the floating point to_string functions to avoid
decimal number strings formatted with comma instead of decimal point.
In Dockerfiles, install de_DE locale because it uses decimal comma.
2021-06-07 08:21:05 +05:30
Mario Emmenlauer
29fb3464c9
Merge pull request #2382 from BioDataAnalysis/bda_add_openssl_membuffer_loading
Robustness improvements when loading OpenSSL certificates
2021-06-04 11:50:38 +02:00
Jens Geyer
f726ae31b9 THRIFT-5428 Prevent costly reallocations to improve performance
Client: Delphi
Patch: Jens Geyer
2021-06-04 11:46:18 +02:00
Marco Schroeter
016dbac94d Robustness improvements when loading OpenSSL certificates 2021-06-04 10:01:54 +02:00
Mario Emmenlauer
ea456f6654
Merge pull request #2383 from BioDataAnalysis/bda_minor_cmake_cleanup
Minor cleanup of two CMake files, and removed (unused) boost deps
2021-06-04 09:55:01 +02:00
David Mollitor
be20ad7e08 THRIFT-5411: Catch SocketTimeoutException in TIOStreamTransport read 2021-06-03 22:16:32 -07:00
ubuntu
323f0325ed Add unit test for system locale with thousands separator comma
Install en_US.UTF-8 locale in Dockerfile
2021-05-31 19:08:05 +05:30
mingwugmail
4abc5cfb4b fix D build, with D lang openssl 2.0.3
Client: d
Patch: mingwugmail <mingwu@gmail.com>

This closes #2397
2021-05-27 23:12:53 +02:00
phxnsharp
9a4802ab41 THRIFT-5419 Incorrect usage of thread pool in TThreadPoolAsyncServer may lead to poor performance
Client: netstd
Patch: Nathan P Sharp, Jens Geyer

This closes #2395
2021-05-26 22:34:18 +02:00
Jens Geyer
63d114de97 THRIFT-5422 add threadpool server to netstd test suite impl
Client: netstd
Patch: Jens Geyer

This closes #2398
2021-05-26 09:25:39 +02:00
Zicklag
70992f1e74 Add Link to Tutorial in Rust Lib Documentation
Client: rs
Patch: Zicklag

This closes  #2388
2021-05-20 22:50:22 +02:00
Axel Jäger
346c72c0d0 THRIFT-3508 Map optional fields from thrift idl to optional fields in TypeScript.
Client: node,js
Patch: Axel Jäger

This closes #2386
2021-05-20 22:41:31 +02:00
Jeffrey Han
c54cfcb8d2 THRIFT-5417 Fix Lua compiler omitting default values in Lua service functions
Client: Lua
Patch: Jeffrey Han

This closes #2394
2021-05-20 22:38:23 +02:00
lm2048
8101302c56 THRIFT-5399: Fix socket leak in abnormal situation 2021-05-17 22:27:25 +02:00