Skip to content
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

Zenoh 1.0.0 Porting #276

Open
wants to merge 85 commits into
base: rolling
Choose a base branch
from
Open

Conversation

YuanYuYuan
Copy link
Contributor

@YuanYuYuan YuanYuYuan commented Sep 5, 2024

Notes

  • Remove some unused dependencies.
  • Use z_view_keyexpr_t rather z_owned_keyexpr_t if possible. This keeps the reference only and doesn't need to be dropped.
  • The attachment type has been removed. Use the plain z_bytes instead.
  • Attachment is nothing but z_bytes. Use an iterator to get value by key.
  • z_check is now internal. We check zenoh entities' health by the creation functions' return.

Mallets and others added 30 commits August 9, 2024 14:32
Signed-off-by: Luca Cominardi <luca.cominardi@gmail.com>
Signed-off-by: Luca Cominardi <luca.cominardi@gmail.com>
Signed-off-by: Luca Cominardi <luca.cominardi@gmail.com>
chore: checkout dev/1.0.0
@YuanYuYuan
Copy link
Contributor Author

@Yadunund The segfault in test_service_rmw_zenoh_cpp and test_get_type_description_service__rmw_zenoh_cpp is happening when rmw_send_response is returning. In particular in the destruction of the ZenohQuery.

Hi @ahcorde, this commit 6fd7e1c has resolved the issue. 😄

@ahcorde
Copy link
Contributor

ahcorde commented Sep 27, 2024

@Yadunund The segfault in test_service_rmw_zenoh_cpp and test_get_type_description_service__rmw_zenoh_cpp is happening when rmw_send_response is returning. In particular in the destruction of the ZenohQuery.

Hi @ahcorde, this commit 6fd7e1c has resolved the issue. 😄

Thank you for the fix, it's working!

Yadunund and others added 3 commits September 30, 2024 16:26
Signed-off-by: Yadunund <yadunund@intrinsic.ai>
… events (ros2#287)

* Fix how total_count and change are calculated

Signed-off-by: Yadunund <yadunund@intrinsic.ai>

* Ensure key expressions match

Signed-off-by: Yadunund <yadunund@intrinsic.ai>

---------

Signed-off-by: Yadunund <yadunund@intrinsic.ai>
* Make rmw_context_impl_s an RAII class

Signed-off-by: Yadunund <yadunund@intrinsic.ai>

* fix regression with graph_guard_condition not triggering when entity is removed

Signed-off-by: Yadunund <yadunund@intrinsic.ai>

* Have the context create the zenoh artifacts

Signed-off-by: Yadunund <yadunund@intrinsic.ai>

* Add comment for session() api

Signed-off-by: Yadunund <yadunund@intrinsic.ai>

* Style

Signed-off-by: Yadunund <yadunund@intrinsic.ai>

* Add api to register querying_sub cb in rmw_context_impl_s

Signed-off-by: Yadunund <yadunund@intrinsic.ai>

* Have rmw_context_impl_s return a shared_ptr to GraphCache

Signed-off-by: Yadunund <yadunund@intrinsic.ai>

* Add todo on thread safety

Signed-off-by: Yadunund <yadunund@intrinsic.ai>

* Update rmw_zenoh_cpp/src/detail/rmw_context_impl_s.cpp

Co-authored-by: Chris Lalancette <clalancette@gmail.com>
Signed-off-by: Yadu <yadunund@gmail.com>

* Address feedback

Signed-off-by: Yadunund <yadunund@intrinsic.ai>

* Do not use allocator for creating graph_guard_condition

Signed-off-by: Yadunund <yadunund@intrinsic.ai>

* Address feedback

Signed-off-by: Yadunund <yadunund@intrinsic.ai>

---------

Signed-off-by: Yadunund <yadunund@intrinsic.ai>
Signed-off-by: Yadu <yadunund@gmail.com>
Co-authored-by: Chris Lalancette <clalancette@gmail.com>
Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

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

Do you mind to fix the conflicts?

{
sequence_number = _sequence_number;
source_timestamp = _source_timestamp;
memcpy(source_gid, _source_gid, RMW_GID_STORAGE_SIZE);
Copy link
Contributor

Choose a reason for hiding this comment

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

include <cstring>

@YuanYuYuan
Copy link
Contributor Author

Do you mind to fix the conflicts?

Sorry. I think my previous conflict merge was unexpectedly corrupted. I have updated a new one.

Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

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

Another thread PR was merged, do you mind to rebase? There are some conflicts

@Yadunund
Copy link
Member

Yadunund commented Oct 2, 2024

@YuanYuYuan on top of what Alex mentioned above we also merged a few PRs to make a few tests pass. Could you slowly incorporate those changes into this PR as well?

Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

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

This method is defined liveliness_is_valid in the rmw_publisher_data.hpp header, but it's not implemented. Maybe it was lost in the rebase

@ahcorde
Copy link
Contributor

ahcorde commented Oct 2, 2024

The zc_liveliness_token_check was removed in this commit eclipse-zenoh/zenoh-c@79b4468#diff-1761e4ec66b6bea4d1694a4c577b7db1a4457773bc0cbc3698f168a18316aac6R129 which is still used in the code.

@YuanYuYuan
Copy link
Contributor Author

@ahcorde @Yadunund I've merged the latest thread-safe PRs into this branch with the additional changes below.

  • Warn the users whenever a publisher fails to send the message after the session is closed. This was an error before and made us fail on the test rcl/test_publisher__rmw_zenoh_cpp.
  • New (de)serialization is introduced. I unified the attachment structure which could be easily integrated into a custom (de)serializer when we move to zenoh-cpp.
  • The liveliness check is removed hence it's removed in the new commit.

NOTE: The rolling/jazzy uncrustify seems to be incompatible with the iron one. I will review the style change manually.

@clalancette
Copy link
Collaborator

NOTE: The rolling/jazzy uncrustify seems to be incompatible with the iron one. I will review the style change manually.

Just as an FYI; it should be possible, in most cases, to update the style so that it will satisfy both. The big exception to this is in macros, where I could not find a consistent set of configuration or code that satisfies both older uncrustify and newer one. But I don't believe we use too many macros here, so hopefully this is not the issue.

@YuanYuYuan
Copy link
Contributor Author

NOTE: The rolling/jazzy uncrustify seems to be incompatible with the iron one. I will review the style change manually.

Just as an FYI; it should be possible, in most cases, to update the style so that it will satisfy both. The big exception to this is in macros, where I could not find a consistent set of configuration or code that satisfies both older uncrustify and newer one. But I don't believe we use too many macros here, so hopefully this is not the issue.

Hi @clalancette, according to the logs, those are not macros. Maybe we have other issues? 🤔

https://github.com/ros2/rmw_zenoh/actions/runs/11148592945/job/30985531516?pr=276#step:4:5

Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

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

@YuanYuYuan I merged the PR that fixed the lifecycle issue, do you mind to rebase again with rolling ?

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.

10 participants