125 Commits

Author SHA1 Message Date
Jens Geyer
caa4e7866d disabled broken workflow => see THRIFT-5936 2026-03-22 22:49:43 +01:00
Jens Geyer
68b9e87639 cmake workflow improvements
- Pin action versions to full SHA
- Add concurrency group
- Add timeouts to all steps
- Limit ctest parallelism to prevent resource exhaustion

Generated-by: OpenCode big-pickle
2026-03-22 22:21:39 +01:00
Dmytro Shteflyuk
ee261954f0 Fix and expand mergeable label mappings 2026-03-22 14:28:14 +01:00
Jens Geyer
26e23942c7 fix: remove invalid step-level permissions syntax 2026-03-22 14:15:36 +01:00
Jens Geyer
f8622a7b35 msvc build improvements
- add concurrency group to cancel redundant runs
- pin GitHub action versions to full SHA
- add error handling and timeouts to Docker operations
- Classify pull failures: 404=rebuild, auth/registry errors=fail loud
- Add timeouts: pull(10m), build(60m), push(20m), test(120m)
- restrict packages:write permission to non-PR runs
- Remove packages:write from workflow-level permissions
- Add step-level permissions to GHCR login step
- Add condition to skip login for pull requests (including forks)
- Fork PRs now have minimal permissions (contents:read only)

Generated-by: OpenCode big-pickle
2026-03-22 14:11:23 +01:00
CJCombrink
dfeab8d57f THRIFT-5924: UUID support for NodeTS
Client: ts,js
Patch: CJCombrink
This closes #3331
2026-03-17 21:53:01 +01:00
Carel Combrink
a715bdffaa THRIFT-5923: UUID python
Client: py
Patch: CJCombrink

This closes #3330
2026-03-11 22:39:49 +01:00
Dmytro Shteflyuk
df22bb1b1b Added Rubocop harness to enforce Ruby code style 2026-03-11 08:47:12 +01:00
Dmytro Shteflyuk
3346c01d01 Run static code analysis on GitHub 2026-03-05 22:37:52 +01:00
dependabot[bot]
2ee7d1160a Bump actions/download-artifact from 6 to 8
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 6 to 8.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v6...v8)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-05 21:50:30 +01:00
dependabot[bot]
99e0f6fc37 Bump actions/upload-artifact from 5 to 7
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v5...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-05 21:49:59 +01:00
Shaoyu Zhang
3adaf0d592 Refresh msvc docker build 2026-02-25 22:47:17 +01:00
Jens Geyer
e4666f2934 THRIFT-5917: Rust currently broken and no maintainers around 2026-02-20 01:08:25 +01:00
Yuxuan 'fishy' Wang
fd9756c19d Update supported go versions to 1.25+1.26
Follow the release of go 1.26.0 today, go 1.24 is no longer supported by
upstream.
2026-02-11 07:18:42 -08:00
Copilot
1e09a046e0 Add moveable_types=forward_setter option for perfect forwarding setters
Adds `forward_setter` value to `moveable_types` option, generating perfect forwarding setters for complex types while preserving traditional setters for primitives. Also fixes missing `operator<` implementation that caused link errors when structs are used as map keys.

**Forward Setter Generation** (`compiler/cpp/src/thrift/generate/t_cpp_generator.cc`):
- Parse `moveable_types=forward_setter` option
- Complex types (strings, containers, structs) → template setters with `std::forward<T_>`
- Primitive types → traditional const-ref setters
- Template implementations in `.tcc` file (auto-included in header)
- Legacy `moveable_types` behavior unchanged

**Compiler Unit Tests** (`compiler/cpp/tests/cpp/`):
- New `test_forward_setter.thrift` fixture
- Dedicated `t_cpp_generator_forward_setter_tests.cc` (91 assertions, 9 test cases)
- Verify `.tcc` generation and template implementations

**Integration Tests** (`test/cpp/src/`):
- `ForwardSetterTest.cpp` - validates lvalue/rvalue/temporary/literal setters with move semantics
- `PrivateOptionalTest.cpp` - SFINAE + static_assert verify optional fields are private
- `EnumClassTest.cpp` - type_traits + static_assert verify true enum class semantics

**CMakeLists.txt** (`test/cpp/`):
- Separate gen-cpp-{forward,private,enumclass} directories

**Makefile.am** (`test/cpp/`):
- Library targets for each option variant
- Proper `BUILT_SOURCES` dependencies
- Include path ordering: option-specific directory before standard `gen-cpp`

```cpp
// Generated with --gen cpp:moveable_types=forward_setter

struct TestStruct {
  int32_t primitive_field;
  std::string complex_field;

  void __set_primitive_field(const int32_t val);  // Traditional

  template <typename T_>
  void __set_complex_field(T_&& val);  // Perfect forwarding
};

// In .tcc file:
template <typename T_>
void TestStruct::__set_complex_field(T_&& val) {
  this->complex_field = ::std::forward<T_>(val);
  __isset.complex_field = true;
}
```

- [ ] Did you create an [Apache Jira](https://issues.apache.org/jira/projects/THRIFT/issues/) ticket?  ([Request account here](https://selfserve.apache.org/jira-account.html), not required for trivial changes)
- [ ] If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"?
- [x] Did you squash your changes to a single commit?  (not required, but preferred)
- [x] Did you do your best to avoid breaking changes?  If one was needed, did you label the Jira ticket with "Breaking-Change"?

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: zsy056 <1074382+zsy056@users.noreply.github.com>
2026-02-08 22:09:37 +01:00
Dmytro Shteflyuk
84554fa31a Enable cross tests for Ruby library 2026-02-07 01:09:56 +01:00
dependabot[bot]
4b69d1f472 Bump actions/download-artifact from 6 to 7
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-07 00:08:58 +01:00
dependabot[bot]
e01b1b0e5b Bump actions/upload-artifact from 4 to 6
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-07 00:08:51 +01:00
dependabot[bot]
d4cbd78749 Bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-07 00:08:43 +01:00
Gregg Donovan
c99d09a231 THRIFT-5564: Add Python to GitHub Actions cross-test matrix
Add Python (py) to the cross-language test matrix. Python was never
included in the GitHub Actions cross-test despite being part of the
original migration plan.

Changes:
- Add precross step to lib-python job (for Python 3.12)
- Upload Python precross artifacts (lib, gen-py, test scripts)
- Download Python artifacts in cross-test job
- Add 'py' to server_lang and client_lang matrix
- Install Python test dependencies in cross-test job
- Add 582 known failures based on actual CI results
- Remove 279 stale py3 entries (never validated in GitHub Actions)

Known failure categories added:
- cpp-py: 54 SSL failures
- go-py: 18 SSL failures
- java-py: 72 SSL failures
- py-cpp: 162 protocol incompatibilities
- py-go: 48 protocol incompatibilities
- py-java: 171 protocol incompatibilities
- py-kotlin: 5 SSL failures
- py-py: 72 SSL failures
- py-rs: 40 protocol incompatibilities
2026-02-04 08:07:01 -08:00
Gregg Donovan
62ec929629 Fix Python 3.12 build issues in thrift Python (#3276)
- Add pyproject.toml with setuptools build requirement for PEP 517 compliance
- Replace distutils imports with setuptools equivalents
- Use setuptools error names directly (CompileError, ExecError, PlatformError)
- Fix macOS header collision with ntohll/htonll macros in endian.h
- Add a matrix of MacOS versions (macos-15-intel, macos-14, macos-15,
  macos-26)
- Add a matrix of non-EOL Python versions for testing
- Remove MSVC2015 from the test matrix (very old).
- Support MSVC2022, the latest in AppVeyor.
- Upgrade tornado, twisted, and zope.interface versions to the first
  that support Python 3.12.
- Try to make the test_socket, RunClientServer, and TestServer tests less flaky.

This fixes the ModuleNotFoundError: No module named 'distutils' error
when building thrift with Python 3.12+.
2026-01-29 13:51:37 -08:00
Dmytro Shteflyuk
75a287728a Added a special no-extension build to test the code paths without native extensions 2026-01-28 01:52:06 +01:00
Dmytro Shteflyuk
6e5e18180b Added Ruby library tests to the GitHub workflow 2026-01-22 01:41:32 +01:00
copilot-swe-agent[bot]
c3ced62289 ## cpp: add private_optional support (and wire up tests/CI)
Add a new `cpp:private_optional` generator option for C++ that emits optional fields as private members and provides const getters, enabling stricter encapsulation while preserving access for generated helpers.

To keep the feature stable and exercised in automation, add fixture-based compiler tests and the minimal build/CI wiring required for those tests to build and run in the workflow (including MSVC).

 ### Example generated code (behavior change only, from `TestStruct`)

 #### Default (no `cpp:private_optional`): optional fields stay public
```cpp
public:
  int32_t required_field;
  int32_t optional_field;
  std::string optional_string;
```

With cpp:private_optional: optional fields become private + const getters

```cpp
public:
  int32_t required_field;

  const int32_t& __get_optional_field() const { return optional_field; }
  const std::string& __get_optional_string() const { return optional_string; }

private:
  int32_t optional_field;
  std::string optional_string;

  friend void swap(TestStruct &a, TestStruct &b) noexcept;
  friend std::ostream& operator<<(std::ostream& out, const TestStruct& obj);

```
2026-01-22 01:40:07 +01:00
HTHou
d9b4d95a1f try to fix kotlin cross tests 2026-01-07 22:31:52 +01:00
HTHou
b5919dd8f7 Add async nonblocking ssl support in java client 2026-01-07 22:31:52 +01:00
dependabot[bot]
22ffdc79d0 Bump actions/download-artifact from 6 to 7
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-07 22:27:49 +01:00
dependabot[bot]
e0d99c91a8 Bump actions/checkout from 4 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-07 22:24:29 +01:00
dependabot[bot]
b8f24076cd Bump actions/upload-artifact from 4 to 6
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-07 22:24:06 +01:00
Dmytro Shteflyuk
2097ed7898 Added auto-labeling configuration to .github/mergeable.yml 2026-01-07 22:15:47 +01:00
Shaoyu Zhang
230d0a96a2 Refresh windows docker setup 2025-12-10 23:46:25 +01:00
dependabot[bot]
724b038b9f Bump actions/setup-python from 3 to 6
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v3...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 22:04:10 +01:00
dependabot[bot]
d90f2bb1e8 Bump actions/checkout from 3 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 22:03:38 +01:00
Carel Combrink
5abe53feaf Thrift-5900: Fix Tests for Python 3.14
Client: py
Patch: Carel Combrink

This closes #3239

- Disclaimer: Claude came up with this
- Python 3.14 made files explicitly unpicklable for reasons
- The out can't be pickled in SummaryReporter
- stop in TestDispatcher is an instance method that should not be captured

Delay the imports to where they are needed

- Claude believes this is due to the way that the server is called vs the client is called and the server does not have enough time to set up completely

Attempt to fix issue with python 3.14

- Looks like python is getting more strict about scoping
- Decided to go with a local option instead of global or module variable
2025-11-20 23:12:02 +01:00
Carel Combrink
f2534ad343 Pin python building also to 3.13
- No need for the check in the step any more since not supporting python 2
2025-11-20 00:01:57 +01:00
Carel Combrink
7770d27499 Put back the actual python tests 2025-11-20 00:01:57 +01:00
James E. King III
90ba80427d THRIFT-5546: automate pypi publishing [ci skip]
When a pre-release is created on GitHub for the repo it will publish
to the TestPyPI service, and if that pre-release is promoted to a
release, it will publish to the PyPI (real) service.
2025-11-19 17:41:42 +01:00
dependabot[bot]
17c8b838e1 Bump actions/upload-artifact from 4 to 5
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-19 17:20:13 +01:00
dependabot[bot]
0e4abab35a Bump actions/download-artifact from 5 to 6
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-19 17:19:57 +01:00
Jens Geyer
2f214c28d8 THRIFT-5902 Add net10 support
Client: netstd
Patch: Jens Geyer
2025-11-14 21:17:28 +01:00
Carel
ed55a18c30 Remove kotlin cross tests (#3236)
- They have been failing for months now without any actions
- The red builds have already desensitized the project to checking for failures
2025-11-14 16:54:52 +08:00
Carel
e720e6fecb THRIFT-5899: Python tests fail for the Appveyor MSVC builds (#3229)
* Temporarily switch off shared build

- See THRIFT-5898

* Skip type_hints tests for python lower than 3.7

- PR#2929 called out that the changes breaks Python 3.5 since types came in in 3.6
- Python 3.6 errors out with 'from __future__ import annotations' since it looks like it was only added in 3.7

* More appveyer issues on Windows due to old python

* Remove enum tests for old python versions

- Getting `raise TApplicationException(TApplicationException.MISSING_RESULT, "testEnum failed: unknown result"` error
- PR#2825 state it is a breaking change, not sure why and for what version of Python

* Disable SSL tests for old Python

- Appveyor error: ` AttributeError: module 'ssl' has no attribute 'PROTOCOL_TLS_CLIENT'`

* Can't get the test to skip so revert the change that broke it

- See PR#3050

* THRIFT-5900: Pin the cross test stage to python 3.13

- See https://issues.apache.org/jira/browse/THRIFT-5900
2025-11-07 08:48:27 +00:00
dependabot[bot]
1a5b7fc85b Bump actions/setup-python from 5 to 6
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-01 07:34:18 -07:00
dependabot[bot]
755f7d9faf Bump actions/setup-go from 5 to 6
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5 to 6.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-01 07:33:25 -07:00
dependabot[bot]
eaec898df1 Bump actions/setup-java from 4 to 5 (#3206)
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 4 to 5.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-05 15:53:08 -04:00
dependabot[bot]
55783f90db Bump actions/download-artifact from 4 to 5 (#3207)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-05 15:52:26 -04:00
dependabot[bot]
e6f532421c Bump actions/checkout from 4 to 5 (#3208)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-05 15:50:09 -04:00
Carel Combrink
fbe685aae1 Add cpp cross tests to the build workflow
- Remove usage of v0.16 thrift files for C++ since UUID support was added
- Need to install the locals for some of the unit tests
- Fix UUID support for THeaderProtocol
    - Without this the protocol went into an infinite loop due to virtual function calls that recursed to itself
    - Best case was a crash, worst case was process got stuck
- Fix UUID support for TProtocolTap
- Sorted the known failures
- Mark cpp and java ssl tests as known failures
2025-08-28 00:36:39 +02:00
Yuxuan 'fishy' Wang
3b86252e05 Update supported go versions to 1.24+1.25
Drop support for go 1.23 as it's no longer supported by upstream.
2025-08-13 13:32:53 -07:00
Yuxuan 'fishy' Wang
716835fa76 Fix cross-test
1. Comment in the middle of multi-line shell command joined by \ does
   not work, change to multiple individual commands instead.
2. Fix a py 2vs3 compat issue missed in 24df0a5 used in cross runner.
2025-05-29 08:42:25 -07:00