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

[#264] config api #367

Merged
merged 15 commits into from
Sep 11, 2024
Merged

Conversation

elfenpiff
Copy link
Contributor

@elfenpiff elfenpiff commented Sep 4, 2024

Notes for Reviewer

  • Contains the C/C++ binding for iceoryx2::config::Config
  • The C++ binding is implemented on basis of the C binding
  • One of the global configs use case is to configure multiple non-interacting iceoryx2 domains by defining either a unique global prefix or setting a unique global directory

Pre-Review Checklist for the PR Author

  1. Add sensible notes for the reviewer
  2. PR title is short, expressive and meaningful
  3. Relevant issues are linked in the References section
  4. Every source code file has a copyright header with SPDX-License-Identifier: Apache-2.0 OR MIT
  5. Branch follows the naming format (iox2-123-introduce-posix-ipc-example)
  6. Commits messages are according to this guideline
  7. Tests follow the best practice for testing
  8. Changelog updated in the unreleased section including API breaking changes
  9. Assign PR to reviewer
  10. All checks have passed (except task-list-completed)

Checklist for the PR Reviewer

  • Commits are properly organized and messages are according to the guideline
  • Unit tests have been written for new behavior
  • Public API is documented
  • PR title describes the changes

Post-review Checklist for the PR Author

  1. All open points are addressed and tracked via issues

References

Relates to #264

@elfenpiff elfenpiff requested a review from elBoberido September 4, 2024 00:42
@elfenpiff elfenpiff self-assigned this Sep 4, 2024
Copy link

codecov bot commented Sep 4, 2024

Codecov Report

Attention: Patch coverage is 81.11888% with 27 lines in your changes missing coverage. Please review.

Project coverage is 79.46%. Comparing base (5eb3eac) to head (d8a963a).
Report is 16 commits behind head on main.

Files with missing lines Patch % Lines
iceoryx2/src/config.rs 40.00% 9 Missing ⚠️
...yx2-cal/src/communication_channel/message_queue.rs 33.33% 4 Missing ⚠️
...l/src/communication_channel/posix_shared_memory.rs 50.00% 4 Missing ⚠️
...yx2-cal/src/communication_channel/process_local.rs 33.33% 4 Missing ⚠️
iceoryx2-cal/src/event/common.rs 55.55% 4 Missing ⚠️
...yx2-cal/src/communication_channel/unix_datagram.rs 66.66% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #367      +/-   ##
==========================================
- Coverage   79.56%   79.46%   -0.10%     
==========================================
  Files         193      193              
  Lines       22709    22716       +7     
==========================================
- Hits        18068    18051      -17     
- Misses       4641     4665      +24     
Files with missing lines Coverage Δ
iceoryx2-bb/container/src/semantic_string.rs 86.57% <100.00%> (ø)
...yx2-cal/src/dynamic_storage/posix_shared_memory.rs 89.54% <100.00%> (ø)
iceoryx2-cal/src/dynamic_storage/process_local.rs 94.07% <100.00%> (ø)
iceoryx2-cal/src/event/process_local.rs 88.35% <100.00%> (ø)
iceoryx2-cal/src/event/unix_datagram_socket.rs 86.60% <100.00%> (ø)
iceoryx2-cal/src/monitoring/file_lock.rs 71.00% <100.00%> (ø)
iceoryx2-cal/src/monitoring/process_local.rs 74.15% <100.00%> (ø)
iceoryx2-cal/src/named_concept.rs 76.19% <ø> (ø)
iceoryx2-cal/src/shared_memory/common.rs 86.38% <100.00%> (ø)
iceoryx2-cal/src/shared_memory_directory/mod.rs 90.41% <100.00%> (ø)
... and 10 more

... and 10 files with indirect coverage changes

Copy link
Member

@elBoberido elBoberido left a comment

Choose a reason for hiding this comment

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

The easy 36 files are done

iceoryx2-ffi/ffi/src/api/config.rs Show resolved Hide resolved
iceoryx2-ffi/ffi/src/api/config.rs Outdated Show resolved Hide resolved
iceoryx2-ffi/ffi/src/api/config.rs Show resolved Hide resolved
Comment on lines +1420 to +1422
pub unsafe extern "C" fn iox2_config_defaults_publish_subscribe_unable_to_deliver_strategy(
handle: iox2_config_ref_h,
) -> c_int {
Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to return the iox2_unable_to_deliver_strategy_e enum directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe, you never did this in any other API so I just followed the other code for consistency reasons.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, right. It's an error enum and then one cannot return OK anymore

iceoryx2-ffi/cxx/include/iox2/config.hpp Show resolved Hide resolved
@elfenpiff elfenpiff merged commit b4b8d9c into eclipse-iceoryx:main Sep 11, 2024
55 checks passed
@elBoberido elBoberido deleted the iox2-264-config-api branch September 11, 2024 11:06
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.

2 participants