Add tag tracking functionality through the explicit EmptyGuard class.
Every tag requires a reference of this tracker, so that we can guarantee
that after leaving the scope of a testcase, all inserted Tags actually
finished.
I would like to have stack based Data management but unfortunately the
windows implementation on the CI for grpc 1.51 is using the context
after finishing, so we still have to delete our data with the Finished
operation.
Fixes: QTBUG-141780
Pick-to: 6.10 6.8
Change-Id: I1ed0d8e999a7693b85b3080acc29170a775de8d4
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Auto-generated wrapper headers in `google/protobuf/` produce
undocumented property warnings. These thin wrappers around Google's
types should reference upstream protobuf documentation rather than
duplicate property semantics.
Add an `excludefiles` pattern to skip `*.qpb.h` files during
documentation generation.
Pick-to: 6.10 6.10.1
Task-number: QTBUG-141872
Change-Id: Icf1371dfe2eb727a889e7182c088390345b12603
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
When CMAKE_FIND_PACKAGE_PREFER_CONFIG is TRUE, find_package(OpenSSL)
prefers CONFIG mode and may bypass package manager wrappers that only
work in MODULE mode (e.g., vcpkg's wrapper).
This can lead to finding the wrong OpenSSL installation, such as
single-architecture system installations instead of the intended
universal binaries from the package manager, causing linker errors when
building for multiple architectures.
Fix this by finding OpenSSL before setting
CMAKE_FIND_PACKAGE_PREFER_CONFIG to TRUE. This ensures OpenSSL is found
via MODULE mode where package manager wrappers can properly control the
search. When gRPC's config file is loaded, it skips its own OpenSSL
search, using the already-found targets instead.
For test files, backup and restore the original
CMAKE_FIND_PACKAGE_PREFER_CONFIG value to limit the scope of the change.
For example files, keep the change simple without the backup/restore
pattern.
Change-Id: I985560fd5d57fa8036cc2ccb93c01a55e2efe1bc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Adding alt texts that were needed for QDoc
Pick-to: 6.8
Change-Id: I19b8800fc80d62c6d1996a434fb223cfc2a6e445
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Implement the missing decompression handling. We were advertising an
accepted encoding of GrpcAcceptEncodingValue("identity,deflate,gzip")
but only ever handled identity (i.e. no compression) !
We now check the negotiated content-encoding in the initialMetadata to
set up the appropriate decompression. Since compression can vary per
message, dynamic processing is required.
[ChangeLog][QGrpcHttp2Channel] Added missing decompression handling for
'deflate' and 'gzip'.
Fixes: QTBUG-129286
Pick-to: 6.10 6.9 6.8
Change-Id: I3ed4af7b21b51c52bccc3e6c314ae166e80c94a8
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
In case we receive the endStream flag when processing received data, we
now return a non-ok QGrpcStatus if there's still unprocessed data in the
intermediate container.
[ChangeLog][QGrpcHttp2Channel][Important Behavior Changes] finishes the
communication with a non-ok QGrpcStatus (DataLoss) when the stream is
closed with unprocessed trailing data.
Pick-to: 6.10 6.9 6.8
Change-Id: I53d36c012d6cab57f4d8b652518ff5ccd5be24f2
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
We are missing functionality! We are omitting any compressed messages.
This patch doesn't add the compression handling but a more structured
and sane way of encapsulating the data parsing. Added the compression
flag extraction to the parsing.
Task-number: QTBUG-129286
Pick-to: 6.10 6.9 6.8
Change-Id: I699fdb6fb0279453a367930e950c2af3e992063d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The initial metadata is received when the call starts, often at a
different time then when the RPC finishes. Interceptors provide a way to
access this globally for all RPC but we should add this signal for our
users who are only interested in specific handlers.
[ChangeLog][QGrpcOperation] Added the serverInitialMetadataReceived
signal.
Change-Id: I362a601675029a21d7721275a1b8174ded07fabf
Fixes: QTBUG-139558
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Our current test strategy relies on having a dedicated server running.
While this tests the most 'accurate' flow of the system, it is really
hard to verify the server behavior due to missing flexibility.
Introduce the mockserver to solve this problem. It wraps the low-level
async gRPC server API and allows for non-blocking processing of
operations. This allows it to run nicely together with the Qt Even Loop,
which is blocking.
Provide the server-handling code by using CallbackTags with Lambdas, or
by subclassing the AbstractRpcTag interface.
Change-Id: I086cbd1d6d8542c717ae036bdf54ba96c55afb58
Fixes: QTBUG-139285
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
It makes sense to provide the equality operators to these classes.
However, omit the otherwise common 'qHash' functionality as it makes no
sense to hash a options class.
[ChangeLog][QGrpcCallOptions/QGrpcChannelOptions] Made the options
classes equality comparable.
Task-number: QTBUG-128338
Change-Id: Idb7ff6946dfef373eba32839ac4b3faf2ff4e5c2
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
More structured way of handling the code that complements the
interceptors patch.
Pick-to: 6.10 6.9 6.8
Change-Id: I6660e9a95ff8faef8e50966d912fdf9f1a7967c9
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Move the protocolCompilerAvailableToRun check under the
SKIP_COMMAND_LINE_TESTS guard.
Pick-to: 6.8 6.9 6.10
Change-Id: Ibd2ce706e7d73d368a89f9f486f3f2fc0f59e7e4
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
The libraty cannot be built if grpc_testserver is missing.
Pick-to: 6.10 6.9 6.8
Change-Id: I34f6a419e2726ec23ac78f0b95f0974df2080547
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
This is a better place then the 'Application Examples' category that
should be reserved for higher-level examples that work out of the box.
Also highlight the example in the Networking category.
Pick-to: 6.8 6.9 6.10
Task-number: QTBUG-137988
Change-Id: I75f630daeba350043f6d0aa3a90b30bee967e6b1
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Our documentation of what the QGrpcHttp2Channel should accept as
metadata was incomplete. Add the missing bits and give readers a link to
the original information, which is coming from RFC 7540.
Task-number: QTBUG-139558
Pick-to: 6.10 6.9 6.8
Change-Id: Ie170fd1f5300597b31dd49d47d5e01c469bf6ec3
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
We are constructing 'hostUri' at this point. Don't use it for printing.
Coverity-Id: 894268
Pick-to: 6.10 6.9 6.8
Change-Id: I2b478de2d3865112978202959e1af07b17f7751a
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>