Skip to content

BAF-1256 # Module Gateway - QUIC Integration#49

Draft
danprudky wants to merge 64 commits intoBAF-1250/gateway_crashes_when_endpoint_contains_module_missing_in_module_pathsfrom
BAF-1256/use_quic_external_client
Draft

BAF-1256 # Module Gateway - QUIC Integration#49
danprudky wants to merge 64 commits intoBAF-1250/gateway_crashes_when_endpoint_contains_module_missing_in_module_pathsfrom
BAF-1256/use_quic_external_client

Conversation

@danprudky
Copy link

mikusaq added 2 commits August 5, 2025 09:12
Add user and change workingdirectory, so it does work by default with Package
to Image Placer. Ensure that config path is absolute.
@coderabbitai
Copy link

coderabbitai bot commented Jan 7, 2026

Important

Review skipped

Draft detected.

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

Run ID: 58db35c4-5eb1-4e6d-8445-6ab37a60c54a

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
  • Post copyable unit tests in a comment
  • Commit unit tests in branch BAF-1256/use_quic_external_client

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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 and usage tips.

ZLIB::ZLIB
fleet-protocol-cxx-helpers-static::fleet-protocol-cxx-helpers-static
async-function-execution-shared::async-function-execution-shared
msquic
Copy link
Member

Choose a reason for hiding this comment

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

The msquic shall be added as a dependency to the Fleet Protocol Context
https://github.com/bringauto/packager-fleet-protocol-context

@koudis will add it in week 19. 1. 2026

case CONNECTING: return "Connecting";
case CONNECTED: return "Connected";
case CLOSING: return "Closing";
default: return "Unknown";

Choose a reason for hiding this comment

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

Use string constants like loggerVerbosityToString.
Put each return statements on a new line, like in loggerVerbosityToString.

Copy link
Author

Choose a reason for hiding this comment

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

Resolved in 3e5df14

QUIC_BUFFER buffer{};
std::string storage;

explicit SendBuffer(size_t size)

Choose a reason for hiding this comment

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

Maybe add a small docstring for struct SendBuffer, but definitely add a docstring for the constructor saying, that it initializes the buffer to size and fills it with zeroes

Copy link
Author

Choose a reason for hiding this comment

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

Resolved in e74bc2a

Choose a reason for hiding this comment

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

update the README in resources/config with descriptions of the new options you added

Copy link
Author

Choose a reason for hiding this comment

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

Resolved in c1b3a8c

{
auto copy = std::make_shared<ExternalProtocol::ExternalClient>(*message);
std::scoped_lock lock(outboundMutex_);
outboundQueue_.push(std::move(copy));

Choose a reason for hiding this comment

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

use unique_ptr - std::move(outboundQueue_.front()) and then outboundQueue_.pop() should work fine

also just a nitpick, but if you're only locking a single mutex, use lock_guard instead of scoped_lock

Copy link
Author

Choose a reason for hiding this comment

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

Resolved in 30123d9

alpnBuffer_.Length = static_cast<uint32_t>(alpn_.size());

loadMsQuic();
initRegistration("module-gateway-quic-client");

Choose a reason for hiding this comment

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

"module-gateway-quic-client" should be defined as a constexpr string_view, also if initRegistration is only going to be used like this, and the appName will not be configurable, then initRegistration should just have no arguments and use this constant directly

Copy link
Author

Choose a reason for hiding this comment

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

Resolved in 5853c70

}

void QuicCommunication::initConfiguration() {
configurationOpen(nullptr);

Choose a reason for hiding this comment

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

I think you should parse the config for QUIC_SETTINGS as well, the JSON keys could just be the same as the member names in https://github.com/microsoft/msquic/blob/main/docs/api/QUIC_SETTINGS.md, should probably be done in a new static class, responsible for QUIC config parsing, since there's a lot of options - you will need something slightly different from getProtocolSettingsString, each of the QUIC_SETTINGS should be optional, so it can't throw when it doesn't find the key, also you will need to parse the value as an unsigned integer, not just a string

we probably don't need all the settings, probably just allow parsing of timeout settings for now
just make it simple to add any additional options we might need in the future

Copy link
Author

Choose a reason for hiding this comment

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

Resolved in be11942

event->RECEIVE.BufferCount
);

std::vector<uint8_t> data;

Choose a reason for hiding this comment

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

according to https://github.com/microsoft/msquic/blob/main/docs/Streams.md#Receiving, BufferCount == 0 is valid and means end of stream data, maybe handle it as well?

Copy link
Author

Choose a reason for hiding this comment

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

Resolved in d2303a7

This is not treated as stream termination; data processing is skipped only.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
3 New Major Issues (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@jiriskuta jiriskuta force-pushed the BAF-1256/use_quic_external_client branch from be11942 to bf7ee48 Compare February 18, 2026 19:42
MarioIvancik and others added 22 commits February 24, 2026 19:47
- Fixed StatusAggregator::aggregateStatus returning empty buffer on error
- Removed unreachable contains() check in clear_device
- Fixed getDeviceTimeoutCount using operator[] (silent insert); marked const
- Fixed Connection::remoteEndpointAddress using throwing remote_endpoint
- Fixed InternalServer set_option using throwing overload in async handler
- Removed dead code (unused deviceId) in ModuleHandler::destroy
- Fixed LoggerWrapper::init to take only logger name; verbosity is always
  the compile-time template parameter
- Renamed MODULE_GATEWAY_MINIMUM_LOGGER_VERBOSITY to
  BRINGAUTO_MODULE_GATEWAY_MINIMUM_LOGGER_VERBOSITY; added STRINGS validation
- Fixed misleading comments in LoggerWrapper
- Fixed mixed indentation in EnumUtils.cpp DUMMY branch
- Added per-value docs to ProtocolType enum with DUMMY reconnect-loop warning
- Removed dead settingsName assignment for DUMMY in serializeToJson
- Removed pointless sync_with_stdio/cin.tie and unused include from main.cpp

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Increased version of cxxopts from v3.0.5 to v3.1.1
Increased version of nlohmann_json from v3.2.0 to v3.10.5
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add Aeron/Async and Module Binary
Daniel Prudky and others added 28 commits March 4, 2026 09:46
…ove outdated code sections, and organize code structure for clarity.
…ogging for stream events, and clean up debug code.
…ror handling with `StreamShutdown`, and clean up unused callbacks and logging.
…mprove stream and connection logging, and clean up unnecessary debug code.
…hod, improve handling of JSON-encoded protocol settings, and refine `SettingsParser` logic for cleaner value parsing.
…ne logging messages for clarity, and remove unused includes.
…better error handling, improve sender loop logic, and refine logging for message and connection events.
…ate with external_client::connection::ConnectionState
…ings::Constants::ALPN` for improved configurability.
…ed memory handling, update QUIC stream send logic, refine logging with stream IDs, and switch `initRegistration` to use `std::string`.
…er::logError` for error handling and ensure graceful returns in failure scenarios.
…::unique_ptr` with `std::string` for memory management.
…oped_lock` and simplify enum string conversion using `using enum`.
…initRegistration` with a constant for simplification and improved consistency.
…ique_ptr` in outbound queue, update `sendViaQuicStream` to use references for improved memory management and clarity.
…pand protocol support, and provide examples for both.
…dBuffer` to clarify purpose, usage, and construction.
… `settings::Constants` for improved maintainability.
@jiriskuta jiriskuta force-pushed the BAF-1256/use_quic_external_client branch from bf7ee48 to 1bee77f Compare March 4, 2026 08:47
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 4, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
3.9% Duplication on New Code (required ≤ 3%)
D Reliability Rating on New Code (required ≥ A)
7 New Major Issues (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

7 participants