Repository navigation
feat!: Migrate ArrowFlight to grpc-swift-2 (GRPCCore) and swift-protobuf 1.39 - #202
Open
sidpug-arcana wants to merge 5 commits into
Open
sidpug-arcana wants to merge 5 commits into
sidpug-arcana wants to merge 5 commits into
Conversation
raulcd
reviewed
Oct 28, 2026
raulcd
left a comment
Member
There was a problem hiding this comment.
this is tagged as a MINOR issue, it doesn't feel like a MINOR to me.
Contributor
Author
|
My bad |
Member
|
Could you open a GitHub issue for this change and reference it from the PR description ( Could you also update the PR title to follow Conventional Commits? |
Bumps [github.com/google/flatbuffers](https://github.com/google/flatbuffers) from 25.2.10 to 25.12.19. - [Release notes](https://github.com/google/flatbuffers/releases) - [Commits](google/flatbuffers@v25.2.10...v25.12.19) --- updated-dependencies: - dependency-name: github.com/google/flatbuffers dependency-version: 25.12.19 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
sidpug-arcana
force-pushed
the
feat/grpc-swift-2
branch
from
November 2, 2026 05:44
9916b6a to
7bb6852
Compare
Regenerate the Swift FlatBuffers sources with flatc 25.12.19 and adapt the hand-written code to the new generated/runtime API: - Vector accessors changed from `xxxCount`/`xxx(at:)` to typed Vector collections (`xxx.count`, `xxx[i]`) - `FlatBufferObject` protocol split into `FlatBufferTable` / `FlatBufferStruct` - `ByteBuffer(data:allowReadingUnalignedBuffers:)` was removed from the runtime; drop the now-obsolete `useUnalignedBuffers` plumbing from the IPC readers and ArrowFlight - gen-flatbuffers.sh: add ARROW_FORMAT_DIR override and fix paths for the current repository layout Co-authored-by: Siddharth Pugalia <sidpug@gmail.com>
Adapt the tests merged from main (TimeBitWidthTests, IPCTests) to the new FlatbufferVector collection accessors. Co-authored-by: Siddharth Pugalia <sidpug@gmail.com>
Swap grpc-swift 1.x for grpc-swift-2 (GRPCCore) and bump swift-protobuf to the 1.35+ series. Co-authored-by: Siddharth Pugalia <sidpug@gmail.com>
Replace grpc-swift 1.x with the grpc-swift 2.x stack:
- Add grpc-swift-nio-transport (GRPCNIOTransportHTTP2) and
grpc-swift-protobuf (GRPCProtobuf) dependencies; grpc-swift-2
provides GRPCCore.
- Regenerate Flight.pb.swift with protoc-gen-swift 1.39 (adds the
PollFlightInfo/PollInfo definitions) and Flight.grpc.swift with
protoc-gen-grpc-swift-2, both from the same Flight.proto revision
as the previous generated code.
- Rewrite FlightServer/FlightClient and the record batch
stream reader/writer on top of the GRPCCore API:
- FlightClient is now generic over the client transport and
accepts any GRPCClient/transport; response callbacks are
@sendable @escaping.
- InternalFlightServer implements the generated
SimpleServiceProtocol and adds a PollFlightInfo stub.
- makeFlightServer returns any RegistrableRPCService for use
with GRPCServer(services:).
- ArrowFlight APIs are @available(macOS 15.0, iOS 18.0, watchOS 11.0,
tvOS 18.0, visionOS 2.0, *) as required by GRPCCore.
- Bump swift-tools-version to 6.1 (required by the grpc-swift-2
packages); the package stays in the Swift 5 language mode for now.
- Update CI matrices (test.yaml, rc.yaml) and the default Docker
image to Swift 6.1; Swift 5.10/6.0 can no longer resolve the
package manifest.
- Add gen-flight.sh to regenerate the Flight protobuf/gRPC sources.
Co-authored-by: Siddharth Pugalia <sidpug@gmail.com>
sidpug-arcana
force-pushed
the
feat/grpc-swift-2
branch
from
November 2, 2026 10:21
7bb6852 to
515c486
Compare
This was referenced Nov 4, 2026
Contributor
Author
|
Thanks @kou — done on both counts.
Note this PR is currently stacked on #201 for the flatbuffers 25.12.19 regeneration, which is why those commits appear here; I can rebase once #201 lands. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's Changed
Migrates ArrowFlight from grpc-swift 1.x to the new grpc-swift 2.x stack (GRPCCore + NIO HTTP/2 transport + protobuf codecs), and bumps swift-protobuf to 1.39.0.
Stacked on #201 (flatbuffers 25.12.19 regeneration) — this branch contains those commits as well; only the last two commits are specific to this change. Once #201 lands, this PR can be rebased to just the grpc-swift-2 migration.
Details
grpc-swift1.x withgrpc-swift-2(2.4.4),grpc-swift-nio-transport(GRPCNIOTransportHTTP2) andgrpc-swift-protobuf(GRPCProtobuf); swift-protobuf bumped to 1.39.0.Flight.pb.swiftregenerated with protoc-gen-swift 1.39 (now includesPollFlightInfo/PollInfo) andFlight.grpc.swiftregenerated with protoc-gen-grpc-swift-2, from the sameFlight.protorevision as before.FlightSql.pb.swiftis regenerated with the same plugin for the same revision; the previously committed copy was generated by an older plugin and its_NameMapuses are deprecated in swift-protobuf 1.39, which is an error under-warnings-as-errors. Newgen-flight.shdocuments the regeneration.FlightClientis now generic over the client transport (FlightClient<Transport>), constructible from a transport or an existingGRPCClient; streaming callbacks are@Sendable @escaping. State that the callbacks update (e.g. thedoPut"callback called" flag) usesManagedAtomicso it can be mutated from a@Sendableclosure.InternalFlightServerimplements the generatedSimpleServiceProtocol;PollFlightInfois stubbed as not-implemented.makeFlightServerreturnsany RegistrableRPCServicefor use withGRPCServer(transport:services:).@available-gated accordingly. TheArrowcore target is unaffected.swift-tools-versionbumped to 6.1 (all three grpc-swift-2 packages require it); the package remains in the Swift 5 language mode. CI matrices (test.yaml,rc.yaml) and the default CI Docker image updated to Swift 6.1 only — Swift 5.10/6.0 toolchains can no longer resolve the manifest.Breaking changes
Arrowcore is unchanged).Testing
Full suite passes locally (macOS, Swift 6.4), including a build with the CI's
-warnings-as-errorsflags enabled:The Flight integration test exercises a real GRPC server/client round trip over HTTP/2 (listActions, doPut, listFlights, doAction, getSchema, doGet, doExchange). The IPC file tests use fixtures generated by
data-generator/swift-datagen, as in CI.Closes #211.