Skip to content

Migrate QuicOperatorServer onto shared ba-quic-lib - #11

Open
danprudky wants to merge 4 commits into
BAF-1744/GUI-RTSP-server-streaming-controlfrom
BAF-1801/Migrate-onto-QUIC-lib
Open

Migrate QuicOperatorServer onto shared ba-quic-lib#11
danprudky wants to merge 4 commits into
BAF-1744/GUI-RTSP-server-streaming-controlfrom
BAF-1801/Migrate-onto-QUIC-lib

Conversation

@danprudky

Copy link
Copy Markdown
  • Replace the hand-rolled msquic registration/listener/connection/stream callback machinery in QuicOperatorServer with the shared, transport-only bringauto::quic::QuicServer (ba-quic-lib), mirroring teleop-module's own migration; public API (initialize/start/stop/sendStatus/hasOperator) is unchanged so external_server_api.cpp needs no changes
  • Single-operator enforcement (maxConnections = 1) now happens at the transport layer, so the class no longer needs its own compare-and-swap "already have an operator" logic
  • Add cmake/FindBAQuicLib.cmake and wire FIND_PACKAGE(BAQuicLib) into CMakeLists.txt; drop the direct msquic BA_PACKAGE_LIBRARY pin from Dependencies.cmake since msquic is now pulled in transitively via ba-quic-lib's PUBLIC link

@danprudky
danprudky requested a review from vbartak July 27, 2026 12:00
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: edd62885-8dc7-4714-8e4c-9ef6317f395b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch BAF-1801/Migrate-onto-QUIC-lib

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@vbartak vbartak left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Scoped to this commit, the migration is a clear win: ~420 lines of hand-rolled msquic registration/listener/stream callback machinery replaced by the shared transport, public API genuinely unchanged, and the reasoning in FindBAQuicLib.cmake about BRINGAUTO_TESTS/BRINGAUTO_INSTALL option leakage through add_subdirectory is correct and non-obvious — good that it's written down.

Findings inline. Nothing here is a blocker on its own; #1 and #2 are the ones I'd want resolved before this ships in a package.

Also worth noting (no clean anchor)

  • stop() lost its idempotence guard. The old version opened with if (!running_.exchange(false)) { return; }; the new one calls quicServer_->stop() and channel_.shutdown() unconditionally, and ~QuicOperatorServer() calls stop(). An explicit stop() followed by destruction now runs both twice. Probably harmless given ba-quic-lib's own guards, but it was deliberate before and is gone now without comment.
  • The header comment at line 33 still says the QUIC path is "used alongside (not instead of) the existing Fleet HTTP API path". In the base branch forward_status/wait_for_command replace the HTTP path when quic_port is set. Pre-existing, but this PR rewrites the surrounding block, so it's a cheap fix while you're here.

Comment thread cmake/FindBAQuicLib.cmake
Comment thread cmake/Dependencies.cmake
Comment thread source/transparent_operator_stream/QuicOperatorServer.cpp Outdated
Comment thread source/transparent_operator_stream/QuicOperatorServer.cpp
Comment thread cmake/FindBAQuicLib.cmake Outdated
Comment thread CMakeLists.txt
danprudky pushed a commit that referenced this pull request Jul 28, 2026
…c coupling

- #3664220610 msquic include: drop <msquic.h> for one enum value, use literal
  with comment instead of relying on ba-quic-lib's transitive PUBLIC link
- #3664220614 maxConnections race: confirmed against quic-lib's QuicServer
  source that onConnected() is never invoked for a connection rejected by
  maxConnections; tightened the comment to state this explicitly
- #3664220624 regex on CMAKE_BINARY_DIR: replace MATCHES with string(FIND ...)
  to avoid regex metacharacter/anchoring issues
- #3664220631 CMAKE_MODULE_PATH: move append to top-level setup, next to the
  other global includes, instead of inside a conditional block
- #3664220605 msquic packaging: document how BA_PACKAGE_DEPS_IMPORTED still
  transitively ships msquic's .so through ba-quic-lib

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
martinburian-ba and others added 4 commits July 29, 2026 13:14
…b transport

- Replace the hand-rolled msquic registration/listener/connection/stream callback machinery in QuicOperatorServer with the shared, transport-only bringauto::quic::QuicServer (ba-quic-lib), mirroring teleop-module's own migration; public API (initialize/start/stop/sendStatus/hasOperator) is unchanged so external_server_api.cpp needs no changes
- Single-operator enforcement (maxConnections = 1) now happens at the transport layer, so the class no longer needs its own compare-and-swap "already have an operator" logic
- Add cmake/FindBAQuicLib.cmake and wire FIND_PACKAGE(BAQuicLib) into CMakeLists.txt; drop the direct msquic BA_PACKAGE_LIBRARY pin from Dependencies.cmake since msquic is now pulled in transitively via ba-quic-lib's PUBLIC link
…c coupling

- #3664220610 msquic include: drop <msquic.h> for one enum value, use literal
  with comment instead of relying on ba-quic-lib's transitive PUBLIC link
- #3664220614 maxConnections race: confirmed against quic-lib's QuicServer
  source that onConnected() is never invoked for a connection rejected by
  maxConnections; tightened the comment to state this explicitly
- #3664220624 regex on CMAKE_BINARY_DIR: replace MATCHES with string(FIND ...)
  to avoid regex metacharacter/anchoring issues
- #3664220631 CMAKE_MODULE_PATH: move append to top-level setup, next to the
  other global includes, instead of inside a conditional block
- #3664220605 msquic packaging: document how BA_PACKAGE_DEPS_IMPORTED still
  transitively ships msquic's .so through ba-quic-lib

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…_TOKEN_URI

- FetchContent_Declare cloned quic-lib over anonymous HTTPS, which TeamCity build agents can't authenticate ("fatal: could not read Username"), failing the configure step before any compilation happens
- inject the org's standard BA_GITLAB_TOKEN_URI env credential into the GIT_REPOSITORY URL via a local _token variable, matching the pattern already used by lightdbw-fleet-bridge and lightdbw-vehicle-control's FetchContent-based dependencies
@danprudky
danprudky force-pushed the BAF-1801/Migrate-onto-QUIC-lib branch from 204985d to 92223bd Compare July 29, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants