generated from cpp-best-practices/gui_starter_template
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix subscriptions via REST when using params #331
Merged
Merged
Conversation
This file contains 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
frankosterfeld
temporarily deployed
to
configure coverage
November 24, 2023 13:45
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
November 24, 2023 13:45
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
November 24, 2023 13:45
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
November 24, 2023 13:45
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
November 24, 2023 13:45
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
November 24, 2023 13:45
— with
GitHub Actions
Inactive
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #331 +/- ##
==========================================
+ Coverage 55.84% 57.15% +1.30%
==========================================
Files 69 69
Lines 7291 7310 +19
Branches 2691 2703 +12
==========================================
+ Hits 4072 4178 +106
+ Misses 1484 1322 -162
- Partials 1735 1810 +75 ☔ View full report in Codecov by Sentry. |
frankosterfeld
force-pushed
the
frank/rest-subscription-params
branch
from
November 29, 2023 15:38
339288b
to
37d5c98
Compare
frankosterfeld
temporarily deployed
to
configure coverage
November 29, 2023 15:38
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
November 29, 2023 15:38
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
November 29, 2023 15:38
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
November 29, 2023 15:38
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
November 29, 2023 15:38
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
November 29, 2023 15:38
— with
GitHub Actions
Inactive
frankosterfeld
force-pushed
the
frank/rest-subscription-params
branch
from
November 29, 2023 15:43
37d5c98
to
914d77d
Compare
frankosterfeld
temporarily deployed
to
configure coverage
November 29, 2023 15:43
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
November 29, 2023 15:43
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
November 29, 2023 15:43
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
November 29, 2023 15:43
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
November 29, 2023 15:43
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
November 29, 2023 15:43
— with
GitHub Actions
Inactive
frankosterfeld
force-pushed
the
frank/rest-subscription-params
branch
from
November 29, 2023 15:48
914d77d
to
ca8877a
Compare
frankosterfeld
temporarily deployed
to
configure coverage
November 29, 2023 15:48
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
November 29, 2023 15:48
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
November 29, 2023 15:48
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
November 29, 2023 15:48
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
November 29, 2023 15:48
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
November 29, 2023 15:48
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
December 15, 2023 00:39
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
December 15, 2023 00:39
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
December 15, 2023 00:39
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
December 15, 2023 00:39
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
December 15, 2023 00:39
— with
GitHub Actions
Inactive
frankosterfeld
force-pushed
the
frank/rest-subscription-params
branch
from
December 15, 2023 09:31
a1d6b6c
to
391b2df
Compare
frankosterfeld
added a commit
that referenced
this pull request
Dec 15, 2023
Do not lose params when subscribing to a topic via REST. Bump cpp-httplib to newest version, as it fixes an encoding error with query parameters encoded in query parameters (SubscriptionContext) when used with redirects. To unify subscription handling (different client/servers were making slightly different assumptions), the following is now implemented: - Service names must always start with "/". - The topic is of the form "/some/service?param1=..¶m2", where the service name is mandatory in the topic, and the params are optional. - When serialized to a ZMQ topic, i.e. the string-based PUB/SUB topic matching, the parameters are sorted, to make the subscription and notification topics match exactly (required by ZMQ, as ZMQ subscription topics are string-, not URI-based) - Valid REST URIs are e.g. "http://localhost:8080/service?a&b" or http://localhost:8080/service?a&b", i.e. the service is a mandatory part of the URI. mds:// and mdp:// URIs are analogous. - On the ZMQ message level, the "serviceName" in above examples would be "service" and the "topic" would be "/service?a&b" (here param order is not enforced).
frankosterfeld
temporarily deployed
to
configure coverage
December 15, 2023 09:31
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
December 15, 2023 09:31
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
December 15, 2023 09:31
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
December 15, 2023 09:31
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
December 15, 2023 09:31
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
December 15, 2023 09:31
— with
GitHub Actions
Inactive
Do not lose params when subscribing to a topic via REST. Bump cpp-httplib to newest version, as it fixes an encoding error with query parameters encoded in query parameters (SubscriptionContext) when used with redirects. To unify subscription handling (different client/servers were making slightly different assumptions), the following is now implemented: - Service names must always start with "/". - The topic is of the form "/some/service?param1=..¶m2", where the service name is mandatory in the topic, and the params are optional. - When serialized to a ZMQ topic, i.e. the string-based PUB/SUB topic matching, the parameters are sorted, to make the subscription and notification topics match exactly (required by ZMQ, as ZMQ subscription topics are string-, not URI-based) - Valid REST URIs are e.g. "http://localhost:8080/service?a&b" or http://localhost:8080/service?a&b", i.e. the service is a mandatory part of the URI. mds:// and mdp:// URIs are analogous. - On the ZMQ message level, the "serviceName" in above examples would be "/service" and the "topic" would be "/service?a&b" (here param order is not enforced).
Make sure that long-poll request handlers do not block forever when no corresponding event is received. Otherwise the clients will send one request after another once their request times out client-side, until the worker threads are exhausted and the server stops responding. It would be great if we could also detect the client connection be dropped using Keep-Alive, but cpp-httplib doesn't seem to have API for that.
frankosterfeld
force-pushed
the
frank/rest-subscription-params
branch
from
December 15, 2023 10:00
391b2df
to
a03822f
Compare
frankosterfeld
temporarily deployed
to
configure coverage
December 15, 2023 10:00
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
December 15, 2023 10:00
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
December 15, 2023 10:00
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
December 15, 2023 10:00
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
December 15, 2023 10:00
— with
GitHub Actions
Inactive
frankosterfeld
temporarily deployed
to
configure coverage
December 15, 2023 10:00
— with
GitHub Actions
Inactive
RalphSteinhagen
approved these changes
Dec 15, 2023
Quality Gate failedFailed conditions 35.3% Coverage on New Code (required ≥ 80%) |
ivan-cukic
approved these changes
Dec 15, 2023
wirew0rm
approved these changes
Dec 15, 2023
wirew0rm
pushed a commit
that referenced
this pull request
Dec 15, 2023
Do not lose params when subscribing to a topic via REST. Bump cpp-httplib to newest version, as it fixes an encoding error with query parameters encoded in query parameters (SubscriptionContext) when used with redirects. To unify subscription handling (different client/servers were making slightly different assumptions), the following is now implemented: - Service names must always start with "/". - The topic is of the form "/some/service?param1=..¶m2", where the service name is mandatory in the topic, and the params are optional. - When serialized to a ZMQ topic, i.e. the string-based PUB/SUB topic matching, the parameters are sorted, to make the subscription and notification topics match exactly (required by ZMQ, as ZMQ subscription topics are string-, not URI-based) - Valid REST URIs are e.g. "http://localhost:8080/service?a&b" or http://localhost:8080/service?a&b", i.e. the service is a mandatory part of the URI. mds:// and mdp:// URIs are analogous. - On the ZMQ message level, the "serviceName" in above examples would be "/service" and the "topic" would be "/service?a&b" (here param order is not enforced).
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.
Unify subscription topic handling and fix it for REST (#328, #331)
Do not lose params when subscribing to a topic via REST.
Bump cpp-httplib to newest version, as it fixes an encoding error with query parameters encoded in query parameters (SubscriptionContext) when used with redirects.
To unify subscription handling (different client/servers were making slightly different assumptions), the following is now implemented:
UPDATE: Rebased/merged #330 into this one:
Make sure that long-poll request handlers do not block forever when no corresponding event is received. Otherwise the clients will send one request after another once their request times out client-side, until the worker threads are exhausted and the server stops responding.
It would be great if we could also detect the client connection be dropped using Keep-Alive, but cpp-httplib doesn't seem to have API for that.