-
Notifications
You must be signed in to change notification settings - Fork 44
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
Oneway service request from the command line #477
Conversation
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## gz-transport13 #477 +/- ##
==================================================
- Coverage 87.69% 87.67% -0.03%
==================================================
Files 59 59
Lines 5704 5710 +6
==================================================
+ Hits 5002 5006 +4
- Misses 702 704 +2 ☔ View full report in Codecov by Sentry. |
Would it be possible to detect that the response type is |
Signed-off-by: Carlos Agüero <[email protected]>
Sounds good to me. Then, now both:
and
shoudn't generate timeouts. |
@j-rivero , do you know why the same job (Ubuntu CI / Ubuntu Jammy CI) can pass and fail at the same time? It seems that |
There have been some changes in #481 that affect this PR. I suggest merging from |
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Good to go again! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just one comment about the timeout.
src/cmd/gz.hh
Outdated
|
||
/// \brief External hook to execute 'gz service -r' from the command line. | ||
/// \param[in] _service Service name. | ||
/// \param[in] _reqType Message type used in the request. | ||
/// \param[in] _repType Message type used in the response. | ||
/// \param[in] _timeout The request will timeout after '_timeout' ms. | ||
/// If -1 is used, the request will be one-way and _repType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Users might expect a timeout of -1 as "wait forever", which would be the opposite of this. I would say just checking if the message type is Empty
is sufficient, but if you think we should have the timeout check as well, we should definitely update the help message of the CLI to mention this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine just checking the response type. I updated it in 687edcc.
Signed-off-by: Carlos Agüero <[email protected]>
🦟 Bug fix
Partially fixes #97
Summary
This patch makes it possible to request a one-way service request from the command line. Before, it was possible passing
--reptype gz.msgs.Empty
but always getting the messageService call timed out
as an output (because the service callback wasn't answering anything, which was expected).How to test it?
You can compile the examples, and then:
Note that both requests should reach the responser:
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.