| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
Annotate qt_find_package calls for vcpkg.json generation.
Pick-to: 6.11
Task-number: QTBUG-73760
Change-Id: I6ddf18493d178374c79f9c12ad8cad4d56363249
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
|
|
|
| |
Change-Id: I9704ea40b97753b3859e2601891754f6bbd93a89
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit implements the new QtGrpc interception mechanism. It is
based on the idea of subclassing each provided
QGrpc<HookPoint>Interceptor interface that one is interested in and
attach those to the channel.
Internally, we cache each implemented interfaces and provide the
hook-point handlers to the library. Library code should always check for
usage before invoking the interceptor engine to follow the zero-overhead
principle.
In this mechanism, request messages are provided to interceptors as
QProtobufMessage objects (before serialization) and responses are
provided as QByteArray (before deserialization).
This patch provides the implementation and tests. Documentation will be
provided as follow-up.
Fixes: QTBUG-128338
Change-Id: I50a9bfa7f1c125819b8e7dfcf7132746dd8df18c
Reviewed-by: Alexey Edelev <semlanik@gmail.com>
|
| |
|
|
|
|
|
|
| |
Re-attaching the same channel shouldn't be counted as valid.
Pick-to: 6.10 6.8
Change-Id: I976d458171938c468dd686c4c3e9197e2ecab7af
Reviewed-by: Alexey Edelev <semlanik@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This commit provides a central place for handling common RPC
functionality.
This is a prerequisite for interceptors, which benefits from the
centralized access.
Task-number: QTBUG-128338
Pick-to: 6.10 6.8
Change-Id: I684ac595e4f46cc556cc93c2f798de73753552a1
Reviewed-by: Alexey Edelev <semlanik@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Provides public access to the internal meta-object via metaObject() and
introduces qprotobufmessage_cast, a qobject_cast-like function that
relies on it.
This is a prerequisite for interceptors, which require run-time type
information to inspect and cast messages to their concrete types.
Task-number: QTBUG-128338
Change-Id: Idfede87c5f2f2358f2409bc488b6abece4cc718b
Reviewed-by: Alexey Edelev <semlanik@gmail.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Currently the assertion will only take place in debug builds. We
shouldn't continue processing on nullptr messages in release builds too!
Pick-to: 6.10 6.8
Change-Id: I5d010a4c1589b8d3b5a0e332bef20d60c23d490b
Reviewed-by: Alexey Edelev <semlanik@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Check if the call got cancelled before sending the initial request, as
this can happen.
Furthermore improve the tracing and logic:
* don't call RST_STREAM on Idle streams.
* print warning if state check fails.
Pick-to: 6.10 6.8
Change-Id: I902d2fba72a27ea7de58284116a59c1c9ce5d78f
Reviewed-by: Alexey Edelev <semlanik@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We've given the promise that the QGrpcOperation::finished signal is
emitted once during the lifetime of an RPC at multiple places!
That implies also the start of the RPC, but as of now this wasn't true.
The QGrpcClientBase fails a RPC under some conditions. We move this
logic to the QGrpcOperation class now.
This patch guarantees that the construction of RPC handlers is
successfull and that the finished signal is emitted in the error case.
In QGrpcOperation we remove the atomic isFinished flag. We replace it
with a more descriptive State, to handle the additional 'Invalid' state.
No multithreading is happening in the finished signal emission, so
atomic properties are not needed.
The 'serializeInitialMessage' is a preemptive move for the upcoming
interceptors logic, which will require such centralized handler.
[ChangeLog][Important Behavior Changes][QGrpcClientBase/QGrpcOperation]
RPC-handlers are now guaranteed to be constructed. The finished signal
will now be invoked at least once during the lifetime, as documented.
Change-Id: I83bcbcefa1f5533401c71260608327fe621324e2
Reviewed-by: Alexey Edelev <semlanik@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The context shouldn't be shared. The previous patch already addresses
this in the public API and this patch changes the internal handling.
We construct the operation-context now inside the QGpcOperation and
provide proper parent<>child handling between them. We teach our users
that the finished signal is _always_ emitted for the lifetime of an RPC,
but this is not true! During construction, there are checks which can
fail, which would return a null operation. To properly fix that we need
to have the Context available on construction already (due to
QGrpcOperation's API). This makes anyway the most sense logically.
This patch doesn't fix that, but is a preparation to change
that in the following patches. The same holds true for providing the
Descriptor and the channel. This will be required to provide the
Interceptors logic.
Change-Id: If6c1205ff0fbf3f4f54eb27b83b6c59ffe7df4e5
Reviewed-by: Alexey Edelev <semlanik@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We deprecate the QGrpcOperationContext::argument for the next release.
The only users of this class are those implementing our undocumented and
private channel API (this is why it's semi-private). These users should
adapt their code. This should be a trivial change.
It never made sense to store the initial argument in the context, as it
could be a large message like 5 MB stored unnecessarily.
[ChangeLog][Deprecation Notice][QGrpcOperationContext]
Deprecate the argument() method in favor of the new abstract rpc
interface.
Change-Id: Ic579c04ff8b6ae024539ee5605765410104b618c
Reviewed-by: Alexey Edelev <semlanik@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new interface provides the operationContext as a raw pointer and
also contains the initial serialized argument to start the call.
We observed that having shared ownership of the context between the
channel and the QGrpcOperation is problematic. The latter is owned by
the user, and if the QGrpcOperation is destroyed, there is no point in
keeping the context alive any longer. Channel implementations should
also treat the context as a weak reference and either connect to its
destroyed signal or check for validity.
This patch provides a better lifetime contract and prepares to remove
the unneeded storage overhead of QGrpcOperationContext::argument.
[ChangeLog][Important Behavior Changes][QAbstractGrpcChannel] The
abstract interface of private RPC functions has changed. Users of this
private, undocumented API must adapt their code.
Change-Id: I0baa7dc8639ec49fd28ce122476981545a36a0b4
Reviewed-by: Alexey Edelev <semlanik@gmail.com>
|
| |
|
|
|
| |
Change-Id: Ifd002429e4e0f75ddd854ec95fdfc65768722a9b
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
| |
|
|
|
| |
Change-Id: Ib1e1dec57660700433e6b7dc60c040a0a2da0085
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
| |
|
|
|
| |
Change-Id: I9dea52ca47651434492006237034411a44c01c0c
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
| |
|
|
|
|
|
|
| |
More readable.
Pick-to: 6.10 6.8 6.5
Change-Id: I63f8f89a0a26732fd9d4f026c85c62181d7a79d2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
| |
|
|
|
| |
Change-Id: I1feaef1a3ac39a83933773d2a4a01b79efb58e07
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
| |
|
|
|
| |
Change-Id: I80cc55ce0a1d1c98d9a481bced3493845455fd79
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
| |
|
|
|
| |
Change-Id: I5d7e938cbed3e3e90bc5884459b04a1fb97fe554
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
| |
|
|
|
| |
Change-Id: Ieed41dcece4c1a9cff0f0b514f5f9701f9e6d0d4
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
| |
|
|
|
| |
Change-Id: Iab362d1d10fa19ad5bc9822fd9c0138a41689e3f
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
| |
Change-Id: Ia22db6af9adf2affe44e96a02997d1af97f98143
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
| |
|
|
|
| |
Change-Id: Ic2ece2f793d8e0c9c1fc13b88f30bc6eafa48a29
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
| |
|
|
|
| |
Change-Id: Ifca22fc5ae5d3ade7eb2ab1a193900cc2b6f2ba6
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
| |
|
|
|
|
| |
Task-number: QTBUG-141872
Change-Id: I2114b0a74f0ac2ca604c1d4b645a610252fc9045
Reviewed-by: Topi Reinio <topi.reinio@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>
|
| |
|
|
|
| |
Change-Id: Ib1b7f03db271cfbb9d6c8ad5511192692b68ab04
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
| |
|
|
|
| |
Change-Id: I0ec8148b1d9cc4d3f6fec0dea2ffa393473922ab
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
| |
|
|
|
| |
Change-Id: I5dc970cde692c348b98a3fe68a5c90ffa3bbda6f
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>
|
| |
|
|
|
|
|
|
|
| |
QT_NO_AS_CONST got renamed in qtbase.git in commit
03baf08d2bb9
Task-number: QTBUG-141558
Change-Id: I1fe06d22bddd64945a28447730ffcc5cf0d85952
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
|
| |
|
|
|
|
|
|
| |
Pick-to: 6.10 6.8
Task-number: QTBUG-140629
Change-Id: If91c00f72a52bfd0b62790d44cd5e489281a767d
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@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>
|
| |
|
|
|
| |
Change-Id: Iba336234c9d8cbcba4a0f2b32d2ecc30545ccfa3
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
| |
|
|
|
| |
Change-Id: I12930897d56ed2bc095f372bb8493589c78a7e0a
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
| |
|
|
|
| |
Change-Id: I9e3ab588ecdce645619eec847c25bbab068101ac
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
| |
|
|
|
| |
Change-Id: I8c861cc9bf1ca8610be509dfcb30ca459dd06751
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
| |
|
|
|
| |
Change-Id: Ib3ac0a828143d74153406fb48df7f0136c124688
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
| |
|
|
|
|
|
| |
Task-number: QTBUG-140916
Pick-to: 6.8 6.10
Change-Id: I4f8d24364e92e01c006418d0314fa8c7c9f0de91
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
|
|
|
| |
Change-Id: Id8f3f7c372e57fff676b2e4480383535d6db8899
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
| |
|
|
|
| |
Change-Id: I9502e1255dbed9f7951d4bd66bef152f456307e7
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
| |
Pick-to: 6.10 6.9 6.8
Change-Id: I446455abf26abc78ad89d1811114263749c08b4f
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>
|